Download IDoc data from SAP Table
By Imran, Mohammad March 02, 2022 under SAP ECC/S4HANA
We oftenly need to check the an IDoc that what data we passed in it but we are not sure which IDoc it was. So checking one by one in WE02 will be a very difficult task if you have a lot IDocs posted on the day. You can do it by browsing some of IDoc related tables.
Run the table called EDIDC from se16n and enter the details in the fields below to fetch certain IDocs.
- STATUS - Enter 51 on IDoc Staus field or any other status which you want to fecth the IDocs for, As an example 51,64 or 53. But we mostly extract failed IDocs so 51 is the staus for failed IDocs.
- CREDAT - It is important to enter from date and to date so that you have only those IDocs which fall between that time period.
- Message Type - It is also important to note that you are entering Message Type otherwise you will end up having a lot of IDocs listed, for other objects too.
Now, in the next screen you will have the list of the IDocs. Export it as excel and copy the IDoc numbers.
Now, run another table called EDID4. This table holds the IDoc contents.
- Copy all your IDocs and paste them in the field called DOCNUM.
- Check the segment, which one has the data you are looking for, then put that segment number in the field called SEGNUM.
- SDATA is the field which has the IDoc contents. You will need excel Text to Column feature. The entire data of the IDoc is written in single field called SDATA. So this feature which is Text to Column in excel can give all the data in various columns.
If you have very large volume of IDocs then I will recommend to use BODS, you can import these two tables. Extract data from EDIDC by putting certain filter. Then put a joining with EDID4 to fetch SDATA. Now, you waill have all your IDocs with SDATA in a table or in fileformat(.txt). You can even apply substr funtion on SDATA to truncate additional data.