Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
shirishsuman
Product and Topic Expert
Product and Topic Expert
648

Data exchange framework is used in SAP S/4HANA Service for the purpose of integrating or automatically creating follow-up documents outside of Service. This is especially important in the life cycle of the service order, where data exchange framework facilitates the creation of follow-up documents like sales order, maintenance order, purchase order etc.

Data exchange framework in general makes use of standard delivered classes from SAP. Normally there will be one standard handler class for each scenario. Refer below examples.

Follow-up document

Standard delivered SAP class

Sales order

CL_CRMS4_PROC_SALESDOC_FWD

Maintenance order

CL_CRMS4_PROC_MAINT_FWD

From the standard delivery perspective, forward handler class names are maintained in database table CRMS4S_EXCH_FCTR. Same way, backward handler class names are maintained in database table CRMS4D_SRV_BWD.

However, it is possible to override the standard implementing class with a custom handler class, and effectively also override the standard business logic. If there is any such requirement for business, then the subsequent steps provide detailed guidance to achieve this on project basis.

  • Create a custom class.
  • Inherit from the appropriate standard handler class depending on the scenario and requirement.
  • This way we ensure that the custom handler class inherits the methods from the standard handler class by default. This enables you to program the specific changes you require.
  • Redefine and rewrite the methods in custom handler class as required.
  • If you wish to influence forward data exchange, register your custom handler class in the below SPRO customizing activity.
    Customizing activity: Service -> Transactions -> Data Exchange in Service -> Define Custom Handler Classes for Forward Data Exchange

         shirishsuman_0-1706979308935.png

  • The primary keys (Identifier and Sequence indicator) of this entry should match with the primary keys of corresponding entry maintained in standard table CRMS4S_EXCH_FCTR.
  • If you wish to influence backward data exchange, register your custom handler class in the below SPRO customizing activity.
    Customizing activity: Service -> Transactions -> Data Exchange in Service -> Define Custom Handler Classes for Backward Data Exchange 

         shirishsuman_1-1706978792859.png

  • The primary key (Event) of this entry should match with the primary key of corresponding entry maintained in standard table CRMS4D_SRV_BWD.