‎2007 Oct 04 10:40 AM
hi,
can any one tell me the logic to enable the pageup button if the records are more than one and at the same time pagedown button should be disabled for module program .
if there are oly one records then both the buttons should be disabled.
points are assured.
Ganesh.
Message was edited by:
ganesh ram
‎2007 Oct 04 10:44 AM
Hi,
You dont have to build any logic for it.
SAP will take care of it depending on whether the output exceeds 1 page or not.
If you wish to disable buttons, then
SET PF-STATUS 'ZSTAT'.
Double click on ZSTAT, enter the description & then pass name to buttons which you want..eg. BACK, SAVE etc. Activate it.
Best regards,
Prashant
‎2007 Oct 04 10:52 AM
thanks
1)no i should not change the GUI status ,i shld hardcore oly my abap program.
2) i want this code for pgup and pgdn button in my DP screen .
ganesh
Message was edited by:
ganesh ram
‎2007 Oct 04 10:51 AM
hi
good
go through this code which ll give you the idea to enable the page up button in table control.
Use the function module SCROLLING_IN_TABLE.
For ok_code pass P- for previous page and P+ for next page.
Example:
DATA L_TC_NEW_TOP_LINE TYPE I.
CALL FUNCTION 'SCROLLING_IN_TABLE'
EXPORTING
ENTRY_ACT = Table_Control-TOP_LINE
ENTRY_FROM = 1
ENTRY_TO = Table_Control-LINES
LAST_PAGE_FULL = 'X'
LOOPS = 25
OK_CODE = 'P+'
OVERLAPPING = 'X'
IMPORTING
ENTRY_NEW = L_TC_NEW_TOP_LINE
EXCEPTIONS
NO_ENTRY_OR_PAGE_ACT = 01
NO_ENTRY_TO = 02
NO_OK_CODE_OR_PAGE_GO = 03
OTHERS = 0.
Table_Control-TOP_LINE = L_TC_NEW_TOP_LINE.
reward point if helpful.
thanks
mrutyun^