2008 Jun 19 3:43 PM
Hello,
I am using At new field1.
I want to transfer field1 & field2 field3 to other itab along with field1.
But when i wrote this code it just transfer field1 not other fields along with field1.
At new field1.
move field1 to itab
move field2 to itab
............
endat.
can u help me for that.
Thanks.
Hello,
I am using At new field1.
I want to transfer field1 & field2 field3 to other itab along with field1.
But when i wrote this code it just transfer field1 not other fields along with field1.
At new field1.
move field1 to itab
move field2 to itab
............
endat.
can u help me for that.
Thanks.
2008 Jun 19 3:45 PM
hi,
Do like this:
move field1 to itab-fld1.
move field2 to itab-fld2.
Regards
Subramanian
2008 Jun 19 3:45 PM
2008 Jun 19 3:45 PM
This will only work if field 2 and 3 are to the left of field 1 in the structure.
Regards,
John.
2008 Jun 19 3:45 PM
hiiii
i had the same problem.
if you are moving fields to another internal table then use following code..it will solve your problem.
DATA:
lw_werks TYPE mard-werks.
SORT i_output BY matnr.
LOOP AT i_output INTO wa_output.
wa_output2-matnr = ' '.
wa_output2-werks = wa_output-werks.
wa_output2-prctr = wa_output-prctr.
AT NEW matnr.
wa_output2-matnr = wa_output-matnr.
ENDAT. " AT NEW matnr
lw_srecid = lw_srecid + 1.
wa_output2-srecid = lw_srecid.
APPEND wa_output2 TO i_output2.
CLEAR wa_output.
ENDLOOP. " LOOP AT i_output
reward if useful
thx
twinkal
Edited by: twinkal patel on Jun 19, 2008 4:46 PM
2008 Jun 19 3:46 PM
U need to read the table inside at new ...
loop at itab1.
At new field1.
read table itab1 index sy-tabix.
move field1 to itab
move field2 to itab
............
endat.
endloop.