‎2007 Jun 26 2:15 PM
Hi, I have 2 tables: l_eket_obj and itab
TYPES: BEGIN OF eket_obj,
werks LIKE ekpo-werks,
matnr LIKE ekpo-matnr,
menge TYPE i,
wemng TYPE i,
objednane TYPE i,
END OF eket_obj.
DATA: l_eket_obj TYPE eket_obj OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF itab OCCURS 0,
werks like ekpo-werks,
matnr LIKE ekpo-matnr,
zamowione type i,
END OF itab.
How to move all data from field l_eket_obj-objednane into field itab-zamowione?
Thanks,
Joanna
‎2007 Jun 26 2:19 PM
HEllo
do like this.
loop at l_eket_obj .
read table itab with key werks eq l_eket_obj-werks
matnr eq l_eket_obj-matnr.
if sy-subrc = 0.
itab-zamowione = l_eket_obj-objednane.
modify itab transporting zamowione where werks eq l_eket_obj-werks
matnr eq l_eket_obj-matnr.
endif.
endloop.
Hope this solve ur problem.
Regards,
Vasanth
‎2007 Jun 26 2:19 PM
Hi Joanna,
Write code like this
Loop at l_eket_obj.
itab-zamowione = l_eket_obj-objednane.
Append itab .
clear itab.
endloop.Reward if useful.
Regards
Aneesh.
‎2007 Jun 26 2:19 PM
HEllo
do like this.
loop at l_eket_obj .
read table itab with key werks eq l_eket_obj-werks
matnr eq l_eket_obj-matnr.
if sy-subrc = 0.
itab-zamowione = l_eket_obj-objednane.
modify itab transporting zamowione where werks eq l_eket_obj-werks
matnr eq l_eket_obj-matnr.
endif.
endloop.
Hope this solve ur problem.
Regards,
Vasanth
‎2007 Jun 26 2:53 PM
Hello,
It doesn't work, the field itab-zamowione is still empty.
Regards,
Joanna
‎2007 Jun 27 10:09 AM
Thanks Vasanth,
it solves my problem, it doesn't work because of wrong data.
Regards,
Joanna
‎2007 Jun 26 9:29 PM
Hi
can you paste the code.
The Vasanth M options looks good, just make sure u ll fill data in ITAB before reading it.
Move corresponding fields like matnr werks to ITAB then only the read statement will work.
Thank-You
vinsee
‎2007 Jun 27 5:17 AM
hi joanna,
u will have to write the code in following fashion....
loop at l_eket_obj.
itab-werks = l_eket_obj-werks.
itab-matnr = l_eket_obj-matnr.
itab-zamowione = l_eket_obj-objednane.
append itab.
clear itab.
endif.
hope this will be helpfull...
please reward in case usefull...
regards,
prashant