hi do it in this way i.e, using for all entries statement
select ba~ba_ba_no ba~ba_seq_no ba~ba_nm_1 into table t_sum from oiuh_cm_ba as ba inner join oiucm_ba_link as balink on ba~ba_ba_no = balink~ba_no and ba~ba_seq_no = balink~ba_seq where ba~ba_ba_no IN s_own and balink~ba_type = 'V'. if not t_sum[] is initial. select a~opsl_gl_sys_no a~opsl_ck_no a~opsl_own_no a~opsl_own_seq_no b~gl_gl_sys_no b~gl_acct_no b~gl_pr_no b~gl_doi_no b~gl_sa_dt b~gl_acct_perd_dt b~gl_trans_am into table t_det3 from oiuh_rv_opsl as a inner join oiuh_rv_gl as b on a~opsl_gl_sys_no = b~gl_gl_sys_no <b> for all entries in t_sum</b> where a~opsl_own_no = t_sum-ba_ba_no and a~opsl_own_seq_no = t_sum-ba_seq_no and b~gl_trans_am in s_dol.
endif.
Regards,
Santosh
assume IT_MARA is the internal table of MARA details & my intension is to fetch Material descriptions from MAKT for all the materials in IT_MARA.
select matnr
maktx
into table it_makt
from makt
for all entries in it_mara
where matnr = it_mara-matnr
and spras = sy-langu.
regards
srikanth
Message was edited by: Srikanth Kidambi
Hi,
consider 2 itabs.
select f1 f2 from db1 into itab1 where .....
sort itab1 by f1.
delete adjacent duplicates from itab1.
if not itab1[] is initial.
select f1 f2 from db2 into table itab2
FOR ALL ENTRIES IN ITAB1 where f1 = itab1-f1.
endif.
Hi,
ITAB1 -> Source Internal Table.
ITAB2 -> Records to be selected.
itab3 -> Records to be Moved.
Loop at ITab1.
read table itab2 with key Key1 = itab1-key . . .
if sy-subrc = 0.
itab3 = itab2.
append itab3.
else.
Code.
endif.
endloop.
There might be some Syntax error.
This might help you. Hope!
Regards,
Prashanth
hi
tables: mara, marc.
select-options s_matnr for mara-matnr.
data:
begin of itab occurs 0,
matnr type mara-matnr,
ersda type mara-ersda,
ernam type mara-ernam,
end of itab,
begin of itab2 occurs 0,
matnr type marc-matnr,
werks type marc-werks,
dispr type marc-dispr,
end of itab2.
select matnr ersda ernam from mara into table itab where matnr in
s_matnr.
if itab[] is not initial.
select matnr werks dispr from marc into table itab2 for all entries in
itab where
matnr = itab-matnr.
endif.
Reward points if helpful.
Regards
Swathi
There is no direct statement which can help you to retrive the information in another internal table while you are processing the first internal table.
The only soln is to
Loop at A.
--either use Read or loop.
REad table b with keys
check sy-subrc = 0.
---OR
loop at b where a-fields = b-fields.
process
endloop.
check sy-subrc = 0.
endloop.
Add a comment