Outbound idoc processing

Process diagram

The diagram below demonstrates generalized outbound idoc processing (SAP ECC/S4 → SAP FSM).

 

Additional process description

 

Selection class - examples of selection logic

Object assignment check

For the case of activities, check if any sales area is maintained for the target company and object ‘ACTIVITY’ in Sales Area assignment. If not, the object is not relevant for transfer.

 

Activity mapping check

Ensure that the activity’s type can be found in the activity type mapping - transaction /PACG/ECM_ACTMAE - Activity code mapping.

 

Class /PACG/ECM_CL_S_IDOC

The final result of output idoc class processing is the idoc data table which will be passed back to function /PACG/ECM_S_IDOC_OUTPUT and then method CREATE in class /PACG/ECM_CL_S_IDOC.

 

Hash handling

If no exception was raised and the class assignment configuration has the ‘Use hash’ checkbox set, a hash will be created for the transferred object in method HASH_HANDLING of class /PACG/ECM_CL_S_IDOC.

Please note that starting from Release 2202, use hash option will be always defaulted to true and hidden from the below view.

 

Hash handling prevents resending of already transferred idocs. A hash is created for this object based on the idoc’s content. If the same hash has been generated before for this company, message type and object number (can be found in table /PACG/ECM_AHASH), the ‘forcesend’ parameter must be checked. In such a case the old hash will be overwritten. Otherwise, the object won’t be transferred at all.

 

The idoc will be distributed using the SAP standard function ‘MASTER_IDOC_DISTRIBUTE'.

 

Idoc processing

A function module responsible for idoc processing is assigned to ports in transaction WE21.

 

Idoc segments are read with the function 'EDI_DOCUMENT_OPEN_FOR_PROCESS' based on the imported document number.

 

XML transformation

It is in method /PACG/ECM_IF_S_CHANNEL~SEND of class /PACG/ECM_CL_S_CHANNEL_XML_WS where the XML transformation is called.

 

The transformation logic is the same for all message types apart from /PACG/ECM_ATTCHMOUT, /PACG/ECM_CHECKLIST_D_O and /PACG/ECM_GENERIC. The outgoing class assignment configuration is read to retrieve the XSLT transformation program name and call it.

The source XML will be transformed to FSM-friendly format (tag names corresponding to SAP FSM property names). Before transformation. the XML reflects the idoc field names, as shown below:

 

After successful transformation, the XML’s tags correspond to SAP FSM property names:

 

The XML is then converted into UTF-8 string and certain ASCII codes are removed from it.

 

Proxy - send the data to the Message Broker

Before sending the data to the Message Broker, the logical port is determined from mapping in table /PACG/ECM_CACC (to be customized with transaction /PACG/ECM_CACC - Company account assignment).

 

The method ‘SEND_XML_MESSAGES’ of class /PACG/ECM_CL_S_WS_PROXY is used to pass the XML to a webservice. Sending of XML will be repeated up to 30 times (the loop will be escaped once the sending is successful). Sending failures might be caused by Message Broker disfunction or internal network issues.

If you'd like to help us improve the documentation, please provide your feedback using the communication channels listed /wiki/spaces/PFCC/pages/1561427969. Learn about support possibilities here.