Processing of Rows in the Non-visible area - Table Controls

Hi,
     I have a table control. At any given point on the screen the table control displays 17 rows. now there is a functionality thru which the user will be able to paste some values into a particular column of the table control from the clipboard. Then the user will press save to save all the data on the table control into a DB table. the problem is the rows that are not visible on the screen i.e. the rows that has to be seen by scrolling the table control. while looping the table control these rows are not getting looped i.e. the looping ends with first 17 visible rows. how do i make the table control loop at the remaining records also?

suppose, your table control name is 'table0'
and you declare it as :
'controls  table0 type tableview using screen 100.'
so to process all rows of this table control you should assign for it
'table0-lines = n.'
where n is row count that you know.
then you can use following statement
'LOOP AT <internal table> CURSOR <scroll-var>
[WITH CONTROL <table-control> ]
[FROM <line1> ] [TO <line2> ].
...<actions>...
ENDLOOP.'
result: all n rows will be processed. in your case n is greater than 17.

Similar Messages

  • One row as editable and other row as non-editable in table control

    Hi Experts,
               Is this possible to make one row as editable and another row is non editable in table control?
    My Requirement is
    1st row non editable field
    Customer code, description,amount will come from the previous screen this will be non editable for user.
    2nd row editable
    User has to enter the amount in 2nd row here the customer code description will be empty.
    If 4 customer are there
    1,3,5,7 should be non editable and 2,4,6,8 should be editable..
    Pls help me in this issue..
    Thanks in Advance!

    hI
    This is a simple Module POOL program with only Table control and nothing else
    " This is Tested to Enable one row and disabling the next row
    in TOP Include
    controls : tc type tableview using screen 100.
    DATA : OK TYPE SY-UCOMM.
    DATA : ITAB TYPE TABLE OF SPFLI WITH HEADER LINE.
    in PBO
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      LOOP AT itab WITH CONTROL tc.
       MODULE TC_MOD.
      ENDLOOP.
    in PAI
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
      LOOP AT itab.
      ENDLOOP.
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'TEST'.
      SET TITLEBAR 'TEST'.
      DESCRIBE TABLE itab LINES tc-lines.
      IF tc-lines = 0.
        tc-lines = 20.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    MODULE tc_mod OUTPUT.
      DATA : mod TYPE i.
      LOOP AT SCREEN.
        mod =  tc-CURRENT_LINE MOD 2  .
        IF mod = 1.
          IF screen-name = 'SPFLI-CARRID'.
            screen-input = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDMODULE.                 " TC_MOD  OUTPUT
    Edited by: Ramchander Krishnamraju on Jan 25, 2011 7:17 AM

  • Add a new row at the top of a table in GUI

    Hi,
    I am using JDev 11.1.1.1.0. I need to be able to let users add a new row at the top of a table and not anywhere else in the middle of table rows. I cannot seem to find a way to do it. note that it does not matter where a new row gets inserted in the db, i am only concerned about restricting the insert in the GUI to the topmost line/row.
    Thanks,
    AJ

    Hi
    Can you try with writing your custom create method in application module and calling same from UI on command button action like
    public void createNewRow()
    ViewObjectImpl vo = getVO1();
    Row newRow= vo.createRow()
    vo.insertRowAtRangeIndex(0, newRow);
    Vikram

  • How to deactivate the fields in a table control of a standard screen

    Hi,
       I have an requirement to deactivate the fields in a table control of a standard screen in ME22n transaction.I am using a BADI "ME_PROCESS_PO" and in item mathod i am looping at screen for the screen field name in the table control.But it is not working. Can anyone give me the possible solution . Thanx in advance.
    With Regards,
    Ajit.

    >
    Vivek Joshi wrote:
    > Hello Router ,
    >                      I do not want to set the focus , I want to get focus . User can click on any cell in the table and then press a button in the toolbar . Now in the event handler of the button i want to under which column User has set the focus .
    > I hope , I am clear now .
    > Thanks for your help
    > Regards
    > Vivek
    An yet you keep getting suggestions of how to set the focus.   I looked through the API documentation and I don't see anything that would suggest you can request to see where the current focus is.  Perhaps someone might still come along with a solution, but my hopes wouldn't be too high at this point.  I can pass the requirement onto Product Definition, as the use case does seem interesting.  Perhaps it is something we have even considered in the past. 
    But for now, there might be a better way to solve your problem.  It will probably mean redesign the interaction.  What exactly are your requirements?  Do you need to be able to get the data in a particular cell of table when a button is clicked?  Just throwing out some ideas here, but maybe just use the lead selection to select the row, but then have a button choice to choose the action associated with the column you want. A hack for sure - but it might work.  Also it doesn't help you right now, but in the near future update to NetWeaver 7.0, WDA does have a onColSelect event for the table.

  • How to read the field value from Table Control

    Hello Experts,
    I am creating my first Table Control Screen. Basically I have to create a screen (102) with a table control which has 2 fields: A_QTY, B_QTY and 2 Buttons: SAVE, EXIT.
    When Clicked on 'SAVE' the data (MATNR) from a previous screen (101)  and the data (A_QTY, B_QTY) from the new screen (102) should be saved into a Z-table.
    Internal table t_data has 3 fields.
    MATNR
    A_QTY
    B_QTY.
    Table Control TC_RACK was declared like this:
    controls tc_rack type tableview using screen 0102.
    I/0 Fields:
    A_QTY type ZQTY.
    B_QTY type ZQTY.
    The screen Flow Logic:
    process before output.
    module status_0102.
      loop at t_data into w_data with control tc_rack.
      endloop.
    process after input.
      module exit_0102 at exit-command.
      loop at tc_rack.
      endloop.
    module user_command_0102.
    module status_0102output.
      set pf-status 'STATUS_102'.
      set titlebar 'TITLE_102'.
      describe table t_rack lines tc_rack-lines.
    endmodule.                 "status_0102 output
    process after input.
    module user_command_0615 input.
    case ok_code.
       when 'SAVE_RK'.
       when others.
    endcase.
    endmodule.                 "user_command_0102 input
    Now for eg, when the users enter values for A_QTY and B_QTY like this:
    A_QTY     B_QTY
    1000         2000
    3000         4000
    How can I read these values and pass them to T_DATA so that I can save it into Z-table?
    I greatly appreciate your help.
    I've gone through some previously posted threads and could not understand because my knowledge in this area is preliminary.
    Thanks a lot.
    Could you please let me know
    Edited by: dev a on Jan 13, 2010 2:46 PM

    Hi dev a
    You should use
      DATA: lv_name(30) TYPE c.
      FIELD-SYMBOLS: <QTY> type ZQTY.
    GET CURSOR FIELD lv_name.   "Get the field name in table control
    check sy-subrc = 0.
    assign  (lv_name) to <QTY>.  "Here you get the value in <QTY>
    check sy-subrc = 0.
    Also use <your table control>-current_line to get the table index uo're currently on.
    Hint: Do not use GET CURSOR LINE if you want to get table index since this gives you the line relative to dialog screen
    Good luck
    Dean Q.
    Edited by: Dean Q on Jan 13, 2010 11:11 PM

  • How to find out the selected column in Table Control

    Hi all,
          How to find out the selected column in Table Control?
    Thanks & Regards,
    YJR

    Hi,
    Let your table control name in Screen painter be TC1.
    READ TABLE TC1-COLS INTO WA_COLS (some wok area)
                 WITH KEY SELECTED = 'X'.
            IF SY-SUBRC = 0.
              CLEAR: W_DUMMY, W_COL_NAME.
              SPLIT WA_COLS-SCREEN-NAME AT '-' INTO W_DUMMY
                                                   W_COL_NAME.
            endif.
    W_COL_NAME gives you the column name.
    Hope it helps.
    cheers
    sharmistha

  • Write the syntax for declaring table control in dialog programming?

    1) Write the syntax for declaring table control in dialog programming?
    2) Write the syntax to call a selection screen in a modal dialog box?

    hi,
    check this code for table control.
    DIALOG PROGRAMMING
    TABLE CONTROL
    IN SE51
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    LOOP AT ITVBAK WITH CONTROL TABCTRL. ##  TABLE CONTROL NAME
    ENDLOOP.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    LOOP AT ITVBAK.
    ENDLOOP.
    IN PAI FLOW LOGIC
    PROGRAM YMODULE_PR4 .
    TABLES : KNA1, VBAK.
    DATA : BEGIN OF ITVBAK OCCURS 0,
           VBELN LIKE VBAK-VBELN,
           ERDAT LIKE VBAK-ERDAT,
           ERNAM LIKE VBAK-ERNAM,
           NETWR LIKE VBAK-NETWR,
           END OF ITVBAK.
    CONTROLS : TABCTRL TYPE TABLEVIEW USING SCREEN '0100'.
    TO ACTIVATE SCROLL BAR
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
      CASE SY-UCOMM.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
        WHEN SPACE.
          SELECT VBELN ERDAT ERNAM NETWR
            FROM VBAK
            INTO TABLE ITVBAK
           WHERE KUNNR = KNA1-KUNNR.
          TABCTRL-LINES = SY-DBCNT.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_0100  OUTPUT

  • How to insert row in the middle of a table so that the below content will move to another page?

    I'm making a huge form in LiveCycle Designer. I want to be able to add rows in the middle o the table but in a way that the content below will move down automatically in a way it doe's in Word for example.
    Sometimes I am adding a very high new row in the middle of a page and I want the content in the below rows to be moved to another page and if it is necessary I want a new page to be automatically created on the bottom of a document or something.
    Is this possible or do I have to move everything by hand if I add new row to a table?

    If you are adding the rows at the runtime by clicking a button, then you have to use the instance Manager to add rows.. It will add rows at the end and then you need to write code to move the row at the desired location by using the moveInstance method of the instanceManager.
    If you are adding a row at the design time, then you can right clcik the row and choose to add rows below.
    Thanks
    Srini

  • Changing the background color of the row of the selected cell in table view

    How can I change the background color of the table row when user clicks on table cell in table view?
    Edited by: a_brar on May 5, 2012 11:12 PM

    You could apply the following css style (by defining a custom stylsheet with the following lines and loading it into your app).
    The last color sets the background color of the selected row while the table-view has focus (in this case to orange).
    .table-view:focused .table-row-cell:filled:focused:selected {
        -fx-background-color: -fx-focus-color, -fx-cell-focus-inner-border, orange;
    }There are quite a lot of subtleties in the css styling for the tableview (e.g. different colors for the selected row when the control has focus vs when it doesn't or when the user hovers over a selected row in an unfocussed tableview), which you may want to cater for when chaning the background color of the selected row in a table view. There is also alternate styling for when the tableview is in row selection vs cell selection mode. So you may want to look at customizing further based on the css styles in caspian.css in sdk/rt/lib/jfxrt.jar if you can understand the complex css there.

  • How to obtain the selected rows in the model with af:Table using selectMany

    Hi ,
    I am using multi select af:Table and it is based on a programmatically populated view. When the table is single select I can use the getCurrentRow at the view implementation. I wonder whether there is a way to get list of selected rows within the view implementation for the multi-select scenario.
    I saw some ways of doing it in the page's backing bean but it will be more appropriate if I could do it at the model project.
    Thanks
    My environment is JDeveloper 10.1.3.3 and jdk 1.4

    Thanks for your reply.
    What you say makes sense. I thought there might be way of setting the selected rows in the model also as we do woth the current row.
    But looks like these two different things.
    Anyway I am doing it by passing the values through the backing bean.
    Thanks

  • The first row should be editable in a table control

    Hi Everyone,
    I have a requirement for a screen, where we have a table control and we allow only a column to be in editable mode.
    Now we dont require the entire coulmn to be on editable or input mode, we require only the first entry(latest entry) to be in ediatble mode. Rest should be in display mode.
    Can we accomplish this.
    Regards,
    Raj

    Hi,
    try this way..
    PROCESS BEFORE OUTPUT.
    * Module screen GUI-Screen&Status and Screen Logic
      MODULE status_1020.
    * Table control for OUTPUT
      LOOP AT t_zcxref_classes INTO wa_zcxref_classes
           WITH CONTROL tc_batch .
        MODULE charac_classname_out.
      ENDLOOP.
    MODULE charac_classname_out OUTPUT.
    * Table control reading values from input screen & displaying on screen
      READ TABLE t_zcxref_classes INTO wa_zcxref_classes
                                INDEX tc_batch-current_line.
    * Logic for screen Display when Required Flag = 'D'
      IF tc_batch-current_line = 1.  
        LOOP AT SCREEN.
          IF screen-name = 'WA_ZCXREF_CLASSES-ATWRT'.  "Pass the field name in the table control to make disply
            screen-input = 0.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
    ENDMODULE.                 " CHARAC_CLASSNAME_OUT  OUTPUT
    Prabhuda

  • How to get the focus in a Table Control

    Hello Experts,
                         I have a simple Table control in my screen . I want to know under which column my cursor is ? Basically i want to get the focus the table control . How can i achieve this  ?
    Thanks
    Vivek

    >
    Vivek Joshi wrote:
    > Hello Router ,
    >                      I do not want to set the focus , I want to get focus . User can click on any cell in the table and then press a button in the toolbar . Now in the event handler of the button i want to under which column User has set the focus .
    > I hope , I am clear now .
    > Thanks for your help
    > Regards
    > Vivek
    An yet you keep getting suggestions of how to set the focus.   I looked through the API documentation and I don't see anything that would suggest you can request to see where the current focus is.  Perhaps someone might still come along with a solution, but my hopes wouldn't be too high at this point.  I can pass the requirement onto Product Definition, as the use case does seem interesting.  Perhaps it is something we have even considered in the past. 
    But for now, there might be a better way to solve your problem.  It will probably mean redesign the interaction.  What exactly are your requirements?  Do you need to be able to get the data in a particular cell of table when a button is clicked?  Just throwing out some ideas here, but maybe just use the lead selection to select the row, but then have a button choice to choose the action associated with the column you want. A hack for sure - but it might work.  Also it doesn't help you right now, but in the near future update to NetWeaver 7.0, WDA does have a onColSelect event for the table.

  • Editing one row at a time in a table control

    Good day all
    I need your urgent assistance with the problem below:
    At first time load, the table control needs to allow input on the first line only, validation will then be done through clicking a “check” button.  After the check has been done, table control needs to open up the second row for input and grey out the first one. This sequence needs to follow every time a check has been performed.
    After the check has been done, table control needs to show the previously entered data on the first line but grey it out, and open up only the second row for input.
    The table control has been created using a wizard with an internal table and I am working on dialog/screen programming. The table control has been created as an output control but it needs to perform as both and output and input control.
    I have made changes to the “MODULE tc_create_ph2_get_lines OUTPUT.” Which is created by the wizard as follows:
    The module is in the PBO Section.
    IF it_tab is initial.                                                                 "it_tab being the internal table that stores the data from the table control                        
         DESCRIBE TABLE it_tab LINES lv_num.
               LOOP AT SCREEN.
           IF tc_create_ph2-current_line <> 1.
             screen-input = 0.
             MODIFY SCREEN.
           ENDIF.
         ENDLOOP.
       ELSE.
    tc_create_ph2-current_line = lv_num + 1.
         LOOP AT SCREEN.
           IF tc_create_ph2-current_line <> lv_num + 1 .
             screen-input = 0.
             MODIFY SCREEN.
           ENDIF.
         ENDLOOP.
       ENDIF.
      Your assistance will be highly appreciated.

    Hi Dineo,
    This module would make all line non editable except the last line, which will be open for input.
    LOOP AT IT_ST INTO WA_ST WITH CONTROL MATERIAL CURSOR
    MATERIAL-CURRENT_LINE.
        module mod_screen.
       ENDLOOP.
    module MOD_SCREEN output.
       data : tc_lines type n.
       describe table it_st LINES tc_lines.
    *  loop at screen.
         if material-current_line le tc_lines.
          loop at screen.
           screen-input = 0.
           modify screen.
           endloop.
          endif.
    endmodule.
    When checking and saving data, after saving data delete all lines of tc internal table except the last added row, if you want only the last record to appear in the table.

  • Why Can I not Resize the Scrollbar on my Table Control?

    As below KB
    http://digital.ni.com/public.nsf/allkb/82C0B021A14F118D86257141004BA97E
    why this property node doesn't support mobile module and touch panel module, if so, how can I do? Thank you!

    This is suprising... I don't have a perfect solution fro you, but I suggest you take a look at the example here, the problem was slightly different to yours but I think you could use a similar solution.
    You can hide the vertical scrollbar of your table control and place next to it a vertical slider and use the slider's value to set the index row that's visible at the top of the table.
    Quick example attached.
    Hope it helps
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"
    Attachments:
    tbale.vi ‏14 KB

  • How to optimize the column width in Table Control

    Hi all,
          When I am displaying fields in Table Control, the columns are displayed in full length, and I am unable to see all the fields at once.
    So as in grid , where we optimize the column width using layout, do we had any property for TC to do so.
    thanks for your help.
    Points would be awarded .
    Regards,
    Anil .

    Hi,
    In Se51, you can do this one, ust open your table control and resize the TC, there is no direct option to do this for entire TC, you need to do this field by field, and arrage the TC to adjust in a Single screen. In the field parameters, you have the field lenghts, there you can minimize the length of a field
    Regards
    Sudheer

Maybe you are looking for

  • Zen v plus shows "docked" sta

    Dear All, I bought a Zen V plus mp3 player recently. I installed the s/w that came on the cd and loaded songs onto my mp3 player. Later, i wanted to remove some songs from the player and connected it to my computer. Any creative s/w that i used becam

  • Seeburger High Tech Adapter Vs EDI INT AS2 adapter?

    I have a couple of questions regarding Seeburger High Tech Adapters and EDI INT AS2 adapter. 1. My client wants to use EDI INT AS2 adapter for transmitting their EDI documents to their trading partner. Can we just buy the EDI INT AS2 adapter? If yes,

  • How to remove old version of Reader

    Removing Reader 10.0.1 I cannot run the current version of reader because I cannot remove the older one.  I am told that the "patch" does not exist. Help.

  • How to check if the GPS Antenna works?!?!?

    Dear all, I've a "small" problem. As most of you have experienced I cannot fix the signal from the satellite. I tried everything...45°, open sky (I tried even in open sea!!!) etc... So my doubt is the following: how can I be sure that my antenna is w

  • Epub books directly to ibooks mac like previously iTunes

    how can i get epub books to go directly to ibooks mac like they used to automatically go to iTunes?