This type of error happens when SAP does not know which port it should send the IDoc to. You will typically see this error when dealing with IDocs or Intermediate Documents. If you need a refresher on IDocs, you can refer to the following posts:
- Guide to Troubleshooting IDocs: SAP Functional Consultant
- SAP Interfaces In A Nutshell | RFC, BAPI, IDOC, EDI, ALE, UDDI, SOAP, WSDL, REST, API, FTP, SFTP
- How to Resolve SAP IDoc Error Passing Data to Port?
- How was the Receiver Port determined?
- How to Reprocess A Failed IDoc or IDoc with Error (Status 02)?
- What is the Difference between transaction code WE20 and WE21?
How to Resolve SAP IDoc Error Passing Data to Port
The nature of this error falls under missing configurations in WE21. SAP does not know to what port it should send the IDoc to.
Notice the latest status in the Status Records portion. If you double click on the highlighted log, it shows the error “Could not find code page for receiving system”.
For this image, let us focus on Port “A00000000X” as an example. We will talk about this later on.
Example Scenario – Intercompany Billing
To make are example realistic, I will consider the scenario where an intercompany billing document output is triggered via transaction code VF31. This output should post the relevant partner company code accounting document in the intended system.
Additional Information: For those of you who are interested, this example focuses on intercompany billing processes. The billing document output RD04 is used to generate an IDoc. The IDoc in turn, creates another IDoc for the creation of partner company code accounting document postings. Refer to the image below for a quick overview on the flow.
Triggered through VF31 Billing Document RD04 Output > Outbound IDoc > Inbound IDoc > SM35 Batch Session > Accounting Document.
High-level explanation: SAP is trying to create another document / posting by sending data via IDocs. The issue or error now lies during the movement of IDocs because SAP is having troubles determining the path or port it should take. Thus, the “Could not find code page for receiving system”.
Transaction Code WE21
Recall our WE09 screenshot where we focused on Port “A00000000X” as an example. The IDoc is trying to send data to this port. As such, we will call this as a “Receiver Port”.
We will now go to transaction code WE21 to check on the missing configuration.
Common root causes and their fixes:
- Root Cause: The current SAP system was a copy of another SAP system and the configurations were copied as well.
- Common Fix A: You need to double check on the port and modify any misaligned setup or instances where the setup is incorrectly pointing to.
- Root Cause: The port being utilized in the IDoc does not exist.
- Common Fix B: You need to create the port.
Common Fix A
The port in concern has an entry under Transactional RFC, double click on it and review the settings. Focus on the RFC destination as well. It is possible that it is pointing to the wrong configuration. If it is, simply type in or choose the proper RFC Destination.
How do I review or check on the RFC destination settings?
You can go to Transaction code SM59 to check on the RFC destination settings. In our example, it is maintained under Connection Type 3 ABAP Connection.
Here you can do a connection test to see if SAP is able to reach this RFC destination. You can also check on other settings such as Logon & Security, Technical, Administrative, etc.
Common Fix B
The port in concern does not exist in WE21 so you need to create it. Simply click on “Transactional RFC” and then click on the Create button (highlighted in red).
In our example, we need a specific port named “A00000000X” so our screenshot shows the selection “own port name”. Click on the check button to proceed further and save.
How was the Receiver Port determined?
For the IDoc in error, we will now focus our attention to the Partner Type specified in the IDoc. Let us say the Partner No. is 1000000 with Partner Type KU.
To further check on the configuration, we need to view the Partner Profile settings in Transaction Code WE20.
Transaction Code WE20
First locate the Partner Type in concern. In our example it is KU for Customer. Afterwards you can locate the Partner Number and click on it. In our example it is 1000000.
Look through the outbound parameters, select the Message Type line in concern (INVOIC) and click on the magnifying glass (highlighted in red).
You will see a similar screen below.
Notice how the Receiver Port is set to “A00000000X”. In a way, we have established a high-level link between Transaction Codes WE20 and WE21 (including how the receiver port was determined).
How to Reprocess A Failed IDoc or IDoc with Error (Status 02)
You are finally done with the checks and configuration fixes. This time, you need to ensure the concerned IDocs are successfully processed. The problem is, your idoc is stuck in error Status 02.
Transaction Code BD87
It is possible to reprocess an IDoc that encountered errors. To do this, go to transaction code BD87. Narrow down the IDocs in concern by specifying parameters.
My preference is to enter the IDoc numbers so that I am sure that I will only be reprocessing those specific IDocs. I will just copy the IDoc numbers from the WE09 results.
Afterwards, you can select the IDocs and go to Edit > Restrict and Process.
You should arrive at the “Manual Processing of IDocs” screen where you can click on the execute button.
Note: In some cases, it is possible to process the IDocs in foreground (which serves as additional troubleshooting). Thus, the usage of Restrict and Process option.
If reprocessing successful, you should have similar entries below where Old status is 02 and New status is 03.
What is the Difference between transaction code WE20 and WE21?
WE20 – focuses on PARTNER profiles (is it a customer, vendor, logical system, bank? etc.) while WE21 focuses on PORTS for IDoc processing (basic setup: where should the idoc go?).
The ports also have the additional capability to create files from outbound idocs but that one isn’t as “basic” as “where should the idoc go?” explanation. I will cover that in another post.
- How to Resolve SAP IDoc Error Passing Data to Port – WE21 + SM59 Check Port and RFC Destination
- How was the Receiver Port determined – WE20 Check Partner Profiles
- How to Reprocess A Failed IDoc or IDoc with Error (Status 02) – BD87
- What is the Difference between transaction code WE20 and WE21? WE20 – Partner Profiles while WE21 – Ports
I hope this helps. Good luck! 😊
One thought on “How to Resolve SAP IDoc Error Passing Data to Port – Root Cause and Fixes”
Thank you, the topic is explained very detaily and understandable