Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

modify statement

Former Member
0 Likes
544

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
522

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

3 REPLIES 3
Read only

Former Member
0 Likes
523

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

Read only

Former Member
0 Likes
522

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.

Read only

Former Member
0 Likes
522

Hi,

yuo can use follwoing syntax :

modify table transporting field1 field2 where field1 = condition1.

thanks.