在SAP C4C里使用ABSL结合Restful服务的方式消费SAP S/4HANA的标准功能,用于SAP和沈阳自动所关于工业4.0 联合创新

I have a requirement recently to trigger the creation of the corresponding S/4HANA outbound delivery document in SAP Cloud for Customer.


The basic idea is to replicate Sales order created in SAP C4C into S/4HANA, trigger the production and delivery process. Once the production is finished in S/4HANA, it is required to trigger the outbound delivery creation in C4C Sales Order UI.


(1) The easiest part is to implement the outbound delivery creation in S/4HANA using function module BAPI_OUTB_DELIVERY_CREATE_SLS.在SAP C4C里使用ABSL结合Restful服务的方式消费SAP S/4HANA的标准功能,用于SAP和沈阳自动所关于工业4.0 联合创新在SAP C4C里使用ABSL结合Restful服务的方式消费SAP S/4HANA的标准功能,用于SAP和沈阳自动所关于工业4.0 联合创新The idea is first to read Sales Order line item detail via function module BAPISDORDER_GETDETAILEDLIST, then BAPI_OUTB_DELIVERY_CREATE_SLS did the job.


Replace your actual Sales Order ID with the hard coded value in line 21.在SAP C4C里使用ABSL结合Restful服务的方式消费SAP S/4HANA的标准功能,用于SAP和沈阳自动所关于工业4.0 联合创新Create a new SICF service node and wrap the above ABAP code into the method HANDLE_REQUEST of the service node’s handler class.


For more detail about ABAP SICF handler class, please refer to my blogs:


ABAP ICF handler and Java Servlet

Export WebClient UI table to PDF


(2) Create a new action triggerOutboundDelivery in Business Object CustomerQuote which is the data model of Sales Order TI page in C4C.在SAP C4C里使用ABSL结合Restful服务的方式消费SAP S/4HANA的标准功能,用于SAP和沈阳自动所关于工业4.0 联合创新It’s time now to consume the S/4HANA SICF service created in previous step as a restful service in this custom BO action implementation.


Some necessary model must be created as prerequisite before we start to implement service consumption in ABSL code.

Create a new External Web Service Integration named “JerryExternal”:在SAP C4C里使用ABSL结合Restful服务的方式消费SAP S/4HANA的标准功能,用于SAP和沈阳自动所关于工业4.0 联合创新在SAP C4C里使用ABSL结合Restful服务的方式消费SAP S/4HANA的标准功能,用于SAP和沈阳自动所关于工业4.0 联合创新在SAP C4C里使用ABSL结合Restful服务的方式消费SAP S/4HANA的标准功能,用于SAP和沈阳自动所关于工业4.0 联合创新在SAP C4C里使用ABSL结合Restful服务的方式消费SAP S/4HANA的标准功能,用于SAP和沈阳自动所关于工业4.0 联合创新在SAP C4C里使用ABSL结合Restful服务的方式消费SAP S/4HANA的标准功能,用于SAP和沈阳自动所关于工业4.0 联合创新在SAP C4C里使用ABSL结合Restful服务的方式消费SAP S/4HANA的标准功能,用于SAP和沈阳自动所关于工业4.0 联合创新Now we can start to program in Sales order’s action triggerOutboundDelivery using ABSL.

The restful service consumption is fired by ABSL utility method WebServiceUtilities.ExecuteRESTService. We can figure out its signature via code auto completion:在SAP C4C里使用ABSL结合Restful服务的方式消费SAP S/4HANA的标准功能,用于SAP和沈阳自动所关于工业4.0 联合创新在SAP C4C里使用ABSL结合Restful服务的方式消费SAP S/4HANA的标准功能,用于SAP和沈阳自动所关于工业4.0 联合创新在SAP C4C里使用ABSL结合Restful服务的方式消费SAP S/4HANA的标准功能,用于SAP和沈阳自动所关于工业4.0 联合创新在SAP C4C里使用ABSL结合Restful服务的方式消费SAP S/4HANA的标准功能,用于SAP和沈阳自动所关于工业4.0 联合创新在SAP C4C里使用ABSL结合Restful服务的方式消费SAP S/4HANA的标准功能,用于SAP和沈阳自动所关于工业4.0 联合创新













上一篇:JAX-RS(基于Jersey) + Spring 4.x + MyBatis构建REST服务架构


下一篇:戴尔存储副总裁谈戴尔-EqualLogic一周年庆