‎2008 Nov 12 6:30 AM
Hi ,
i want to put ernam field from one internam table to final internal table ernam please guide
loop at tbl_output.
data: v_ernam like ekbe-ernam.
select ernam from ekbe
into v_ernam
where
elikz eq 'X' and
ebeln eq tbl_output-ebeln
and
ebelp eq tbl_output-ebelp.
modify grnam transporting v_ernam .
endloop.
‎2008 Nov 12 6:37 AM
tbl_output contains all the ebeln, ebelp.
tbl_ernam table to contain all ernam.
so write a select query as follws.
select ernam from ekbe into tbl_ernam
for all entries in tbl_output
where elikz = 'X'
and ebeln eq tbl_output-ebeln
and ebelp eq tbl_output-ebelp.
Select in a loop reduces performance
Use both the internal tables and modify as per ur requirement.
Regards,
SAPient
‎2008 Nov 12 6:37 AM
tbl_output contains all the ebeln, ebelp.
tbl_ernam table to contain all ernam.
so write a select query as follws.
select ernam from ekbe into tbl_ernam
for all entries in tbl_output
where elikz = 'X'
and ebeln eq tbl_output-ebeln
and ebelp eq tbl_output-ebelp.
Select in a loop reduces performance
Use both the internal tables and modify as per ur requirement.
Regards,
SAPient
‎2008 Nov 12 7:01 AM
loop at tbl_output.
data: v_ernam like ekbe-ernam.
select ernam from ekbe
into v_ernam
where
elikz eq 'X' and
ebeln eq tbl_output-ebeln
and
ebelp eq tbl_output-ebelp.
tbl_output-grnam = v_ernam.
modify tbl_output transporting grnam
where ebeln eq tbl_output-ebeln
and ebelp eq tbl_output-ebelp.
endloop.
‎2008 Nov 12 7:03 AM
Hi,
yuo can use follwoing syntax :
modify table transporting field1 field2 where field1 = condition1.
thanks.