2008 Apr 08 7:43 AM
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.
2008 Apr 08 7:54 AM
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.
2008 Apr 08 7:49 AM
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
2008 Apr 08 7:54 AM
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
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |