Page Up and Page down functionality in table control

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

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

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.
    Shri.

    Hi,
    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)|https://service.sap.com/sap/support/notes/187946 ])
    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.
    Sandra

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

    Hi,
    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" :-
    a
    b
    c
    d
    e
    My "Cursor Position" or say my selection column is at 'c' value currently.
    If I press entry down, the result should be:-
    a
    b
    d
    c
    e
    i.e. c shifted one value down. If I press value up from "Initial Position", it should be :-
    a
    c
    b
    d
    e
    If I press page down from "initial position", the result should be
    a
    b
    d
    e
    c
    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?
    Thanks.
    Edited by: dumbledorearmy on Nov 23, 2010 12:25 PM

    Hi,
    Please check the function module - 'SCROLLING_IN_TABLE'.
    It give you some idea.
    Thanks.
    Anversha

  • 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.
    * http://kb.mozillazine.org/accessibility.browsewithcaret
    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"
    * http://kb.mozillazine.org/Scrolling_with_arrow_keys_no_longer_works
    * http://kb.mozillazine.org/Accessibility_features_of_Firefox

  • 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,
    satya

    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.
    CONTROLS flights TYPE TABLEVIEW USING SCREEN 100.
    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.
    SELECT * FROM spfli INTO CORRESPONDING FIELDS OF TABLE itab.
    CALL SCREEN 100.
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
      DESCRIBE TABLE itab LINES fill.
      flights-lines = fill.
    ENDMODULE.
    MODULE fill_table_control OUTPUT.
      READ TABLE itab INTO demo_conn INDEX flights-current_line.
    ENDMODULE.
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE read_table_control INPUT.
      lines = sy-loopc.
      MODIFY itab FROM demo_conn INDEX flights-current_line.
    ENDMODULE.
    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.
          ENDIF.
        WHEN 'PREV_LINE'.
          flights-top_line = flights-top_line - 1.
          IF flights-top_line < 0.
            flights-top_line = 0.
          ENDIF.
        WHEN 'NEXT_PAGE'.
          flights-top_line = flights-top_line + lines.
          limit = fill - lines + 1.
          IF flights-top_line > limit.
            flights-top_line = limit.
          ENDIF.
        WHEN 'PREV_PAGE'.
          flights-top_line = flights-top_line - lines.
          IF flights-top_line < 0.
            flights-top_line = 0.
          ENDIF.
        WHEN 'LAST_PAGE'.
          flights-top_line =  fill - lines + 1.
        WHEN 'FIRST_PAGE'.
          flights-top_line = 0.
      ENDCASE.
    ENDMODULE.
    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:
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      LOOP WITH CONTROL flights.
        MODULE fill_table_control.
    ENDLOOP.
    PROCESS AFTER INPUT.
      MODULE cancel AT EXIT-COMMAND.
      LOOP WITH CONTROL flights.
        MODULE read_table_control.
    ENDLOOP.
      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,
    Alezandro

    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,
    save_ok.
    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.
    endif.
    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.
    endif.
    when 'PTU'. "Page total up
    tc1-top_line = 1.
    when 'PTD'. "Page total down
    TC1-TOP_LINE = ( LV_LINES - LV_LOOPLINES ) + 1.
    describe table it_vbak lines v_lines1.
    tc1-top_line = v_lines1.
    endcase.
    endmodule. " SCROLL_TAB INPUT
    regards
    praveen

  • 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 .
    regards
    rao

    Hi,
    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.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    * I_INTERFACE_CHECK = ' '
    * I_BYPASSING_BUFFER = ' '
    * I_BUFFER_ACTIVE = ' '
    i_callback_program = g_repid
    i_callback_pf_status_set = 'STATUS'
    i_callback_user_command = 'USER_COMMAND'
    2.
    FORM STATUS USING P_EXTAB TYPE SLIS_T_EXTAB.
    *- Pf status
    SET PF-STATUS 'STATUS' excluding p_extab.
    "this is i copied it from standard program
    ENDFORM.                 " STATUS
    now check it.
    Regards
    vijay

  • 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
    Judy

  • 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.
    MikeK

    Hello
    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.
    MkIV

    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?
    Regards,
    Lakshmi

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

  • 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?
    Thanks.

    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?
    Thanks.

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

    Hi,
    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?

    Poonam,
    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.
    K.Kiran.

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

    page up and page down does not work @www.hkej.com/template/landing/jsp/main.jsp
    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

  • Excess amount paid, but J1INCHLN no open items

    Friends, We have paid excess for safe side  for tds while paying the challn into bank.  While updating the challn updation J1INCHLN we found short amount of open items.  How to adjust that, what to do.

  • Help me in creating wizard

    hi. can anyone guide me , how to create a wizard in SBPT_WB . Please show step by step procedure. thanks & regards, arul.

  • Photosmart 8750

    I have a photosmart photo printer 8750. Excellent printer unfortunately HP decided not to make it any longer. I now have Window 7 and of course some of the  printer's services are not available, My problem is that my pictures are cut off quite a bit

  • Stuck on gray startup screen, no apple logo - help?!

    My Powerbook chimes when I turn it on, then goes to the gray screen, but sits there, does not move forward, no apple logo, no spinning circle, no beachball, nothing. I can hold the power button to turn it off, again to turn it back on, etc., but noth

  • [svn:fx-] 21414: Moved flex/sdk/trunk to flex/sdk/tags/trunk-copy.

    Revision: 21414 Revision: 21414 Author:   [email protected] Date:     2011-06-20 11:07:48 -0700 (Mon, 20 Jun 2011) Log Message: Moved flex/sdk/trunk to flex/sdk/tags/trunk-copy. Added Paths:     flex/sdk/tags/trunk-copy/ Removed Paths:     flex/sdk/t