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

logic

Former Member
0 Likes
519

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

3 REPLIES 3
Read only

Former Member
0 Likes
497

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

Read only

0 Likes
497

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

Read only

Former Member
0 Likes
497

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^