05-05-2008 2:19 PM
Hi ,
I have one Internal table it_marc contains the MATNR
and one more final internal table it_final. I want to read the all MATNR from IT_FINAL by using IT_MARC which contains the same MATNR. I mean all the MATNRs even dupliacates also.
regards,
Ajay
05-05-2008 2:25 PM
Hi
LOOP AT IT_MARC.
LOOP AT IT_FINAL WHERE MATNR = IT_MARC-MATNR.
ENDLOOP:
ENDLOOP.
Max
05-05-2008 2:24 PM
hi
to read all the matnr use
FOR ALL ENTERIES.
hope this might help.
anuj
05-05-2008 2:24 PM
Hi,
Use For all entries.
Select matnr from it_marc
into corresponding fields of table it_final
for all entries in it_marc[]
where matnr = it_marc[]-matnr.
Please give me ur need exactly, so that we can better understand ur que.
Reward if Helpful.
Jagadish.
05-05-2008 2:25 PM
Hi
LOOP AT IT_MARC.
LOOP AT IT_FINAL WHERE MATNR = IT_MARC-MATNR.
ENDLOOP:
ENDLOOP.
Max
05-05-2008 2:29 PM
Hi,
Check the following code:
Data: wa_marc like line of it_marc,
wa_final like line of it_final.
sort it_final by MATNR.
loop at it_marc into wa_marc.
Read table it_final into wa_final with key matnr = wa_marc-matnr Binary Search.
if sy-subrc eq 0.
*-- Do the required processing
endif
endloop.
Hope this helps!
Regards,
Pavithra
05-05-2008 2:31 PM
Hi , check this out !!
Loop at it_final.
read table it_marc with key matnr = it-final-matnr.
If sy-subrc = 0.
Move corresponding values
Endif.
Endloop.
05-05-2008 2:33 PM
Hi friend
use this one
Select matnr from mara
into table it_marc
for all entries in it_final
where matnr = it_final-matnr
loop at it_final.
read table it_marc with key matnr = i_final-matnr.
if sy-subrc EQ 0.
it_final-matnr = it_marc-matnr.
endif
endloop.
Reward points if helpfull.