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

LOOP Command in scripts

Former Member
0 Likes
752

Hi,

I am modifying the standard script rvorder01 for delivery order.While modifying I created a new page using the comand NEW-PAGE and displaying the item details like truck details.For Example output is as below,

for one delivery we have the following details Deliver Order number:xxxxxxx

line items1

..

...

...

...

..

lineitem 20

after this I have created a new-page and displaying truck details.

truck1

truck2

truck3

I am retrieving the above data from mu subroutine pool program. It is retrieving all the truck details.But while displaying it is giving the last truck details.

My question is how to get all the truck details in my new page as it is displaying line items in main window in first page.

I have tried by displaying the values in th item_line element but no success.Please help me in this regard.

5 REPLIES 5
Read only

Former Member
0 Likes
700

you need to call the element inside the loop.

loop at itab into wa.

call FM for element eg: /:505 --> in script page write wa-truckfielname

endloop.

regards,

nazeer

Read only

Former Member
0 Likes
700

Hi, Nazeer,

Can you please explain in detail.

I am modifying the standard script and we cannot write loop in standard script. My code is in loop.....endloop in subroutine.

Still getting the same problem.

endloop.

Read only

0 Likes
700

You cant use loop statement in Script that you have to write in driver program by calling element.

Read only

Former Member
0 Likes
700

Hi Mukund,

do you mean that I have to call the elemnt in subroutine pool program which i have written for truck details?????

Read only

0 Likes
700

Yes