06-19-2007 3:44 PM
06-19-2007 3:45 PM
06-19-2007 3:45 PM
Hi,
1. First check that first Int Table(ITAB) is not Initial.
2. Select all the Key fields of the Table from which you are fetching data(DB Table).
3. Use for all entries.. and equate the key/same fields in both tables:
If not ITAB[] is initial.
Select f1 f2... from <DB Tabale>
into (int table) for all entries in ITAB
where f1 = <f1> and F2 = <f2>.
endif.
Consider that U have material numbers in one internal table which u got from MARA table and for all the material numbers u had, if u need to get descriptions from MAKT table then U will put 'for all entries' in the select query.
Ex:
select matnr
into lt_matnr
from MARA.
if lt_matnr is not initial.
select maktg
from MAKT
into lt_makt
for all entries in lt_matnr
where matnr = lt_matnr-matnr.
endif.
~~Guduri
06-19-2007 4:15 PM
hi
<b>Select matnr from mara
into table itab1.
check itab1 is not initial.
sort itab1 by matnr.
select matnr lgnum from badasetable
into table itab2
for all entries in itab1
where matnr = itab1-lgnum.</b>
regards
ravish
<b>reward points if useful</b>