2007 Aug 23 7:07 AM
Hi,
I want to add two pushbuttons in the module pool screen which has a table control that fetches data from the transparent table. One pushbutton is for the page up and other is for page down. If my table control <say tab_ctrl1> has 75 records in total with shows 25 at time so with a single page down it should show next 25 rows of the data.
thanks
ekta
2007 Aug 23 7:16 AM
Ekta if table has entries more than the visible rows of table control , then vertical scroll bar will apperar automatically.
If it doesnt appera then u can put a statement <Table Control Name>-lines = 10000 (u can put any value here ) in PBO of screen where table control is.
It will have same functionlity as page up & down that too without writing code for page up or page down separately.
Regards
Sushil
Ekta if table has entries more than the visible rows of table control , then vertical scroll bar will apperar automatically.
If it doesnt appera then u can put a statement <Table Control Name>-lines = 10000 (u can put any value here ) in PBO of screen where table control is.
It will have same functionlity as page up & down that too without writing code for page up or page down separately.
Regards
Sushil
2007 Aug 23 7:15 AM
Hi,
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.
Regards,
Sesh
2007 Aug 23 7:16 AM
Ekta if table has entries more than the visible rows of table control , then vertical scroll bar will apperar automatically.
If it doesnt appera then u can put a statement <Table Control Name>-lines = 10000 (u can put any value here ) in PBO of screen where table control is.
It will have same functionlity as page up & down that too without writing code for page up or page down separately.
Regards
Sushil
2007 Aug 23 7:26 AM
in the end of your loop at internal table in PAI write
LINE_JUMP = SY-LOOPC.
instead of hard coding it like
LINE_JUMP = 25.
and in your module user command write code like this
CASE OK_CODE.
WHEN 'P+'.
CLEAR OK_CODE.
CONTROL_DATA-TOP_LINE = CONTROL_DATA-TOP_LINE + LINE_JUMP.
IF CONTROL_DATA-TOP_LINE GT CONTROL_DATA-LINES.
CONTROL_DATA-TOP_LINE = CONTROL_DATA-LINES - LINE_JUMP + 1.
ENDIF.
WHEN 'P--'.
CLEAR OK_CODE.
CONTROL_DATA-TOP_LINE = 1.
WHEN 'P-'.
CLEAR OK_CODE.
CONTROL_DATA-TOP_LINE = CONTROL_DATA-TOP_LINE - LINE_JUMP.
WHEN 'P++'.
CLEAR OK_CODE.
CONTROL_DATA-TOP_LINE = CONTROL_DATA-LINES - LINE_JUMP + 1.
assign P++ to page Last icon, P-- for first page, P+ for next page,P- for previous page
Reward points if useful, get back in case of query...
Cheers!!!
Message was edited by:
Tripat Pal Singh
2007 Aug 24 7:49 AM
hi
your suggestion helped me a lot....please can you help me in finding this out...
f i press page up and page down of the keyboard...it should do the same functionality as page-up and page-down push buttons are doing.
actually i want to know what is the standard value of the page down and page up keys in the module pool.
thanks ekta
2007 Aug 24 6:13 AM
IN data declaration i have taken a data N TYPE I VALUE '16',
instead of hard coding we can have character declaration even as c_16 or any other value.
for page up i have used function code as '&PUP'
and for page down i have used function code as '&PDN'
in PAI module
case for the ok_code is as:
WHEN '&PUP'.
tab_ctrl1-top_line = tab_ctrl1-top_line - n.
WHEN '&PDN'.
tab_ctrl1-top_line = tab_ctrl1-top_line + n.
thanks for all the experts who helped me in getting this thread solved
2007 Aug 24 6:15 AM
2007 Aug 24 7:45 AM
Hi all,
if i press page up and page down of the keyboard...it should do the same functionality as page-up and page-down push buttons are doing.
actually i want to know what is the standard value of the page down and page up keys in the module pool.
thanks...
please help me in solving the problem
2007 Aug 28 3:49 PM
HI ALL
the issue is been resolved.
in PBO
index_t = tab_ctrl1-top_line.
index_d = tab_ctrl1-top_line + n.
set cursor field 'WA_MATERIAL_DATA-MATNR' line N OFFSET INDEX_T.
thanks
ekta
2023 Mar 08 10:31 AM
Can anyone also provide the same for Find and Find next button please .?

| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |