Sub topic 8
Extensibility: in-app, developer, and classic options
This chapter assumes you know the three editions (Public, Private, on-premise) and the difference between SaaS, PaaS, and IaaS. You also need to know what ABAP is. Extensibility is how you add fields, logic, and apps to standard S/4HANA without changing SAP's code. The options you have depend on the edition.
The three extensibility models
- In-app extensibility uses tools inside the S/4HANA system. Key users add custom fields, business logic, and custom CDS views from Fiori apps, without a development environment.
- Developer extensibility uses ABAP development tools in Eclipse (ADT) or ABAP in the cloud to write code inside the system. In Public Edition this is restricted to ABAP Cloud.
- Side-by-side extensibility runs outside S/4HANA on SAP BTP and talks to the system through released APIs and events. A later chapter covers BTP in detail.
Classic extensibility is the older approach: modifications, implicit enhancements, direct table access, and calls to any SAP function module. It works only where the customer controls the system.
Which edition allows what
| Option | Public Edition | Private Edition | On-premise |
|---|---|---|---|
| In-app (key user) | Yes | Yes | Yes |
| Developer (ABAP Cloud, released APIs only) | Yes, embedded steampunk | Yes | Yes |
| Side-by-side on BTP | Yes | Yes | Yes |
| Classic (unreleased objects, modifications) | No | Yes | Yes |
Private Edition and on-premise allow classic ABAP, but SAP recommends ABAP Cloud for new development so that custom code survives upgrades.
Seeing the difference in code
The first class uses only released APIs. It follows ABAP Cloud rules and can run in all three editions.
CLASS zcl_edition_probe DEFINITION PUBLIC FINAL CREATE PUBLIC.
PUBLIC SECTION.
INTERFACES if_oo_adt_classrun.
ENDCLASS.
CLASS zcl_edition_probe IMPLEMENTATION.
METHOD if_oo_adt_classrun~main.
out->write( cl_abap_context_info=>get_system_date( ) ).
out->write( cl_abap_context_info=>get_user_technical_name( ) ).
ENDMETHOD.
ENDCLASS.The second statement reads the unreleased table MARA directly. Classic ABAP allows it in Private Edition and on-premise. ABAP Cloud in Public Edition does not.
SELECT SINGLE matnr
FROM mara
INTO @DATA(lv_matnr).In an ABAP Cloud system, the syntax check reports that MARA is not released for use. The fix is to read a released CDS view, such as a released product view, instead.
Common errors
- Assuming code moves freely between editions. Classic code that reads unreleased tables will not move to Public Edition. Code written with ABAP Cloud moves in either direction.
- Using in-app tools for heavy logic. Key user logic suits small rules. Complex processing belongs in developer or side-by-side extensions.
- Choosing side-by-side for everything. Calls across systems add latency and an extra service to operate. Use it when the extension is loosely coupled or serves other systems too.
- Using classic modifications in Private Edition "because it is allowed." Modifications make later upgrades harder and cost the customer clean core benefits.
Exercise
A customer on Public Edition needs a new field on a sales order and a validation that calls a custom ABAP class using released APIs. A second requirement is a mobile app for field technicians that also reads data from a non-SAP system. Which extensibility model fits each requirement, and why is classic extensibility ruled out?
Show answer
The field uses in-app extensibility, because a key user can add it without code. The validation using a custom ABAP class on released APIs uses developer extensibility with ABAP Cloud. The mobile app that also reads a non-SAP system fits side-by-side extensibility on SAP BTP, since it is loosely coupled and integrates several systems. Classic extensibility is ruled out because Public Edition does not allow unreleased objects or modifications.