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

PAGE DOWN IN SCREEN

Former Member
0 Likes
1,073

HI EXPERTS ,

IN TABLE CONTROL . PUT THE CURSOR IN TABLE CONTROL AND WHEN EVER IN KEYBOARD I PRESS THE KEY 'PAGE_DOWN'

THATS WORKING BUT WHAT IS THE FUNCTION CODE FOR THAT .

HI EXPERTS ,

IN TABLE CONTROL . PUT THE CURSOR IN TABLE CONTROL AND WHEN EVER IN KEYBOARD I PRESS THE KEY 'PAGE_DOWN'

THATS WORKING BUT WHAT IS THE FUNCTION CODE FOR THAT .

2 REPLIES 2
Read only

Former Member
0 Likes
712

HI,

Check this logic:

START-OF-SELECTION.
SET PF-STATUS 'Status'.
Double click on Status, it will ask you to write GUI status.
In the Function keys --Standard Toolbar,enter the Function Codes(page up, page down etc...) as follows.
Assign standard function Codes to the Page up and Page down buttons in the "Function Keys"
(4 icons will be there)
PAGE UP = P-
NEXT PAGE = P+
FIRST PAGE = P--
LAST PAGE = P++

Read only

0 Likes
712

After this describe these button functionality like this:

DATA:  g_row TYPE lvc_s_row.
MODULE user_command INPUT.
  CASE ok_code.
    WHEN 'P--'.
      g_row-index = 1.
      CALL METHOD go_alvgrid->set_current_cell_via_id
        EXPORTING
          is_row_id = g_row.
    WHEN 'P-'.
      IF g_row-index > 1.
        SUBTRACT 1 FROM g_row-index.
      ENDIF.
      CALL METHOD go_alvgrid->set_current_cell_via_id
        EXPORTING
          is_row_id = g_row.
    WHEN 'P+'.
      ADD 1 TO g_row-index.
      DESCRIBE TABLE itab[] LINES sy-tfill.
      IF g_row-index > sy-tfill.
        g_row-index = sy-tfill.
      ENDIF.
      CALL METHOD go_alvgrid->set_current_cell_via_id
        EXPORTING
          is_row_id = g_row.
    WHEN 'P++'. 
      DESCRIBE TABLE itab[] LINES g_row-index.
      CALL METHOD go_alvgrid->set_current_cell_via_id
        EXPORTING
          is_row_id = g_row.
  ENDCASE.
ENDMODULE.                    "user_command INPUT
Save and activate it.
Reactivate the program as well.

May it helps you.

Regards.

DS.