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

Previous and Next Button on Screen

Former Member
0 Likes
1,582

Hi All,

Iam having a report which displays Distributor Details from a Custom table. When a click a Distributor it Displays so,e values in a screen.

Now in that screen i have two push buttons 'PREVIOUS' and 'NEXT'. My requirement is to display the next record or previous record when these buttons are clicked.

Please Help.

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
790

Hi,

Its very simple....

Just code it on the sy-ucomm.

for eg: if you have function of next for next button and

prev for previous button.

Sort the internal table.

Let the latest record display first then,

and store the sy-tabix in local variable

and use following code.

LINE = SY-TABIX + 1.

READ TABLE DTAB INDEX LINE.

IF SY-SUBRC EQ 0.

Screentable = DTAB.

ENDIF.

Same logic will be thr for Prev button.

REWARD IF USEFUL

Hi All,

Iam having a report which displays Distributor Details from a Custom table. When a click a Distributor it Displays so,e values in a screen.

Now in that screen i have two push buttons 'PREVIOUS' and 'NEXT'. My requirement is to display the next record or previous record when these buttons are clicked.

Please Help.

Thanks.

2 REPLIES 2
Read only

Former Member
0 Likes
790

Hi Raadas,

Hope you are using dialog screens to display the disributor details in the report.

If then add Prev and next button in the GUI STATUS.

When coding for Prev and next button call the same screen again and change the distributor value in the PBO.

Thanks,

Arun

Read only

Former Member
0 Likes
791

Hi,

Its very simple....

Just code it on the sy-ucomm.

for eg: if you have function of next for next button and

prev for previous button.

Sort the internal table.

Let the latest record display first then,

and store the sy-tabix in local variable

and use following code.

LINE = SY-TABIX + 1.

READ TABLE DTAB INDEX LINE.

IF SY-SUBRC EQ 0.

Screentable = DTAB.

ENDIF.

Same logic will be thr for Prev button.

REWARD IF USEFUL