Showing posts with label Hybris Commerce Integration S4 for Invoice document. Show all posts
Showing posts with label Hybris Commerce Integration S4 for Invoice document. Show all posts

April 2, 2023

SAP Hybris/SAP Commerce Invoice Integration With S4


SAP Hybris/SAP Commerce Invoice Integration With S4 

The Integration is to connect with S4 Hana System via SAP CPI and to get order-related details like 

Order Status, 

Invoice Document, 

Delivery Document, 

Order Confirmation and

Order Acknowledge Document.

When we placed the Order from B2B Side, Order will reach to S4 Hana via CPI. On S4 Hana system the interim order gets created which get converted to sales order once the business acknowlege it for the interim order the sales order get created based upon the Q factor check in S4, like product availablity, Inventory, Price logic execution, for the sale order have its own order status and sales order document.

We have to show same order status on Order History Page and Order Details Page FOR SALES ORDER. Also document related information we will show on order details page.

Invoice Integration is a synchronous integration, real time the call is been made to S4 passing the sale order no, to get the information back to Commerce from S4.

ODATA URL Patterns :- 

https://*-*.hcisbt.eu1.hana.ondemand.com/http/Commerce/S4/InvoiceNumber/Enviroment Id

Request Body which we will pass to CPI  is from SAP Hybris/SAP Commerce

{

  "sapOrderCode" : "130320"

}


Response :-

Response body will get order status and delivery ASN, invoice document number, etc as string for all  document present in S4 Hana system

From B2B Side we will convert Hex String into PDF and same we will show on B2B Side.

OOTB -> OrderPopulator we need to override – To show the document related information and keep it in target object, later in service layer, we can write the logic to convert hex to PDF document dynamically.