Blogs

Commerce Cloud Integration with S4/HANA


Order Management

Which extensions need to be activated in localextensions.xml?

saps4ombackoffice

This extension adds the s4OrderSimulation tab to the SAP Configuration entity in Backoffice. 

The SAP Configuration is assigned to the SAP Basestore. 

Different configurations for OM are available for activation (Synchronous Catalog Pricing, ATP Check, ) and keys must be maintained (Partner Function, and Condition Type Keys in S4/HANA)


saps4omservices

The connection to S4H OData APIs is established for order simulation, order placement, and order history.

https://api.sap.com/products/SAPS4HANA/overview


In Backoffice consumed destination s4omOrderDestination needs to be configured to connect to the S4H SAP Backend. 


Alias b2bCommercePlaceOrderStrategy is set to S4PlaceOrderStrategy. The default cart and checkout facedes are used to populate the Hybris cart, and trigger the calculation of the cart in the SAP Backend via the strategy.


SapS4SalesOrderSimulationService provides methods to use the A2X Order Simulation OData endpoint to simulate the cart. The destination s4omOrderSimulateDestination is used for this purpose. Available functions are:


Order Placement Hooks

Hooks are available to extend/modify the A2X Order Placement Calls:


Hooks can be used to perform validations before the order placement call occurs, or modify the cart. 

Custom hooks need to implement interface CommercePlaceOrderMethodHook, and be merged into the list sapS4PlaceOrderMethodHooks


saps4omfacades

Additional order populators are introduced:


Strategy added for retrieved billing and invoice documents for orders:

SapBillingInvoiceSalesOrderStrategyImpl


saps4omocc

S4H specific extensions to OCC v2 (REST API); at point of writing just schedule line data for order entry returns DTO.


Can you activate s4 OM extensions and old OMS/LORD Extensions at the same time?


LORD / old SAP Order Management Services extensions are:

sapordermgmtbol, sapordermgmtservices, sapordermgmtb2bfacades and sapordermgmtb2bservices


At the time of writing, the LORD classes can be still migrated and used in S4H On-Premise.


When the old OMS extensions are enabled as well, there's a conflict because the aliases cartFacade, b2bCheckoutFacade and b2bOrderFacade are overwritten to the OMS beans with perform the actions to perform the synchronous cart actions, load, update, read and save cart in SAP Backend.

DefaultSapCartFacade, SapOrdermgmtB2BCheckoutFacade, SapOrdermgmtB2BOrderFacade etc.


When the OMS extensions are enabled the S4 Place Order Strategy is not reached. In order to use both backends (Classic R3 and S4H) at the same time, standard facades need to be extended, to use the OMS facade for R3 Backend, and non-synchronous cart and checkout facade for S4 Backend. The CMS Site, SAP BaseStore or SAP Configuration can be extended to flag a site as S4 or R3 Backend.