Technical Articles
Extensibility in the SAP S/4HANA Cloud, extended edition
In this blog, I will present extension scenarios frequently seen in the Customer’s SAP S4/HANA Cloud, extended edition.
I will be discussing the following scenarios under this blog.
A. Create a report with a custom input in an SAP S4/HANA Cloud, extended edition system.
B. Create a custom validation in a standard Fiori application in an SAP S/4HANA Cloud, extended edition system.
C. Add a Custom field to an existing UI.
D. Create a Side by Side Extension/ Application.
Scenario A. Create a report with a custom input in an SAP S4/HANA Cloud, extended edition system
This request would typically be originating from the cases where an existing standard report misses out on some functionalities that the customer expects.
Here are the steps to create a custom report with a custom input.
- Connect the SAP S/4HANA Cloud extended edition system to SAP Analytics Cloud via Live connection.
-
- Create custom CDS views by joining multiple CDS views and making sure that all the required fields are available in the final custom CDS view.
-
-
- Search for the Application Custom CDS views in the SAP S/4HANA Cloud Extended system.
-
-
-
- Click on Create Button to add a custom CDS view.
-
-
-
- Create the custom CDS view by joining the required tables and Publish the view.
-
You can also refer the note, 2936504 – How to enable In-app extensibility Fiori apps in SAP S/4HANA Cloud, extended edition on how to create custom CDS views in an SAP S/4HANA Cloud Extended system.
-
- The created custom CDS views, can be exposed via the transaction /IWFND/MAINT_SERVICE as OData services. You can refer the blog, How to discover SAP API’s in SAP S/4HANA Cloud, extended edition on how to expose the service.
Once the service is exposed, it will be available in the list of services under the transaction /IWFND/MAINT_SERVICE.
This service could be accessed via the generated URL of the OData service as shown below.
-
- The CDS views can be accessed from the SAP Analytics Cloud via setting up a live connectivity between the backend system and SAC.
- Make sure that CORS is setup in the EX system before you connect SAC with the backend, the document Live Data Connection to SAP BW Using a Direct CORS Connection via Unified Connectivity, provides the detailed steps for how to check this.
- Once this is setup, you can connect the SAP S/4HANA Cloud, extended edition system to SAP Analytics Cloud. You could refer to the blog, ABAP CDS-Views and SAP Analytics Cloud (SAC) via Live Connection, which have described the entire process in excellent detail.
- If Solution 1 does not work, an ABAP report for this functionality will have to be developed in the S/4HANA Cloud Extended system (Configuration Client). Additionally, you could also refer to the blog Adding Custom Program to Fiori Launchpad
Scenario B: Create a custom validation in a standard Fiori application in an SAP S/4HANA Cloud, extended edition system
Here are the steps to create a custom validation.
- Cloud BAdI implementation via In App Extensibility.
SAP S/4HANA Cloud, extended edition has a powerful In App extensibility framework, where the customer can implement custom BAdIs.
-
- Search for the application Custom Fields and Logic.
-
- Select the tab Custom Logic and click on the Add button to find the right enhancement implementation for your use-case.
-
- Click the Create Button to add a new BAdI implementation.
This will create a cloud BAdI and you can write your custom implementations and validations here.
You can refer the note 2936504 – How to enable In-app extensibility Fiori apps in SAP S/4HANA Cloud, extended edition, on how to implement a Cloud BAdI in in SAP S/4HANA Cloud Extended. You can also skip to Scenario C: Add a Custom field to an existing UI, where this process is explained in detail.
But as you can see from the Note, it is quite possible that a Cloud BAdI does not exist for a specific use-case that the customer wants to implement. In such cases the customer can explore the following 2 options. Scenario B.2 and Scenario B.3.
- Enhance the application via finding the application ID from the Fiori Apps Library.
- Find the standard BAdI in the backend SAP system (Configuration Client) and then implement the custom validation to return the error message to the UI.
This could be explained with the following example, which explains, how to proceed with an enhancement, if a cloud BAdI that exists in SAP S4/HANA Cloud, essentials edition, does not exist in SAP S4/HANA Cloud, extended edition.
Let’s say, you want to add validations while performing “Post Goods Receipt for Purchase order”.
A cloud BAdI is already available for this as per, App Extensibility: Post Goods Receipt for Purchasing Document, for SAP S/4HANA Cloud, essentials edition.
Screenshot from SAP S/4HANA Cloud, essentials edition.
But this BAdI is not available for SAP S/4HANA Cloud, extended edition.
As you can see, this application is missing from SAP S/4HANA Cloud, extended edition.
This means that customer will have to rely on the 2 solutions provided above.
-
- Enhance the application via finding the application ID from the fiori apps library.
For this, access the Fiori Apps Library.
Search for the Post Goods Receipt for Purchase order app (
-> Go to ‘Implementation Information’
-> Select your product -> SAP S/4HANA 1909 FPS01
-> Check the result in ‘Extensibility’ menu
If we follow that path, we will have the ‘BSP containing SAPUI5 application’ GR4POS1 displayed.
This BSP application can later be enhanced and the required validations can be written to the application.
-
- Find the standard BAdI in the backend SAP system (Configuration Client).
Since the use-case is posting of goods receipt, we can use the standard enhancement, MB_GOODSMOVEMENT for goods movement
Select the BAdI definition MB_BAPI_GOODSMVT_CREATE which is triggered while a Goods Movement is posted.
Create a custom implementation for this BAdI to write the custom validation logic while performing the GR posting.
Scenario C: Add a Custom field to an existing UI
To add a new field to an existing UI in SAP S4/HANA Cloud, extended edition, you could go for In-App extensibility.
Here are the steps for this.
- Create a new field via the Custom Fields and Logic application and enable the usage of this field in the required application.
-
- The following example shows, how to add and populate a new field in a Purchase Order header.
- Search for the application Custom Fields and Logic (Configuration Client).
- The following example shows, how to add and populate a new field in a Purchase Order header.
-
-
- Create a new field by clicking Add, under the tab Custom Fields (Configuration Client).
-
-
-
- Mention the business context in which the new field is to be added, give a label for the field, and maintain the field type and click on Create and Edit.
-
-
-
- A new field will be created.
-
-
-
- Enable the application in which the field needs to be displayed, by clicking on Enable Usage (Manage purchase order in this case).
-
-
-
- Save and Publish the field.
-
-
-
- Open the Manage Purchase Order application using a user with customizing authorization (Test Client).
- Open the screen at which the new field needs to be added.
- Click on the user icon and select Adapt UI to enable editing.
-
-
-
- Right click on the UI and select Add Field.
-
-
-
- Select the newly added field from the popup.
-
-
-
- This will add the field to the screen.
-
-
-
- Save and Publish the field.
-
-
-
- Once the field is added, an enhancement implementation is required for the field to be populated at runtime.
- For this, create a new enhancement implementation by clicking Add, under the tab Custom Logic of the application Custom Fields and Logic (Configuration Client).
-
-
-
- Select the business context and BAdI description for the field to be populated. Give a name for the implementation description and click on create.
-
-
-
- Write the logic for populating the field.
-
-
-
- Save the draft and click on Publish to publish the logic.
-
-
-
- The data is filled based on the logic, when a new Purchase Order is created (Test Client).
-
-
- (Due to advances on extensibility for SAP S/4HANA Cloud this note is now DEPRECATED) If the required application is not available in the list of Applications available for extension, the customer should proceed with extending the Include/Structure with which the standard GUI application can be enhanced. You can refer to the note 2920697 – Extensibility Guide for SAP S/4HANA Cloud, extended edition for referring to allowed enhancements to DDIC structures
- Please refer to following information below for the newest information on extensibility:
https://launchpad.support.sap.com/#/notes/2923223
https://launchpad.support.sap.com/#/notes/3088062
https://launchpad.support.sap.com/#/notes/3126893
Extensibility Explorer — https://extensibilityexplorer.cfapps.eu10.hana.ondemand.com/ExtensibilityExplorer/#/ReadMore
SAP Community landing page for Embedded Steampunk – https://community.sap.com/topics/s4hana-cloud-abap-environment
Scenario D: Side by Side Extensions
As explained in Scenario A: Create a report with a custom input in an SAP S4/HANA Cloud, extended edition system, any OData and CDS views from an SAP S/4HANA Cloud, Extended edition system could be exposed via SAP Cloud Connector. This means that you will have a large list of APIs available from the SAP S/4HANA Cloud, extended edition system for consumption.
You can use these APIs to create Side by Side applications based on data pulled from an SAP S/4HANA Cloud, extended edition system.
You could follow the detailed tutorial Consume Data from an ABAP System Using the Cloud Connector which is available on the developer community which provides an excellent step by step guide for the same and you will be able to access data from the S/4HANA Cloud, extended edition system, from your own custom application.
Thanks for the great sharing, Prasanth!