Page Up and Page down functionality in table control

    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.

Use the function module SCROLLING_IN_TABLE.
For ok_code pass P- for previous page and P+ for next page.
               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'
               ENTRY_NEW             = L_TC_NEW_TOP_LINE
*              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.

Similar Messages

  • Page down functionality in table control BDC-CJ02 tcode

    Hi Friends,
    I am doing a BDC with Table control for Tcode CJ02.
    When I reach certain number of records, say 13, the page down functionality doesnt work.I tried different ways like using the BDC_OKCODE as "=P" and "=P+".Also, I tried doing a recording by pressing the down key in the table contral, in SHDB, but none of them worked.
    Refered a post in SDN as well, but it doesnt hold any solution.
    Do throw some light on the same to achieve page down functionality for the bdc tcode CJ02.
    Thanks in advance.

    I already posted an answer to that here Re: BDC scroll down with OK_CODE '=P+':
    P+ (=P+ in the BDC) is not a universal function code, but only one which is defined in ABAP lists . So, 99% of time, it doesn't work for all others situations (like yours).
    Scrolling a table control is not so easy to do. When you record a page down on a table control in SHDB, you'll get probably a /00 which corresponds to Enter. When you play the recording, it won't scroll. The issue is that "page down" is processed in 2 parts, it changes the "top line" of the table control, and executes Enter. But it's not possible to record/play the "top line" information.
    The solution is that the program usually implements a function code:
    either "add new line"
    or "position at line"
    Sometimes, the function code is hidden so you must look at inside the program (or search SAP notes, like here: [SAP note 187946 (No positioning on PRT overview in routing)| ])
    And sometimes, there's no function code at all, and then you're stuck ! (or use SAP GUI scripting, but it may only work in dialog).
    For CJ02, I can't tell how to scroll through BDC, but anyway, there is a BAPI (don't remember the name, search the forum, it will be easy to find it), so you should always prefer them over BDC.

  • Implement Entry up/down & Page up/down functions in table control

    I have to implement entry up/down and page up/down functions in my table control. The logic is :-
    Suppose the entries in my table control currently are:-
    Called "Initial Position" :-
    My "Cursor Position" or say my selection column is at 'c' value currently.
    If I press entry down, the result should be:-
    i.e. c shifted one value down. If I press value up from "Initial Position", it should be :-
    If I press page down from "initial position", the result should be
    i.e. c has scrolled to the last entry. Similarly for page up, where the entry goes up to the first place and all entries move one position down.
    The problem i am facing is:-
    1) How to get index of entry selected?
    2) How to change table control contents at runtime?
    Edited by: dumbledorearmy on Nov 23, 2010 12:25 PM

    Please check the function module - 'SCROLLING_IN_TABLE'.
    It give you some idea.

  • My up and down arrows as well as page up and page down no longer work properly only when using firefox. Page up and down function more like the "home" and "end" keys as do the arrow keys.

    Honestly I'm not sure if these began just after I updated FF to the current release, but it's been happening for at least 2 weeks. The arrow keys and page up and page down keys all work as if I'm pressing the 'home' and 'end' keys on my keyboard. This is only when using FF. Please contact me if you need more clarification. Thanks in advance!

    Sounds that you have switched on caret browsing.
    You can press press F7 (on Mac: fn + F7) to toggle caret browsing on/off.
    * Tools > Options > Advanced : General: Accessibility: [ ] "Always use the cursor keys to navigate within pages"

  • Regarding page down in the table control veritcally

    Hi all,
              I have an issue regarding page down in the Table control in module pool , i.e when i m click the vertical scroll bar and going for page down then , the control is flowing to the next sceen which is not needed , and it shuld just scroll down and up vetically.
    Can anyone help me how to handle the page down event ?
    Thanks & regards,

    Table Controls: Examples with Scrolling
    The following example processes a table control with LOOP without parallel loop using an internal table. In addition to the scroll bar, the user can also carry out program-controlled scrolling with function codes.
    REPORT demo_dynpro_tabcont_loop.
    DATA: ok_code TYPE sy-ucomm,
          save_ok TYPE sy-ucomm.
    DATA: itab TYPE TABLE OF demo_conn,
          fill TYPE i.
          TABLES demo_conn.
    DATA: lines TYPE i,
          limit TYPE i.
    CALL SCREEN 100.
    MODULE status_0100 OUTPUT.
      DESCRIBE TABLE itab LINES fill.
      flights-lines = fill.
    MODULE fill_table_control OUTPUT.
      READ TABLE itab INTO demo_conn INDEX flights-current_line.
    MODULE cancel INPUT.
    MODULE read_table_control INPUT.
      lines = sy-loopc.
      MODIFY itab FROM demo_conn INDEX flights-current_line.
    MODULE user_command_0100 INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'NEXT_LINE'.
          flights-top_line = flights-top_line + 1.
          limit = fill - lines + 1.
          IF flights-top_line > limit.
            flights-top_line = limit.
        WHEN 'PREV_LINE'.
          flights-top_line = flights-top_line - 1.
          IF flights-top_line < 0.
            flights-top_line = 0.
        WHEN 'NEXT_PAGE'.
          flights-top_line = flights-top_line + lines.
          limit = fill - lines + 1.
          IF flights-top_line > limit.
            flights-top_line = limit.
        WHEN 'PREV_PAGE'.
          flights-top_line = flights-top_line - lines.
          IF flights-top_line < 0.
            flights-top_line = 0.
        WHEN 'LAST_PAGE'.
          flights-top_line =  fill - lines + 1.
        WHEN 'FIRST_PAGE'.
          flights-top_line = 0.
    The layout of screen 100 is:
    A resizable table control called FLIGHTS is defined. The fields of the table control are transferred from the structure DEMO_CONN in the ABAP Dictionary. The first two columns are lead columns. The corresponding fields are output fields. A title bar, column headers, and a selection column are created. The component MARK of type character with length 1 from structure DEMO_CONN is assigned to the selection column. You can select one column and several lines.
    It has the following flow logic:
      MODULE status_0100.
      LOOP WITH CONTROL flights.
        MODULE fill_table_control.
      LOOP WITH CONTROL flights.
        MODULE read_table_control.
      MODULE user_command_0100.
    The system executes a loop at PBO and PAI using the table control FLIGHTS. During the PBO loop, a module is called to fill the table control from table ITAB of the ABAP program. During the PAI loop, a module is called to modify table ITAB.
    Before the PBO loop, in the module STATUS_0100 the current number of lines of the internal table ITAB is placed in component LINES of control structure FLIGHTS. This helps the system to correctly install the scroll bar of the table control.
    During the PBO loop, in the module FILL_TABLE_CONTROL the work area DEMO_CONN is filled with values from the internal table, where the row index corresponds to the current row of the table control.
    During the PAI loop, in the module READ_TABLE_CONTROL the current number of the loop SY-LOOPC in the table control is placed an auxiliary variable. The number is dependent on the size of the screen. The rows of the internal table, whose row index corresponds to the current row of the table control, are overwritten with the contents of the work area DEMO_CONN. User input is transferred from the input fields of the control to the internal table. In particular, the internal table also contains a flag in the column MARK to indicate whether the row of the table control is selected or not.
    After the PAI loop, user input is processed in the module USER_COMMAND. The GUI status SCREEN_100 provides the appropriate function codes. You can scroll line by line or page by page, or Goto the first or last page. You can implement scrolling by setting the component TOP_LINE of control structure FLIGHTS. For page-by-page scrolling the auxiliary variable that is filled in the PAI loop by SY-LOOPC is used as the step size.

  • Page Up and Page Down in ALV Grid

    Hello Experts,
    I have a simple ALV Grid report program. . If the report displays a lot of records then the scroll ups and downs can be used. However the new requirement is to make the page up, next, prevoius, down function. I have already included a SET PF-STATUS where I copied the standard and added the page up,down,next and previous. Those buttons/icons are now active in the toolbar but its not functioning as expected, nothing happens when it is being clicked. I've read some forums and below are the propose solutions:
    - Reduce the SAP work area --> how to reduce it?
    - Most forums are about ALV Grid report in OO and Dialog programming whereas a code will be put in PAI and PBO to make the page up, down buttons to function. --> How will this be applied since the report is just a simple report program (not OO or dialog)
    What is best solution to apply in my case?
    Thanks in advance!
    Best Regards,

    hi kurtt
    Perhaps the below code, for scrolling the buttons can help u if the PF status and functionlity is already in place-
    module scroll_tab input.
    data: v_lines1 type sy-loopc.
    clear: ok_code,
    ok_code = sy-ucomm.
    save_ok = ok_code.
    case save_ok.
    when 'PU'. "Page Up
    tc1-top_line = tc1-top_line - lv_looplines.
    if tc1-top_line < 1.
    tc1-top_line = 1.
    when 'PD'. "Page Down
    tc1-top_line = tc1-top_line + lv_looplines.
    if tc1-top_line > lv_lines.
    tc1-top_line = ( lv_lines - lv_looplines ) + 1.
    when 'PTU'. "Page total up
    tc1-top_line = 1.
    when 'PTD'. "Page total down
    describe table it_vbak lines v_lines1.
    tc1-top_line = v_lines1.
    endmodule. " SCROLL_TAB INPUT

  • Page up and page down in ALV

    Hi all ,
         Page up and page down are not working automatically in my ALV Grid report. I have all set in my pf-status. Do i need to explicitly write any code for that or do i need to any setting for that plz let me know .

    i hope the problem is with the Pf-status,so try to do the following and see...
    Go to SE41 give the Program name SAPLKKBL
    and status as STANDARD
    now click Copy status (CTRL+F6), now give your Program name , and PF-status and copy it. now save it and activate the pf-satus which you have copied. and use it in your PF-status form.pass that status using the parameter call back status option.
    * I_BUFFER_ACTIVE = ' '
    i_callback_program = g_repid
    i_callback_pf_status_set = 'STATUS'
    i_callback_user_command = 'USER_COMMAND'
    *- Pf status
    SET PF-STATUS 'STATUS' excluding p_extab.
    "this is i copied it from standard program
    ENDFORM.                 " STATUS
    now check it.

  • I am unable to control page up and page down in JdbTextField

    I am unable to control page up and page down keys in JdbTextField if I press these keys in that field, above that I have one table(jdbTable) the focus going to the table through the rows and when I page up/down.

    If you close all the windows and quit word, next time you restart, DO NOT check "Reopen windows on login".
    Also, check your login items for your user account.

  • Page up and page down keyboard commands

    I just installed CS4 on my laptop. The page up and page down keyboard shortcuts are not responding. That's a big handicap. I know these are default commands to go to edit points. Do I need to to go somewhere in preferences to check for defualt commands. I have been using earlier versions of CS for some time and I don't remember having to do anything like that previously. It seems logical to me that I must be overlooking something simple. Thanks in advance for any insight.

    Thank you Bill. I have tried that about as many ways
    as a person can. Its just a dead key response. Since I just started on CS4, I could use some tutorials on this. Do you have any links for free tutorials?
    thanks in advance for your help

  • Wireless Keyboard Page Up and Page Down Help

    The wireless keyboard for my iMac omits many common keys found on full size keyboards.
    One application I am running (Battlefield 2142) requires the use of "page up" and "page down" among others.
    By random effort, in happens that "Control" + "up arrow" worked for "page up".
    Does anyone know where I can find a resource showing these built-in key board sequences.
    In System Preferences there are the keyboard short cuts that can be configured, but many are missing. The control "up arrow" was not listed here for "Page Up:, nor are others like "Home", "End".
    My assumption is that these are not officially considered keyboard short cuts.
    Any help, appreciated.

    a - this forum is not dedicated to hardware but to the Numbers application.
    b - I don't own such a keyboard but, I'm quite sure that the asked info is available on your machine.
    Apple menu > System Preferences
    open the prefPane named Keyboard and Mouse
    click on the tab named "Keyboard Shortcuts"
    You will get a list of many shortcuts descriptions.
    I assumes that the wanted ones are available in this list.
    Are you sure that the response is not available in the manual delivered with the keyboard?
    Yvan KOENIG (from FRANCE lundi 21 janvier 2008 19:30:51)

  • Suggestion: page up and page down

    Am I the only one who'd like it if the default behavior for the Page Up and Page Down keys while editing in Keynote was to change slides? Right now, I usually hit them after editing in a text box or clicking on a slide in the Slides pane. In either case, they don't advance or back up the slide. In the former case, they don't do anything. In the latter case, they page up in the Slides pane, but this isn't useful 99% of the time.
    Just my $0.02.

    Go to >Tools>Options>Advanced and uncheck the "Use Autoscrolling" and "Always use the cursor keys to navigate..."
    That worked for me.

  • IB51, IB52 : Page up & Page Down option for table control disabled

    Hi experts,
    IB51, IB52 Page up & Page Down option for table control is disabled.
    We want to use these options in the table control while recording .
    Can any one tell us?

    You can refer to Note 379208 .
    The same is applicable in CRM too.
    Thanks ,

  • CS5.5 Trial Page Up and Page Down Not Working

    I'm working in CS5.5 and the shortcut keys Page Up and Page Down are not working. I have the standard seting EDIT > KEYBOARD SHORTCUTS > Go to Next Edit Point = Page Down Id. Page Up.
    The HOME and END keys are working.
    Any tips on how I can get this working?

    Yes. I just discovered tha trick. 
    You're saying the tracks have to be "highlighted", clicked on to target a track.
    I'm not one to ever complain about flexibility.
    So how does targeting tracks also work when "respond[ing] to the Next/Previous Edit commands"?
    There is a trick when editing that by only selecting one or more tracks will help the process?
    How would you use this feature?

  • How to write code for page up and page down buttons on alv screen?

    Page up and page down buttons are not working in general alv report. Thease buttons are in disable mode. But is stnd. transactions (tcode : fbl5n)  these are enabled and working properly, but we can't debug this with /h
    How to write code for page up and page down buttons on alv screen?

    On doing the screen debugging it took me over to    Include LSTXWFCC ,kindly check the below code.
    module cc_display.
      fcode = sy-ucomm(4).
      case sy-ucomm(4).
        when 'P--'.
          perform cc_firstpage.
        when 'P-'.
          perform cc_prevpage.
        when 'P+'.
          perform cc_nextpage.
        when 'P++'.
          perform cc_lastpage.
        when 'EX--'.
          perform cc_firstcopy.
        when 'EX-'.
          perform cc_prevcopy.
        when 'EX+'.
          perform cc_nextcopy.
        when 'EX++'.
          perform cc_lastcopy.
    I guess it can give you some lead.

  • Page up and page down does not work, it works in internet explora

    page up and page down does not work
    it works when using internet explora

    Go to >Tools>Options>Advanced and uncheck the "Use Autoscrolling" and "Always use the cursor keys to navigate..."
    That worked for me.

Maybe you are looking for