Issue finding current line when page down occurs - table control

HI experts,
How to find the current line index of the table control? The "Current line" property of table control gives the index of the current line when the cursor is in the first page. If it exceeds the first page, then it is not returning the correct value..
For example, first page has 10 lines and the cursor is in the 5th line of the 2nd page, then the index must be returned as 15.. But current line returns the value as 5..
Pls tell me how to find this.

Hi,
try this Way...
IN PBO At MODULE STATUS_<Screen-Number>.
13 is the number of cells in the Tables control
TBC_200 is the Table control Name....
  if sy-ucomm = 'PGUP'.
     if TBC_200-current_line GE 14.
        TBC_200-top_line = TBC_200-top_line - 13.
     endif.
  ENDIF.
  if sy-ucomm = 'PGDN'.
     if TBC_200-current_line lE TBC_200-lines.
        TBC_200-top_line = TBC_200-top_line + 13.
     endif.
  ENDIF.
Regards,
Prabhudas

Similar Messages

  • Not able to do page down in table control of screen

    Hello,
    I have created a table control on a screen of my report. This screen gets called from my selection screen. When I do page down or click on down arrow key to view other table entries nothing is happening. The scroll bar is not moving vertically.
    Someone told me that no coding is required to make the table scrollable vertically.
    Can someone please tell me if there is any attribute that needs to be set for this?
    Best Regards,
    Priyanka Gupta.

    Hi,
    Please go through this code.
    dataL line_count type i.         " Global declaration
    In the PAI of the table control screen.
    CASE OK_CODE.
         when 'P--'.
          clear ok_code.
          perform paging using 'P--'.
         when 'P-'.
          clear ok_code.
          perform paging using 'P-'.
         when 'P+'.
          clear ok_code.
          perform paging using 'P+'.
         when 'P++'.
          clear ok_code.
          perform paging using 'P++'.
    form paging using code.  "   NOTE  :  here "TABCTL" is your table control name
      data: i type i,
            j type i.
      case code.
        when 'P--'.
          tabctl-top_line = 1.
        when 'P-'.
          tabctl-top_line = tabctl-top_line - line_count.
          if tabctl-top_line le 0.
             tabctl-top_line = 1.
         endif.
        when 'P+'.
          i = tabctl-top_line + line_count.
          j = tabctl-lines - line_count + 1.
          if j le 0.
             j = 1.
          endif.
          if i le j.
            tabctl-top_line = i.
          else.
            tabctl-top_line = j.
          endif.
        when 'P++'.
          tabctl-top_line = tabctl-lines - line_count + 1.
          if tabctl-top_line le 0.
             tabctl-top_line = 1.
          endif.
      endcase.
    endform.                   
    Hope this will help you.
    Regards,
    Smart Varghese

  • Disable Vertical scroll but enable Page down in Table control for BDC

    Hello All
    In my 4.6C sysem , i had enabled Scroll bar in table control by  populating TABC-lines = <No of records>...Then when i try to capture the BDC recording of this , then the scrolling event is not captured in BDC , as we all know.....
    So i put few buttons on the application bar as NEXT PAGE, NEXT LINE , PREV PAGE n PREV LINE...and i did the scrolling by writing the code manually in PAI...and that is getting captured in BDC so my problem is partially solved...
    Now as u see..i have default working Scroll bar on my T.C..also i have my buttons on the application bar....i want to get rid of the vertical scrolling....so now i am NOT populating the TABC-lines field...But as soon as i do this , my  buttons stopped also working...Any idea how to get rid of this ?
    In short when i don't write : TABC-lines = no_of_records .....to remove vertical scroling.......my manual scrolling mechanism also getting disabled..
    Is it possible to remove only vertical scrolling ?
    Thanks in advance .
    Nilesh

    No reply from any one ???

  • Orphan table header at bottom of page when page breaks a table across multiple pages

    Hi all,
    I think similar questions have been asked before but I have not found an answer.
    Here's the scenario:
    I have several dynamic tables in a dynamic form.  The layout is flowed, and everything can grow and shrink as needed.  That all works.
    However, my tables have headers.  Occasionally when one of these tables is large and needs to break across multiple pages, there will be just enough room at the bottom of the previous page to show the next table header, but not enough space to show any of the related table rows.  So it ends up looking silly, with just an orphaned header at the bottom of one page, and then the table continues on the next.
    I have my tables set up so that headers get repeated on subsequent pages, by setting the header row to "repeat row for each data item" on the binding tab.  I would like to keep that functionality, but I just want to find a way to avoid these "orphaned" table headers that sometimes appear.
    I have tried the "keep with next" option.  However, although this does push the rendering of the header to the next page, it seems that according to livecycle the table still officially began on the previous page.  Therefore I get a duplicate header because of the "repeat row for each data item" option.
    I have also tried having two header rows, one that is set to only be displayed on the initial page, and the other that is set to appear only on subsequent pages (pagination tab).  This did not work - I ended up with duplicate table headers.
    Can anyone help me?
    Thanks!

    You shouldn't have "repeat row for each data item" selected for header rows.
    You should have "include header row in initial page" and "include header row in subsequent pages" selected on the Pagination tab.
    Then using a "keep with next" might work ok.

  • How to find open line items from the BSID table

    Hello Guru's
    I need some fever from you......... please any one tell me that How to find the open line items from the BSID table .
    please replay ASAP..
    Regards,
    Raghunath.S

    Hi Raghunath
    BSID and BSAD are Secondary Index tables for Customer line items. All customer open items are stored in BSID table and Cleared items are stored in BSAD table.
    Regards,
    Venkat

  • Possible to code a Find/Find Next feature for use inside a Table Control

    Hello,
    I have a Table Control that displays many lines.  Is it possible to code a Find/Find Next feature that would allow the user to enter a 'keyword' then search each line of the Table Control for existing matches?
    I have provided the user with various Selection Criteria that will filter the table control results, but there are still too many lines to visually scan for the desired result.
    I am guessing that I would place an input box and a 'Find' button onto my layout screen. Then in user command, I have to scroll through each line of the table control and check every value to see if the string contains 'keyword' When found, stop  and display table control assigning current line as Top line?
    Am I on the right track or is there a better solution already?
    Kind Regards,
    MPersson

    I've done that. It works pretty well. You might want to allow the user to search only in selected column(s) as well.
    Rob

  • Closing INDIVIDUAL lines for input in a table control

    Right, hopefully I can explain my issue clearly enough to get an answer that will help me resolve this pain in the *** issue.
    My table control has a delete function but the client doesn't want the line removed from the control table they simply want the line in question to be greyed out (closed for input). Has anyone achieved this in the past? I know it's possible to grey out columns but I can't see any way of doing individual lines.
    For all answers that help me I will shout a beer provided you are in either Sydney or Adelaide.

    Hi,
    >
    Neil Gardiner wrote:
    > Right, hopefully I can explain my issue clearly enough to get an answer that will help me resolve this pain in the *** issue.
    >
    > My table control has a delete function but the client doesn't want the line removed from the control table they simply want the line in question to be greyed out (closed for input). Has anyone achieved this in the past? I know it's possible to grey out columns but I can't see any way of doing individual lines.
    >
    > For all answers that help me I will shout a beer provided you are in either Sydney or Adelaide.
    Refer:-
    it_zekpo is my internal table w/o header line,
    wa_zekpo is work area.
    Name of input/output fields on screen are:-
    wa_zekpo-field1,
    wa_zekpo-field2, and so on...
    Add a field as flag(1) type c in the internal table and work area
    And keep a name of SELCOL in the attributes of table control as wa_zekpo-flag
    Take the group1 for all textboxes as 'ABC' in the table control
    Try using code:-
    At screen logic:
    PROCESS BEFORE OUTPUT.
    *  MODULE status_8003.
      LOOP WITH CONTROL po_tb.
        MODULE read_data.
      ENDLOOP.
    PROCESS AFTER INPUT.
    *  MODULE user_command_8003.
      LOOP WITH CONTROL po_tb.
        MODULE modify_data.
      ENDLOOP.
    In PBO
    *&      Module  READ_DATA  OUTPUT
    MODULE read_data OUTPUT.
      READ TABLE it_zekpo INTO wa_zekpo INDEX po_tb-current_line. "po_tab is table control name
      data : line_count type i.
      describe it_zekpo
      lines line_count.
      po_tb-lines = line_count + 10.
      "to increase the number of lines in table control dynamically
      if sy-ucomm = 'DELETE'. "<--when user click delete button
        if wa-zekpo-flag = 'X'. "<--if record selected
          if screen-group1 = 'ABC'.
            loop at screen.
              screen-input = 0. "disable
              screen-active = 0.
            endloop.
            modify screen.
          endif.
        else. "<--if record not selected
          if screen-group1 = 'ABC'.
            loop at screen.
              screen-input = 1. "enable
              screen-active = 1.
            endloop.
            modify screen.
          endif.
        endif.
      endif.
    ENDMODULE.                 " READ_DATA  OUTPUT
    In PAI
    *&      Module  MODIFY_DATA  INPUT
    MODULE MODIFY_DATA INPUT.
      MODIFY IT_ZEKPO FROM WA_ZEKPO INDEX po_tb-currentline.
      "this will insert a new line
      "and will modify the contents of existing line
    ENDMODULE.                 " MODIFY_DATA  INPUT
    Hope this helps you.
    Let mw know if you have any doubts.
    Regards,
    Tarun

  • More than 1 line items in bdc using table controls for BOM

    Hi....
    how do u update more than one line item for BOM using BDC table control.......
    is there any specific command for doing that.......
    hav tried d following code bt it takes the flatfile i/p FOR 2 LINE ITEMS as 2 different BOM'S.....
    would appreciate ur help....plz provide code.............
    REPORT zbdc4_cs01
           NO STANDARD PAGE HEADING LINE-SIZE 255.
    INCLUDE bdcrecx1.
    DATA : a TYPE i,
           b type i,
           c type i.
    DATA : BEGIN OF it_rec OCCURS 0,
           rec(200) TYPE c,
           END OF it_rec.
    DATA : BEGIN OF ctab OCCURS 0,
           matnr(18),
           werks(4),
           stlan(1),
           END OF ctab.
    DATA : BEGIN OF xtab OCCURS 0,
           idnrk(18),
           menge(13),
           postp(1),
           END OF xtab.
    DATA : BEGIN OF itab OCCURS 0,
           matnr(18),
           werks(4),
           stlan(1),
           idnrk(18),
           menge(13),
           postp(1),
           END OF itab.
    START-OF-SELECTION.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename            = 'C:/TEST4.TXT'
          filetype            = 'ASC'
          has_field_separator = 'X'
        TABLES
          data_tab            = it_rec.
      LOOP AT  it_rec.
        a = strlen( it_rec-rec ).
        if a = 55.
        itab-matnr = it_rec-rec+0(18).
        itab-werks = it_rec-rec+18(4).
        itab-stlan = it_rec-rec+22(1).
        itab-idnrk = it_rec-rec+23(18).
        itab-menge = it_rec-rec+41(13).
        itab-postp = it_rec-rec+54(1).
        APPEND itab.
        elseif a > 55.
        itab-matnr = it_rec-rec+0(18).
        itab-werks = it_rec-rec+18(4).
        itab-stlan = it_rec-rec+22(1).
        itab-idnrk = it_rec-rec+23(18).
        itab-menge = it_rec-rec+41(13).
        itab-postp = it_rec-rec+54(1).
        APPEND itab.
        itab-idnrk = it_rec-rec+55(18).
        itab-menge = it_rec-rec+73(13).
        itab-postp = it_rec-rec+86(1).
        APPEND itab.
        endif.
      ENDLOOP.
      PERFORM open_group.
      LOOP AT itab.
        PERFORM bdc_dynpro      USING 'SAPLCSDI' '0100'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RC29N-STLAN'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'RC29N-MATNR'
                                       itab-matnr.           "'3000000107'.
        PERFORM bdc_field       USING 'RC29N-WERKS'
                                       itab-werks.              "'UN02'.
        PERFORM bdc_field       USING 'RC29N-STLAN'
                                       itab-stlan.              "'1'.
        PERFORM bdc_field       USING 'RC29N-STLAL'
        PERFORM bdc_field       USING 'RC29N-DATUV'
                                      '11.08.2008'.
        PERFORM bdc_dynpro      USING 'SAPLCSDI' '0110'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'RC29K-BMENG'
                                      '1'.
        PERFORM bdc_field       USING 'RC29K-STLST'
                                      '1'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RC29K-EXSTL'.
        PERFORM bdc_dynpro      USING 'SAPLCSDI' '0111'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RC29K-LABOR'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_dynpro      USING 'SAPLCSDI' '0140'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RC29P-POSTP(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'RC29P-IDNRK(01)'
                                       itab-idnrk.             "'1000000232'.
        PERFORM bdc_field       USING 'RC29P-MENGE(01)'
                                       itab-menge.              "'100'.
        PERFORM bdc_field       USING 'RC29P-POSTP(01)'
                                       itab-postp.             "'L'.
        PERFORM bdc_dynpro      USING 'SAPLCSDI' '0130'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RC29P-POSNR'.
        PERFORM bdc_field       USING 'RC29P-POSNR'
                                      '0010'.
        PERFORM bdc_field       USING 'RC29P-IDNRK'
                                      '1000000232'.
        PERFORM bdc_field       USING 'RC29P-MENGE'
                                      '100'.
        PERFORM bdc_field       USING 'RC29P-MEINS'
                                      'KG'.
        PERFORM bdc_dynpro      USING 'SAPLCSDI' '0131'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RC29P-POTX1'.
        PERFORM bdc_field       USING 'RC29P-SANKA'
                                      'X'.
        PERFORM bdc_dynpro      USING 'SAPLCSDI' '0140'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RC29P-POSNR(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_dynpro      USING 'SAPLCSDI' '0140'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RC29P-POSNR(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=FCBU'.
        PERFORM bdc_transaction USING 'CS01'.
      ENDLOOP.
      PERFORM close_group.

    Hi
    Check this sample code for the Table Control in BDC:
    data: fnam(20) type c.
    move 1 to id.
        loop at TI_STAGING WHERE VENDOR = IT_STAGING-VENDOR AND DOCDATE = IT_STAGING-DOCDATE.
          concatenate 'RM06E-EPSTP(0' id ')' into fnam.
          perform bdc_field       using fnam TI_STAGING-itmcategory.
          concatenate 'EKPO-KNTTP(0' id ')' into fnam.
          perform bdc_field       using fnam TI_STAGING-accassignment.
          concatenate 'EKPO-EMATN(0' id ')' into fnam.
          perform bdc_field       using fnam TI_STAGING-material.
          concatenate 'EKPO-TXZ01(0' id ')' into fnam.
          perform bdc_field       using fnam TI_STAGING-shortxt.
          quan = ti_staging-poqty.
          concatenate 'EKPO-MENGE(0' id ')' into fnam.
          perform bdc_field       using fnam quan.
          concatenate 'RM06E-EEIND(0' id ')' into fnam.
          perform bdc_field       using fnam TI_STAGING-deliverydate.
          netpr = ti_staging-netpr.
          concatenate 'EKPO-NETPR(0' id ')' into fnam.
          perform bdc_field       using fnam netpr.
          concatenate 'EKPO-MATKL(0' id ')' into fnam.
          perform bdc_field       using fnam TI_STAGING-mategroup.
          concatenate 'EKPO-WERKS(0' id ')' into fnam.
          perform bdc_field       using fnam TI_STAGING-plant.
          ID = ID + 1.
        ENDLOOP.
    Regards,
    Vishwa.

  • Unable to scroll down in table control screen .

    Hi techies ,
    am attaching the table control screen .
    am not able to scroll down in that .
    and also may i know the reason why am not able to tick the checkbox ?
    it seems in disable mode .

    Hi Ajay,
    It was the only reason, ever i have faced...
    And other possibility is regarding tbc-lines, but i saw that you were doing this using describe table.
    Sometimes the table control will not show all the records in internal table(case while changing number of records in internal table each time )..
    At this case you have to set the lines in TBC.. using
    describe table itab lines tbc-lines.
    tbc-lines is very useful, if you want to enable a new blank line in table control, just do this
    tbc-lines = tbc-lines + 1.
    Explore all properties of table control it is very useful.
    I think, i could solved your issue.. thanks for your appreciation.
    Regards
    Sreekanth

  • How to put drop down in table control ?

    Hi All,
    I m writing one module pool program to edit table.
    I want dropdown to one field so that user can select the appropriate value. And also I want to save that record.
    So how to get the dropdown list and after editing that record how to save that in the database?
    Thanx in advance.
    -Umesh

    Hi Umesh,
    Please check this demo program RSDEMO_TABLE_CONTROL on how to add drop down list in table control. Also check this program DEMO_DYNPRO_TABCONT_LOOP_AT as well.
    To save to database you can code something like this in PAI.
    MODULE USER_COMMAND_0100 INPUT.
      SAVE_OK = OK_CODE.
      CLEAR OK_CODE.
      CASE SAVE_OK.
        WHEN 'SAVE'.
          MODIFY <database table> FROM TABLE <table control>.
          IF SY-SUBRC = 0.
          ELSE.
          ENDIF.
        WHEN OTHERS.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    Hope this will help.
    Regards,
    Ferry Lianto

  • Drop Down in table control

    Hi All,
    I am facing Problems here ;-
    I have developed a table control in WDA4 application i have 3 dropdowns which are dependent on each other i.e. when i select the entry in the first one then corresponding to that entry the data should be shown in next drop down and same goes for the third one .I am using dropdown by index here .
    Thnks ,
    Sahil

    Hello Sahiil,
          You need to bind the table to a context node and the three drop downs separately to three context nodes. when you click one one of the drop downs, populate the the other nodes.
    I hope this works for you.
    Please feel free to ask if you have any further doubts.
    Regards,
    Ritwik.

  • Drop Downs in Table Control in Web dynproABAP

    Hi All,
    I am facing Problems here ;-
    I have developed a table control in WDA4 application i have 3  dropdowns which are dependent on each other  i.e. when i select the entry in the first one then corresponding to that entry the data should be shown in next drop down and same goes for the third one .I am using dropdown by index here .
    Thnks ,
    Sahil

    hi!
    you can bind the texts property  of your Dropdownbyindex
    to the required attribute.this will populate your data.
    thanks
    vishal

  • Vertical line when Swipe down for expose

    Hi,
    everytime i use 4 fingers swipe down / press F3 for expose, one vertical line comeout on middle of screen. this vertical line only appear when use that feature. need to know whether this vertical line is product's problem and how to solve it ?
    Thanks in advance.

    The ADF uses its own glass area on the scanner bed, it is the narrow (about 1" wide) strip on the left.  Cleaning this area should resolve the issue.  A single small spot would cause the issue you are seeing.
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • Issues with subject line when moving emails to another folder

    Hi.
    For the past few months I've been having a problem moving groups of emails from my inbox to another created folder. When I move a group of emails to another folder the subject of all the emails swap with each other. The issue seems to be with the iPhone native mail app only as when I connect via iPad or web the emails are correct.
    Any help would be greatly appreciated

    Not that I'm aware of.
    Mail.app isn't a particularly scalable database in general, so you might want to look at your workflow. 
    For better or worse, email is often ill-suited as a general information-storage and transfer mechanism.
    You might be able to set up a Rule to perform the move when the message arrives; if the mail messages involved are uniquely identifiable.
    It's also possible to implement server-side rules, depending on what you're up to, and what your own mail server or particular your mail provider supports here.
    I'm using a combination of these two approaches locally.
    Or swap out for a different mail client or a mail-handling package; a package or a tool that's better suited for the scale that you're apparently working at, and the requirements you have.

  • Issue with new line when manually executing a procedure in SQL*Plus

    The below procedure works fine in SQL*Plus when the entire EXEC <procedure_name> (parameter1, parameter2, ..); is put in a single line
    SQL > exec cust_admin_util.create_schema (P_SCHEMA_NAME => 'SCOTT_01', P_SCHEMA_PWD => 'scott123', P_TBS_NAME => 'TRAG_TBS', p_temptbs_name => 'TEMP' );
    PL/SQL procedure successfully completed.I wanted to execute the same procedure with more readability. So, I put each parameters on a separate line and try to execute. But it is erroring out.
    SQL > exec cust_admin_util.create_schema
    P_SCHEMA_NAME => 'TESTUSR_01',
    P_SCHEMA_PWD => 'scott123',
    P_TBS_NAME => 'TRAG_TBS',
    p_temptbs_name => 'TEMP'
    );BEGIN cust_admin_util.create_schema; END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'CREATE_SCHEMA'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    SQL >   2    3    4    5    6    7
    P_SCHEMA_NAME => 'TESTUSR_01',
    ERROR at line 2:
    ORA-00928: missing SELECT keywordAny workaround for this ?

    Hi Tom,
    At SQL Plus,
    You have to use the -(Hyphen) as the concatenation Operator.
    For Instance,
    SQL>  exec host_command( -
    p_command => 'dir');
    PL/SQL procedure successfully completed.
    Thanks,
    Shankar                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for

  • Default Develop Settings

    I have none ticked in Lightroom. But when images come in, I have 50+ on the brightness. Why, is this? Alex

  • Problem to run XSLSample

    Hello! I3m trying to run the SXLSample (win 2000) and gets: java XSLSample iden.xsl empl.xml<root> <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"> <xsl:template match="*|@*|comment()|processing-instruction ()|text()"> <xsl:copy> <xsl

  • 2 kids - 2 ipod videos - 1 computer - HELP!

    I am using XP Pro & have 2 kids with an ipod video each wanting to use it. How can they both use different ipods on the same computer? I'm not a tech savy Mom & can use all the help I can get! THANKS! Hilton Mom

  • WISM Controllers crashing - anyone else having this problem

    Is anyone else having problems with WISM based controllers unexpected crashing? I have an open tac case and I did get a replacement module for one switch, but I am not confident that the problem will go away. The system is not logging anything to the

  • What's the different between an Operation and a Method?

    Hello, I am wondering about the difference between operations and methods. For example, if I am listing the operations of a stack, I would say: 1) Construct and Destroy 2) Push 3) Pop 4) Top 5) Empty 6) Clear ...but are some of these methods just met