2009 Dec 03 7:29 AM
hi,
i have data in three itab.
using loop i am trying to move the data from itab's to output table workarea then appending it to final output table.
for the first itab loop data is getting appended but for next two its not.
am not getting whts happening.
pls help
hi,
i have data in three itab.
using loop i am trying to move the data from itab's to output table workarea then appending it to final output table.
for the first itab loop data is getting appended but for next two its not.
am not getting whts happening.
pls help
2009 Dec 03 7:34 AM
Hi,
please post your coding how you fill the new tables.
Regards
Nicole
2009 Dec 03 7:41 AM
LOOP AT t_mara INTO w_mara.
MOVE w_mara-matnr TO w_output-matnr.
MOVE w_mara-matkl TO w_output-matkl.
APPENDw_output TO t_output.
CLEAR w_output
ENDLOOP.
LOOP AT t_makt INTO w_makt
MOVE w_mara-makt TO w_output-makt.
APPENDw_output TO t_output.
CLEAR w_output
ENDLOOP.
LOOP AT t_mard INTO w_mard.
MOVE w_mara-werks TO w_output-werks.
APPENDw_output TO t_output.
CLEAR w_output
ENDLOOP.
2009 Dec 03 7:45 AM
The first think that is notice is, that you have no relation beetween the 3 internal tables, but you move a few fields into t_output.
How should the system now, at which line you want to insert it??
Or is it right that you have one dataset for each entry outside t_mara, for each entry outside t_makt and also for each entry outside t_mard??
2009 Dec 03 7:48 AM
hi,
LOOP AT t_mara INTO w_mara.
MOVE w_mara-matnr TO w_output-matnr.
MOVE w_mara-matkl TO w_output-matkl.
read table t_makt INTO w_makt where matnr = w_mara-matnr.
if sy-subrc = 0.
w_output-makt = w_makt-makt.
endif.
read table t_mard INTO w_mard where matnr = w_mara-matnr.
if sy-subrc = 0..
w_output-werks = w_mard-werks .
endif.
APPENDw_output TO t_output.
CLEAR w_output
ENDLOOP.
Regards,
Subramanian
2009 Dec 03 7:34 AM
Hi,
Check to see if you are clearing the workarea before the other appends.
Regards,
Subramanian
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |