Hi Guys,
Long time haven’t posted an article, Cuong Dang is back :).
Today tips will show you how get pending IDOC Number in Outbound Queue (SM58) from transaction ID (TID).
First, the flow below is data flow for outbound IDOC from SAP S/4 to SAP PO or third-party system using IDOC technology.
1| IDOC FLOW

2| Issues
In some scenarios, message stuck in outbound queue and you want to finger out what idoc number based on Transaction ID (TID). in SM58

3| Find IDOC Number from Transaction ID
3.1| Go to Tcode SM58, download error messages

3.2| Remove all unnecessary

3.3| Copy to Excel
Here you have all transaction ID, just remove duplicate lines.

4| Seach Transaction ID in IDOC table
4.1| IDOC Table name
Access TCode: SE16, table: EDIDS

4.2| Search transaction ID (TID)

Here you can see transaction ID mapped with SAP IDOC Number

5| Check IDOC content in IDOC workbench
TCode: WE02


Thanks and hope it useful to check integration data flow.
Cuong Dang