Skip to content

Cloud vs. On-Premise

abap-util is designed so the same calling code works in three environments. This page explains where the differences sit so you can make informed choices when consuming the library.

What's identical

The full zabaputil_cl_util façade — strings, JSON, XML, RTTI, time, URL, filter, msg, http, log — is available everywhere. If a method is on the façade, you can call it from cloud and on-premise alike.

Where the implementation differs

Some helpers need to call APIs that only exist in one world. For those cases the library ships two adapters with the same public signature:

ClassUsed byImplements
zabaputil_cl_util_api_cABAP CloudUUIDs, BAL, Base64, XLSX, callstack, source… via released cloud APIs (xco_*, cl_web_http_*, if_xco_*)
zabaputil_cl_util_api_sStandard ABAPSame methods via classic APIs (cl_system_uuid, if_http_server, cl_bali_log, …)

zabaputil_cl_util_api is a thin pass-through; the activation system selects the matching variant at deploy time.

Methods that intentionally differ in behavior

MethodCloudOn-Premise
zabaputil_cl_util_http=>set_session_statefulNo-op (feature not released)Calls set_session_stateful on the HTTP server
zabaputil_cl_util_http=>get_response_cookie / delete_response_cookieNo-op (commented out)Reads/deletes the cookie from the on-prem response object
zabaputil_cl_util_ext (entire class)Not availableProvides DDIC introspection (DFIES), search-help reads, transport handling

If a feature only exists on one side, the documentation page for that feature calls it out explicitly.

Detecting the environment at runtime

abap
IF zabaputil_cl_util=>context_check_abap_cloud( ) = abap_true.
  " Running on ABAP Cloud
ELSE.
  " Running on Standard ABAP
ENDIF.

Use this only when you have a genuinely different code path — most of the time the helpers above already abstract the difference for you.

HTTP — one handler, two factories

The HTTP wrapper exposes a single object with the same instance methods regardless of where it runs. Just pick the right factory:

abap
" On-Premise (e.g. SICF handler implementing IF_HTTP_EXTENSION)
DATA(lo_http) = zabaputil_cl_util_http=>factory( server = lo_server ).

" ABAP Cloud (e.g. handler implementing IF_HTTP_SERVICE_EXTENSION)
DATA(lo_http) = zabaputil_cl_util_http=>factory_cloud( req = lo_req res = lo_res ).

" Identical from here on
DATA(ls_req) = lo_http->get_req_info( ).
lo_http->set_cdata( '{"ok":true}' ).
lo_http->set_status( code = 200 reason = 'OK' ).

Persistence (zabaputil_cl_util_db)

The persistence service uses table ZABAPUTIL_T_91. The table is shipped in the on-premise / Standard ABAP package only. On ABAP Cloud, persistence on this table is not currently supported — use the BTP ABAP Environment's recommended persistence patterns (e.g. business object behavior implementations) for new development.

Down-port to NetWeaver 7.02

The 7.02 branch is generated by the auto_downport workflow (see Compatibility). The downport keeps the public API but rewrites:

  • DATA(...) declarations into explicit DATA + MOVE
  • inline VALUE #(...) expressions into table appends
  • string templates (|...|) into CONCATENATE

Your calling code can still use modern ABAP if your system supports it; only the library itself is rewritten.

Released under the MIT License.