IDOC not reaching PI/PO from SAP S4 HANA | Commit Fault Error in SM58 due to special characters in IDOC segments
This blog covers an additional analysis on SM58-Commit Fault Error occurring when an IDOC is triggered from SAP S4 HANA and does not reach PI/PO system.
It is in common parlance/practice that the following possible causes for Commit Fault error occurring between SAP and PI/PO are generally looked for whenever such error is reported:
- PI/PO IDOC metadata issue
- Missing ICO/configurations in PI/PO
- temporary cache issues in PI/PO
- Incorrect receiver determination conditions at PI/PO
- issue with NWA RFC destination
However, we encountered a situation where despite having negated all the above possibilities, error was still reported. Having tackled a similar situation sometime earlier, it struck us then, that addition of special characters like arrow symbol –> in IDOC might also cause an error.
Acting on this cue, we tried analyzing and solving the same and achieved success and would be more than happy to share this with the community of expert SAP Consultants who may benefit when faced with identical situations.
Scenario : SAP S4 HANA system triggers and IDOC to SAP PI/PO system, but the IDOC cannot be traced/found in SAP PO system even though the IDOC shows successful at WE02 in SAP S4 system
Troubleshooting usually done :
Check SM58 if IDOCs are held up there due to Commit Fault error and check relevant PI/PO ICO configs, receiver determination conditions, IDOC metadata etc.
In maximum cases, its either one of the above issues mentioned above but there is one more addition to the above list : If the IDOC contains any special characters (such as arrow -> symbols etc.) in it, then too, an IDOC can fail at SM58 with Commit fault error
if we try to Execute LUW on that IDOC from SAP SM58, and parallelly check IDOC sender channel logs in SAP PI/PO, we will get the below logs in SAP PI/PO which is inconclusive.
Alternatively, we can check log traces from SAP PI/PO NWA –> Goto NWA –> Troubleshooting –> Logs and Traces –> Log Viewer) for additional info
Question Arises on how to study/analyze the IDOC for special characters when IDOC itself is not reaching PI/PO system?
- Get the IDOC no. from SAP team or from WE02
- execute T-code SE37 in SAP
- Execute function module: IDOC_XML_TRANSFORM and input the IDOC no.
- We would get the IDOC XML on screen
(Kindly Note : This IDOC is not properly formatted and will have spaces after starting tag < and before closing tag >, so we need to format this XML in an XML editor such as notepad++)
How to check for special characters in XML :
- Post formatting the XML we can check if its valid/properly formatted in online compliers such as freeformatter website
- While checking its validity itself we will get to know the positions where it has special characters.
Figure 4. Getting the compiler error on online free formatter website which clearly shows the position of special character in XML
- We can check the above mentioned line no. for clarity
Figure 5. Position of special character
- Due to the above special character (arrow symbol), the IDOC was failing with commit fault error in SM58
To verify if special character was causing this issue :
- Execute WE19 in SAP,
2. Navigate to the segment having special character (double click on parent segment, in this case it was E1KNVVM, we can see that this special character will be visible as # here)
3. Remove this special character from that segment and retrigger this IDOC by clicking on standard outbound processing to see it successfully sent to PI/PO now
In a nutshell, If an IDOC between SAP S4 HANA and SAP PI/PO system fails at SM58 with Commit Fault Error and despite all troubleshooting, if the issue still persists, one may look into the contents of the IDOC as well if it contains any special characters.
Hope this blog gave a different perspective on such type of error and will be relevant to the PI/PO Developers/Consultants. More insights/comments or feedback/suggestions if any on this topic are welcome.
Outbound EDI PO Change stuck in SM58 with PI 7.31 Single Stack | SAP Community
“Commit fault: ASJ.ejb.005043 (Failed in component: sap.com/com.sap.aii.ad” error Outbound PO 7.50 | SAP Community
Thanks for the helpful blog!