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 Statement

Former Member
0 Likes
499

Hi Frnd's,

I have a screen with 5 fields displayed only one is input field all other datas are displayed frm a internaltable.the internal table contains 10 rows.

at the initial the first row values is displayed in screen and after that if i press enter the next row data should be diplayed in screen.

how this can be done.

Thanks in advance

Suganya

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
475

In the PBO module you can define to display the records via reading the internal table with an index value.

READ TABLE ITAB INDEX lindx.

For the first case initialise the lindx to 1.

And in PAI, on each enter you can increment the lindx count.

Regards

Anurag

4 REPLIES 4
Read only

Former Member
0 Likes
476

In the PBO module you can define to display the records via reading the internal table with an index value.

READ TABLE ITAB INDEX lindx.

For the first case initialise the lindx to 1.

And in PAI, on each enter you can increment the lindx count.

Regards

Anurag

Read only

0 Likes
475

after incrementing whther

each time the process goes back to PBO.

Read only

0 Likes
475

yes ..

Read only

Former Member
0 Likes
475

Hi

U can use a counter:

PROCESS PBO
  MODULE SHOW_ITAB.

PROCESS PAI.
  MODULE USER_COMMAND.


MODULE SHOW_ITAB.
  IF COUNTER = 0.
    COUNTER = 1.
  ENDIF.
  READ TABLE ITAB INDEX COUNTER.
* Move the data from itab to input/output fields

ENDMODULE.

MODULE USER_COMMAND.
  CASE OK_CODE.
    WHEN SPACE. COUNTER = COUNTER + 1.
  ENDCASE.
  CLEAR OK_CODE.
ENDMODULE.

Max