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

need help to write loop queries

Former Member
0 Likes
430

Hi All,

Can anyone help me out to write correct syntax for the following data.

LOOP ( IT-ACTUAL 😞 Moving the filds of IT-ACTUAL to IT-EXIT (Exit table of report)

IT-ACTUAL-GDATU to IT-EXIT-GDATU

IT-ACTUAL-KURST to IT-EXIT- KURST

IT-ACTUAL-FCURR to IT-EXIT-FCURR

IT-ACTUAL-TCURR to IT-EXIT-TCURR

IT-ACTUAL-UKURS to IT-EXIT-UKURS

IT-ACTUAL-FCURR to IT-EXIT-UKURS

IT-ACTUAL-TCURR to IT-EXIT-UKURS

Obtain User (user that updated exchange rate) Read table IT- DBTABLOG

With key MANDT = IT-ACTUAL-MANDT

KURST = IT-ACTUAL-KURST

FCURR = IT-ACTUAL-FCURR

TCURR = IT-ACTUAL-TCURR

GDATU = IT-ACTUAL-GDATU.

Save IT-DBTABLOG-USERNAME into T-EXIT-USERNAME.

thanks

Pushpa

3 REPLIES 3
Read only

peter_ruiz2
Active Contributor
0 Likes
413

Hi pushpa,

you can use this

MOVE-CORRESPONDING IT-ACTUAL to IT-EXIT

Read only

0 Likes
413

Hi

Thanks for your reply.

i have used the same code.. but getting the following error

*The internal table "IT_ACTUAL" has no Header line - explicit *

*specification of an output area with "INTO wa" or "ASSIGNING <fs>" isrequired. *

Read only

0 Likes
413

hi,

you need to create a work area.

here is an example.

data:
wa_actual like line of it_actual,
wa_exit like line of it_exit.

loop at it_actual into wa_actual.
move-corresponding wa_actual to wa_exit.

append wa_exit to it_exit.
clear wa_exit.
endloop.