2007 Jul 27 5:06 AM
Hi,
I need to write a IDOC data to a flat file. How do i do this?
Is there any standard function module to read IDOC and write to file?
Pls help
Thanks
Hi,
I need to write a IDOC data to a flat file. How do i do this?
Is there any standard function module to read IDOC and write to file?
Pls help
Thanks
2007 Jul 27 5:12 AM
Hi
You need to do following -
1. first create a variable for structure EDIDC which will hold the control record information, if you are putting multiple IDOC's then this can be an internal table.
2. Create an internal table for EDIDD, which will hold the segment data.
4. Open a file in text mode.
5. Then for each IDOC first fill the EDIDC variable and write to the file.
6. For each IDOC fill the EDIDDD internal table as follows -
i) For each segment create a variable and fill the variable (structure) with relevant data.
ii)For each segment fill EDIDD work area and put that into SDATA field of EDIDD.
7. Write all records of internal table to the file.
8. Repeat 5-7 if there are more IDOC's to be written.
9. Close the file.
Hope this helps.
Regards,
RAVISH
<b>PLZ DONT FORGET TO REWARD POINTS IF HELPFUL</b>
2007 Jul 27 5:13 AM
Hi,
You can use the following FM.
IDOC_READ_COMPLETELY (Read IDoc Data)
IDOC_TYPE_COMPLETE_READ (Read IDoc Structure and Segments)
<b>
reward points if useful</b>
Regards
Ashu
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |