04-05-2006 7:47 AM
Hi,
I have a follwoing requirement that makes use of a standart IDOC WMMBID02. This IDOC WMMBID02 has data stored within into different segments that have structures. I need to read that data and store it into an INTERNAL Table.
Is there any specific SAP Function Module that would help me to obtain such requirement. If not, what are the options that could be used to read data from IDOC WMMBID02 and populate our INTERNAL Table.
Kindly Suggests,
Thanks & Regards,
Rajesh
04-05-2006 7:49 AM
Rajesh,
Can you give more details of the scenario here?
The usual way of reading IDOC data
SELECT the DATA Segments of a IDOC from EDID4 table.
Then depending on the SEGMENT, move the SDATA field into appropriate Work areas and you will have the data to process.
I am not clear about the structure of the internal table that you are mentioning here.
I guess there is another thread for the same issue.
Regards,
Ravi
Note : Please mark the helpful answers
04-18-2006 8:42 AM
Hey,
I am still working on this issue.
Can anybody help.
Regards,
Rajesh
04-18-2006 8:57 AM
Rajesh,
Either you can use the function IDOC_TYPE_COMPLETE_READ
Or use the code as below.
SELECT * from EDID4 into t_idoc_data where docnum = ???
data : wa_E1MBXYH type E1MBXYH,
wa_E1MBXYI type E1MBXYI,
wa_E1MBXYJ type E1MBXYJ
loop at t_idoc_data into wa_idoc_data.
case segnam.
when 'E1MBXYH'.
move wa_idoc_data-data into wa_E1MBXYH.
when 'E1MBXYI'.
move wa_idoc_data-data into wa_E1MBXYI.
when 'E1MBXYJ'.
move wa_idoc_data-data into wa_E1MBXYJ.
endcase.
move corresponding fields of wa_E1MBXYH into wa_itab.
move corresponding fields of wa_E1MBXYI into wa_itab.
move corresponding fields of wa_E1MBXYJ into wa_itab.
append wa_itab to itab.
Clear all the work areas here
endloop.
Regards,
Ravi
Note : Please mark the helpful answers