Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

passing values to idoc data of type edidd40 using ABAP

Former Member
0 Kudos

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

2 REPLIES 2

former_member194669
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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