‎2014 Aug 20 6:58 AM
Hi
I have to object in which I have to Z program which will generate the idoc and pass it to PI system. Can anyone guide me in how to generate IDOC through ABAP custom program. Just need a little guidance in how to create IDOC from an ABAP report.
Any help would be greatly acknowledged.
Thanks!!
‎2014 Aug 20 7:12 AM
Hello Harsh,
You need to use FM 'MASTER_IDOC_DISTRIBUTE' to generate the idoc through custom program. There are many blogs available over scn which will give you step by step procedure the generate idoc.
Regards.
Deepti
‎2014 Aug 20 7:16 AM
DN is correct there are many links for this. here one:
http://wiki.scn.sap.com/wiki/display/Snippets/ABAP+Program+To+Generate+IDoc
‎2014 Aug 20 7:18 AM
‎2014 Aug 20 7:55 AM
Hi I tried to use the program as suggested by Buddhika and Glen, but found error over the statement below:
i_data-sdata = header_segment_data.
Highlighted below in code snap. These two fields are not mutually convertible.
Any suggestions on this.
‎2014 Aug 20 8:00 AM
This is really a seperate issue to the original.
Please post the data declaration code here for both these variables.
‎2014 Aug 20 8:11 AM
Hi,
HEADER_SEGMENT_DATA should be of type EDIDD-SDATA.
Regards,
Lingaraj
‎2014 Aug 20 8:15 AM
It can't be possible in this scenario as Header_segment_data is a structure type while EDIDD-SDATA is not structured type.