✒️ABAP El testing y el reproceso de un idoc
ABAP El testing y el reproceso de un idoc
Testing and Reprocessing of an IDoc
Introduction to IDoc Testing
You can access IDoc testing transactions from the WEDI menu. There are different types of testing for various stages of ALE message sending or receiving:
- Generation of outbound messages.
- Generation of inbound IDocs.
- Resending outbound IDocs.
- Outbound IDoc processes from the NAST table.
All these tests are used to verify from message generation and IDoc creation to port sending and final delivery status.
Transaction WE19
It's used for testing inbound or outbound IDocs:
- In inbound IDocs, it checks for the correct connection and the execution of the process code (function module).
- Since the IDoc generation is manual, segment generation functions cannot be tested via this transaction.
- In outbound IDocs, it verifies the post-sending process execution. It's useful for ABAP type ports to ensure the corresponding function module runs correctly. The IDoc generation isn't tested here as it's loaded manually.
Outbound IDoc Testing
To test an outbound IDoc, the best approach is to execute the transaction that generates the corresponding IDoc. This ensures the entire circuit is executed (function module generating segments, IDoc sending, and port function module for ABAP ports).
For individual testing of an ABAP port function and debugging the program, you can directly access it from transaction SE37 and execute the function module assigned to the ABAP port, passing the IDoc number as a parameter.
Through transaction WE14, an IDoc with a status other than 53 ("processed correctly") can be sent to the outbound port.
Using transaction WE15, an IDoc that remained in the output queue (NAST table) can be sent.
Inbound IDoc Testing
You can test an inbound IDoc from transaction WE19. Using this transaction, you can test the entire inbound process, from partner agreement determination to business document generation. You can also inform the function module that will generate the business document without having the inbound interface configured (partner agreement).
Another way is for the external system that should interact with SAP to send the IDoc for testing. If you have a file with the IDoc to test (or process), you can execute the EDI_DATA_INCOMING function module.
IDoc Status Codes
There are different status codes for IDocs that inform the responsible user about processed stages and errors in the process. IDoc statuses are cumulative, and through monitoring transactions, you can see the IDoc history.
Status codes vary depending on whether it's an inbound or outbound IDoc. Statuses for outgoing IDocs range from 01 to 49, while inbound IDoc status values start with 50.
To obtain a list of all possible IDoc statuses, you can access transaction WE61 and view the generic control record.
You can change the status of an IDoc by executing the standard program RC1_IDOC_SET_STATUS. On the selection screen, you need to enter the IDoc number, message type, current status, and new status. You can also check a box if you want to execute the report in test mode.
Listing and Viewing IDocs
Transactions WE02 and WE05 are used to obtain a list of received and sent IDocs. The list can be filtered by:
- Processing date
- Message type or base type
- IDoc direction (inbound or outbound)
- IDoc number
- Partner agreement information, etc.
There isn't much difference between standard transactions WE02 and WE05. Both transactions are linked to the same standard program RSEIDOC2 and used to verify a created IDoc. The reason for having these two transactions instead of one is related to existing authorization objects in the standard system. In conclusion, you can use either of the two transactions.
Reprocessing of IDocs
IDocs with errors can be modified and reprocessed. To reprocess an inbound IDoc, use transaction BD87.
You can select individual IDocs, groups by status or message type, etc. Additionally, you can specify the IDoc number to be reprocessed.
Reprocessed IDocs will be updated with a new entry in the status list.
For reprocessing and resending outbound IDocs, transaction WE14 is also used.
Any IDoc with a sending error status or grouped for sending will be sent to the preselected outbound port in the partner agreement.
 
 
 
Sobre el autor
Publicación académica de Jaime Eduardo Gomez Arango, en su ámbito de estudios para la Carrera Consultor ABAP.
Jaime Eduardo Gomez Arango
Profesión: Ingeniero de Sistemas y Computación - España - Legajo: SW34C
✒️Autor de: 108 Publicaciones Académicas
🎓Cursando Actualmente: Consultor ABAP Nivel Avanzado
🎓Egresado del módulo:
Disponibilidad Laboral: FullTime
Presentación:
Ingeniero de sistemas y computación con 8 años de experiencia el desarrollo frontend & backend (react/node) y en cloud (aws), actualmente desarrollando habilidades en sap btp, ui5, abap y fiori.
Certificación Académica de Jaime Gomez