03-16-2007 12:25 AM
Hi All,
I am using orders05 (purchasing) idoc for creating purchase order inbound in ABAP program. I need to read a file and fill values to idoc_data of type edidd40
and idoc control record (of type edidc) and call function module idoc_inbound asynchronous. In this, how can I fill the values to idoc_data (edidd40). If anyone has some sample program to fill idoc_data (of type edidd40), it will be helpful.
Thanks
03-16-2007 12:41 AM
Hi,
Please find a sample code
* Build Control records
CONTROL_RECORD_OUT-MESTYP = MESTYP.
CONTROL_RECORD_OUT-IDOCTP = IDOC_TYPE.
CONTROL_RECORD_OUT-RCVPRT = 'LS'. " << Fill the receiver port type US/LS
CONTROL_RECORD_OUT-RCVPRN = LOGSYS.
* Build Data records
*--- EDIDD40 data Here if you have multiple items then make a loop
loop at i_itab. " i_itab contains the details about EDIDD40 fields
IT_EDIDD-SEGNAM = SEGMENT. " Will be EDIDD40
IT_EDIDD-SDATA = i_itab.
*--- Append the data
APPEND IT_EDIDD.
endloop.
aRs
03-16-2007 3:18 AM
Ricky,
In edid4 table data will be stored in column SDATA.
So each segement will have SDATA. Pass the values and segement name to the
idoc_data.
Check the FM "VMI_PO_CONFIRM_FROM_ORDRSP".
you will have an idea.
Pls. reward if useful