Troubleshooting the ALE process
This tip by Raja Thangamani on troubleshooting ALE processes will show you how to determine what code an IDoc is executing and take you step by step through high level error resolution for outbound and inbound IDocs.
Introduction:
This tip will focus on troubleshooting ALE processes. It covers the following matrixes:
- How to determine what code the IDoc is executing
- Outbound
- Inbound
- High level error resolution for outbound/inbound IDocs
- Not sure if IDoc was created or received
- IDoc not created/received, which should have been.
- IDoc created, but not received by receiving application
- How to resend an IDoc.
- IDoc received, but not posted (inbound side).
- IDoc Batch Job:
Let's look at each in detail.
- How to determine what code the IDoc is executing:
In some cases, you may need to debug through the IDoc code to see where data is being pulled from and/or where the IDoc is failing. The following will provide this information for Outbound and Inbound ALE IDocs.- Outbound – IDoc can be created in 3 ways.
- Message Control
- Direct Path
- Change Pointers
- Outbound – IDoc can be created in 3 ways.
Message Control:
- Execute Transaction Code - WE20
- Select the logical system and double-click the message type under Outbound Parameter.
- Select the Message Control Tab
Note: This tab will be displayed if "Message Control" is used. In this case, message control is being used and Idocs will get created for every New and/or Change of delivery notes. If you don't see message control set up, go to Direct Path and changes pointers.
- Double-click on process code to see what code it is triggering.
- You can double-click on the inbound function module name to view code and set breakpoints.
- DO NOT DO IN PRODUCTION: Process an IDoc via BD87. And you should stop at the breakpoint.
Direct Path:
- DO NOT DO IN PRODUCTION: Debug program RSEOUT00 for direct path
- You can also look at transactions WE64, but not all process codes will be listed there.
Change Pointers:
- DO NOT DO IN PRODUCTION: Debug program RBDMIDOC for direct path
- You can also look at transactions WE64, but not all process codes will be listed in there.
So far we covered the Outbound process. Let's look at the Inbound Processes.
b. Inbound:
- Execute Transaction Code - WE20
- Select the logical system and double-click the message type you are looking for on the right hand side under "Inbound Parameter".
- Double-click on the process Code
Note: The function module name is in the "Identification" Field. This is what gets executed when the IDocs is inbound. The processing does many data validation checks and then updates the database tables.- You can double-click on the inbound function module name to view code and set breakpoints.
- DO NOT DO IN PRODUCTION: Process IDoc via BD87 and you should stop at the breakpoint.
So far we've seen what code an IDoc is triggering. Now lets see how to troubleshoot the problems.
- High level error resolution for outbound/inbound IDocs
- Not sure if IDoc was created or received
- IDoc not created/received, which should have been.
- IDoc created, but not received by receiving application
- How to resend an IDoc.
- IDoc received, but not posted (inbound side).
Case 1: Not sure if IDoc was created or received.
- Execute Transaction WE05; enter correct date/time frame and logical message type. (You can also search by a specific IDoc, see section Searching for a specific IDoc)
- Double-click on your valid Message type line to get a list of IDocs.
- See IDoc Statuses section to determine if IDoc(s) was successful or not. Note: there maybe several different statuses for a Message type so you may need to repeat steps 1-2 for the different status until you find your IDoc(s). If IDoc not found, go to IDoc batch job section and case 2 section.
- If IDoc is found in a successful status, go to case 3. If IDoc found in failed status, open status records folder and double-click on the failed status records to get error message as why IDoc failed.
Case 2: IDoc not created/received, which should have been.
- Use steps in case 1 to verify if the IDoc was created or not and successful or not.
- If IDoc is not found, validate job is running. See section IDoc Batch Job.
Case 3: IDoc created, but not received by receiving application.
- Use steps in Case 1 and 2 to verify if the IDoc was created or not and if IDoc is in a successful status or not.
- If the IDoc is in Yellow status (Status-30), you can push through Transaction code - BD87.
- If the IDoc is located and status is successful but receiver has not received the IDoc, execute transaction SM58 to determine if IDoc is stuck in the ALE/RFC layer. Enter a ‘*’ in all fields except leave Display period field with default values.
- Hit execute.
- If entries exist in SM58, look for Message Type. If message type exist and Run the Program "RSARFCEX"
- If after the RSARFCEX program has ran and IDocs are not in SM58, issue should be solved. Validate in receiving system via WE05 that the IDoc was received. If IDoc is still stuck in SM58, check RFC connection. Go to SE37, enter function module RFC_PING.
Note: In most of the case we'll not have access to SM59 to test the RFC Connection. - Hit test button, Enter RFC destination (the interface system of the IDoc). NOTE: when entering RFC destination, keep in mind the field is case sensitive.
- Hit execute button
- If function module fails, there is an RFC issue. Contact team, which creates the RFC Destination.
Case 4: How to resend the IDocs. We can segregate into 2 parts here:
- How to resend Master IDocs
- How to resend an Existing Idoc
Lets see the option 4a: How to resend Master Idoc Here i gave couple of Transaction to push the Master data.
- To push Material Master - use Tcode BD10
- To push Customer Master - use Tcode BD12
- To push Vendor Master - use Tcode BD14
- .....
Lets look at the option 4b: How to resend an Existing Idoc
- Execute transaction WE19.
- Enter the Idoc # you would like to resend in the Existing Idoc field.
- Select Execute
- Click on "Standard Outprocessing". Be very careful not to change the Idoc information. This gets save to the Database if changed
- Select Continue.
- Idoc has been resent. Notice the message IDoc no. ### saved in database. A new IDoc number has been resent but sent with same information.
Case 5: How to process an IDoc.
- After an issue has been resolved and/or you need to process an IDoc, besides processing IDocs via programs, you can also process IDocs via Transaction BD87
- Execute transaction BD87
- If you know the Idoc number, enter the Idoc number in the Idoc number field. If you need to process many Idoc numbers, you can also just hit execute.
- Hit execute
- Expand the Idoc(s) you would like to process.
- Select the Message Type you would like to process. Note: If you did not enter a specific Idoc number, when you select the Message Type, ALL of those Idocs for that message type will be processed.
- Click "Process" button.
- You results will be displayed (if Idoc processed successfully)
IDoc Batch Job. If IDocs are processed in SAP batch, validate the job is running via SM37.
- Typical Inbound jobs run programs:
- RBDAPP01 (posts IDocs)
- RBDMANIN (posts status 51 IDocs)
- RBDMIDOC (Change Pointers, can check via BD50)
- Typical Outbound jobs run programs
- RSNAST00 – WE15 (if using message control, can check via partner profile WE20). Also validate message control is set up properly via NACE. (Creates IDocs)
- RSEOUT00 (sends IDocs – we14)
- RSARFCEX (clears IDocs out of ALE/RFC layer)
- RBDMOIND (changes IDoc from status 03 to 12)
IDoc Statuses:
See table TEDS1 for all status codes via SE16 in SAP. Outbound ALE Status Codes
Successful Transmission:
- 03 - Successful outbound transmission
- 12 – Dispatch OK
IDoc being processed:
- 01 - IDoc created
- 30 - IDoc ready for dispatch (ALE service) (Program RSEOUT00 needs to be executed)
ALE Error Messages:
- 02 - Error passing data to port
- 04 - Error within control information on EDI subsystem
- 05 - Error during translation
- 25 - Processing despite syntax errors (outbound)
- 29 - Error in ALE service
- 32 - Resubmit edited intermediate document (DO NOT USE)
Syntax Error Messages:
- 26 - Error during syntax check of IDoc (outbound)
- Inbound ALE Status Codes
IDoc Processed Successfully:
- 50 - IDoc added
- 53 - Successful posting
IDoc ready for processing:
- 64 - IDoc ready to be passed to application. The IDoc will be passed to the application by program RBDAPP01.
Errors in IDoc Processing:
- 51 - Error - application document not posted
- 56 - IDoc with errors added (You should never see this error code)
- 60 - Error during syntax check of IDoc (inbound)
- 61 - Processing despite syntax error (inbound)
- 63 - Error passing IDoc to application
- 65 - Error in ALE service - indicates partner profiles are incorrect
- 69 - IDoc was edited
Raja Thangamani is working as an SAP Programmer Analyst at Yaltech consulting Inc.
This content is reposted from the SAP Developer Network.
Copyright 2007, SAP Developer Network
SAP Developer Network (SDN) is an active online community where ABAP, Java, .NET, and other cutting-edge technologies converge to form a resource and collaboration channel for SAP developers, consultants, integrators, and business analysts. SDN hosts a technical library, expert tips, exclusive downloads and code samples, an extensive eLearning catalog, and active, moderated discussion forums. SDN membership is free.
Want to read more from this author? Click here to read Raja Thangamani's Wetip. Click here to read more about ABAP on the SDN.