01-08-2008 5:39 AM
Hi Experts,
The Idoc type: MATMAS05,
Header segment: E1MARAM
Child Segments are:
E1MARACM
child segment
E1MARC1.
How can i access values in child segments(E1MARC1) to internal table and how
can i fill internal table.
Reagrds
Pratap.M
01-08-2008 7:15 AM
Hai,
You may have got data into an internal table which declared as below:
data: i_idoc_data TYPE TABLE OF edidd WITH HEADER LINE.
data: i_E1MARAM type table of E1MARAM with header line,
E1MARC1 type table of E1MARC1 with header line.
This internal table holds the data for each segment of the IDOC.
So we need to loop at this internal table and we have to get data conditionally.
loop at i_idoc_data.
case i_idoc_data-segnam.
when 'E1MARAM'.
clear i_e1maram.
i_e1maram = i_idoc_data-sdata.
append i_e1maram.
when 'E1MARC1'.
clear i_e1marc1.
i_e1marc1 = i_idoc_data-sdata.
append i_e1marc1.
endcase.
endloop.
01-08-2008 7:15 AM
Hai,
You may have got data into an internal table which declared as below:
data: i_idoc_data TYPE TABLE OF edidd WITH HEADER LINE.
data: i_E1MARAM type table of E1MARAM with header line,
E1MARC1 type table of E1MARC1 with header line.
This internal table holds the data for each segment of the IDOC.
So we need to loop at this internal table and we have to get data conditionally.
loop at i_idoc_data.
case i_idoc_data-segnam.
when 'E1MARAM'.
clear i_e1maram.
i_e1maram = i_idoc_data-sdata.
append i_e1maram.
when 'E1MARC1'.
clear i_e1marc1.
i_e1marc1 = i_idoc_data-sdata.
append i_e1marc1.
endcase.
endloop.