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: 

Query Regarding IDOC "WMMBID02"

Former Member
0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos

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

0 Kudos

Hey,

I am still working on this issue.

Can anybody help.

Regards,

Rajesh

0 Kudos

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