Skip to Content
Product Information

Integration of Custom Rate proposal SAP Cloud Platform Application to SAP C/4HANA Move In Process

Any coding or configuration examples provided in this document are only examples and are NOT intended for use in a productive system. The example is only done to better explain and visualize the possibilities with SAP Cloud Offerings.

The Objective of this blog post is to explain how the Move in process (Move In GAF) in SAP C/4HANA  can be integrated with the SAP Cloud Platform using Odata services and Rest services to propose the rate categories.

Prerequisites are

Basic knowledge of SAP C/4HANA  SDK, SAP Cloud Platform(SCP), OData, Web IDE.

Custom  ODATA which has got the details of Customer, Premise and various rate categories.

 

Below is the detailed scope of this Blog post: –

Part 1: Create UI5 App in SAP Cloud Platform by consuming OData.

  • 1) Create a Custom OData for an existing CDS View (SAP S/4HANA).
  • 2) Expose the OData using Cloud Connector.
  • 3) Wrapper UI for OData using UI5.

Refer the following Blog post which has details about the same.

https://blogs.sap.com/2019/02/11/building-sap-s4-hana-apps-on-sap-cloud-platform/

The SAP Cloud Platform application created for this integration would look as below. The SAP Cloud Platform application will have the customer information, premise information and there would be a provision to select the rate category.

 

  • 4) Implement the POST operation in the SAP Cloud Platform app

Implement the Post operation in SAP Cloud Platform app so that the required information is passed to the SAP S/4HANA system. The POST operation would be triggered on the click of ‘Accept’.

Pre-requisite: The table created in SAP S/4HANA( as per part2-step5)  has to be exposed as ODATA .

 

 

Part 2 -:- Integrating the SAP Cloud Platform App in SAP C/4HANA Move IN process using SAP C/4HANA  SDK.

The steps involved here are

  1. Extend the UtilitiesActionBO
  2. Add custom fields and custom actions.
  3. Enhance the screen to include the custom fields.
  4. Create script files for performing the custom implementation.
  5. Creation of a ztable in the SAP S/4HANA to persist the rate category selected from SAP Cloud Platform.
  6. Configure web service integration to call the OData REST service and bring the selected rate category to the SAP C/4HANA UI.
  7. Enhance the screen to include the custom action in the list.
  8. Call the REST service and bring the selected rate category to the SAP C/4HANA  UI.

 

Step1: Extend the UtilitiesActionBO

Add->New item- Business object extension

 

 

 

 

 

Step 2: Add custom fields and custom actions

Add a field ‘External Rate Proposal’.

The external Rate Proposal field is configured as webURI link. Click of this link will connect to the SAP Cloud Platform application created in  Part1.

 

Step 3: Enhance the screen to include the custom fields 

Enhance the screen and add the extension fields in the Move In GAF-Services

 

Add extension field to the list with an hyperlink.

 

 

Step 4: Create script files for performing the custom implementation.

 

 

 

Event:After Modify

The custom logic is performed in the event AfterModify such that whenever the external rate proposal link is clicked for a particular service in SAP C/4HANA  Move In process, a session identifier UUID is generated for that installation and passed to the SAP Cloud Platform application. In addition to session UUID, the BP Id and the installation ID can also be passed to the SAP Cloud Platform application.

The SAP Cloud Platform application created in part1 gets launched.

 

Step 5: Creation of a ztable in the SAP S/4HANA  o persist the rate category selected.

In SAP S/4HANA  system, create a ztable as shown, to persist the information passed to the SAP Cloud Platform app and also to persist the rate category chosen.

Expose the ztable created as a Odata service as mentioned in part1.

 

Step 6:  Configure web service integration to call the OData REST service and bring the selected rate category to the SAP C/4HANA UI.

Add new item service intergration ->external web service

 

 

Maintain the  Odata URL which was created in  step ‘Creation of a ztable in the  SAP S/4HANA to persist the rate category selected’.

 

 

Manage Communication Arrangement

This would launch the SAP C/4HANA UI. Check for the communication arrangements.

 

Step 7: Enhance the screen to include the custom action in the list.

Enhance the screen and add the extension fields in the Move In GAF-Services

Add Custom Action

 

Map the custom action to the Action created in the Action BO ( In step2).

 

Step 8: Call the REST service and bring the selected rate category to the SAP C/4HANA UI.

In the Custon action call the rest service to bring the selected rate category to the SAP C/4HANA UI,

In this example, the response will be either in XML/JSON format which needs to be parsed to get the rate category value.

Odata Json parser:

https://blogs.sap.com/2013/10/07/how-to-parse-a-string-in-json-format-in-absl/

 

Odata XML parser:

https://blogs.sap.com/2012/12/18/integration-of-sap-ondemand-products-with-business-suite-via-restodata-services/

 

 

Conclusion

Finally, after following the above mentioned steps, we have the rate category would be displayed in the SAP C/4HANA  UI after parsing. In this way, Move in process (Move In GAF) in SAP C/4HANA can be integrated with the SAP Cloud Platform using Odata services and Rest services to propose the rate categories.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Be the first to leave a comment
You must be Logged on to comment or reply to a post.