Haw to capture changes in table control?

Hi friends,
                please tell me the answar of this question?
                 Haw to capture changes in table control?

Hi Rinku ,
module TC100_tab_modify input.
MOVE-CORRESPONDING tc100_tab TO gt_tab.
modify GT_tab
    index TC100_TAB-current_line.
if sy-subrc <> 0.
append gt_tab .
endif.
endmodule.
Hope this helps.
Regards
Caglar

Similar Messages

  • Dynamic Changes in Table control

    Hi
    is that possible to change the table control dynamically

    Hi Rob
    my requirement is data upload from Excel to table control is over now
    some of my TL said that if i add more fields and records in that Excel than uplod the data to table control

  • How to modify changes of table control data in PAI

    I have a table control where the columns are brought by dict fields.I am able to bring data into table control through an itab.
    Now what i want is whenever user edits data in table control and clicks on save button the corresponding changes should be made in database.
    For this according to my understanding we need to (in PAI) modify the changes in itab from the table control and then in SY-UCOMM of SAVE button we need to update in database table using itab.
    For this , I am not able to write code for modifying the changes in itab from table control. Here is my code below.Please tell me how to do this.
    PROCESS BEFORE OUTPUT.
    MODULE FILL_DATA.
    LOOP AT ITAB INTO ZEMPLOYEE_MASTER WITH CONTROL EMPTABLE CURSOR
    EMPTABLE-CURRENT_LINE.
    ENDLOOP.
    MODULE STATUS_0001.
    PROCESS AFTER INPUT.
    LOOP AT ITAB.
       MODULE MODIFY_ITAB.
    ENDLOOP.
    MODULE USER_COMMAND_0001.
    REPORT  ZDATA_FORM1.
    TABLES: ZEMPLOYEE_MASTER.
    CONTROLS EMPTABLE TYPE TABLEVIEW USING SCREEN 0001.
    data: begin of itab occurs 0,
           emp_no like zemployee_master-emp_no,
           name like zemployee_master-name,
           city like zemployee_master-city,
          end of itab,
          rowno TYPE I VALUE 1.
    *&      Module  STATUS_0001  OUTPUT
    *       text
    MODULE STATUS_0001 OUTPUT.
    *  SET PF-STATUS 'xxxxxxxx'.
    *  SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_0001  OUTPUT
    *&      Module  USER_COMMAND_0001  INPUT
    *       text
    MODULE USER_COMMAND_0001 INPUT.
      MESSAGE 'Inside INPUT' TYPE 'I'.
    CASE SY-UCOMM.
       WHEN 'SAVE'.
         UPDATE zemployee_master.
       WHEN 'EXIT'.
         LEAVE PROGRAM.
    ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0001  INPUT
    *&      Module  fill_data  OUTPUT
    *       text
    MODULE fill_data OUTPUT.
      select emp_no name city from zemployee_master into TABLE itab ORDER BY emp_no.
      Describe table itab lines EMPTABLE-LINES.
    ENDMODULE.                 " fill_data  OUTPUT
    *&      Module  modify_itab  INPUT
    *       text
    MODULE modify_itab INPUT.
    * MODIFY itab from zemployee_master index
    * MESSAGE 'Inside modify_itab' TYPE 'I'.
    ENDMODULE.                 " modify_itab  INPUT

    Hi
    In the following module of your code
    MODULE modify_itab INPUT.
    MODIFY itab from zemployee_master index tc-current_line " Where TC is the name of the Table control on the Screen
    ENDMODULE.
    Table control data gets refreshed on *enter*
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/2165e990-0201-0010-5cbb-b5c2ad436140
    Cheerz
    Ramchander Rao.K

  • Table control change column position or number

    Hi Guys,
    I need to move a column from position 10 to position 5 in the standard program. I did change the table control position in screen painter by doing cut and past of columns at required positions and it does change there but it does not show column positions in the actual screen. Is there config for table control in the standard program?
    In the attributes the position number is disable. Is there some other way that I can move the columns.
    Please advise.
    Thanks,
    FS

    Thanks Manesh,
    I am using travel overview transaction PR05. Can you recommend any config area where the table column positions are maintained. Thanks.
    Regards,
    FS

  • Using Table Control

    Hi Experts,
    I am working on module pool Program using " Table Control ".
    the below code is a part of program.
    "  Here i want insert new lines ( New values ). Please tell me that how to Do? "
    MODULE USER_COMMAND_0100 INPUT.
      SAVE_OK = OK_CODE.
      CLEAR OK_CODE.
      CASE SAVE_OK.
        WHEN 'INSERT'.
       "  Here i want insert new lines ( New values ). Please tell me that how to Do? "
        WHEN 'TOGGLE'.
          LOOP AT EMPLOYE-COLS INTO COLS WHERE INDEX GT 2.
            IF  COLS-SCREEN-INPUT = '0'.
              COLS-SCREEN-INPUT = '1'.
            ELSEIF  COLS-SCREEN-INPUT = '1'.
              COLS-SCREEN-INPUT = '0'.
            ENDIF.
            MODIFY EMPLOYE-COLS FROM COLS INDEX SY-TABIX.
          ENDLOOP.
        WHEN 'DELETE'.
         READ TABLE EMPLOYE-COLS INTO COLS WITH KEY SCREEN-INPUT = '1'.
          IF SY-SUBRC = 0.
            LOOP AT ITAB INTO ZEMPLOYE WHERE EMPID = 'X'.
              DELETE ITAB.
            ENDLOOP.
          ENDIF.
      ENDCASE.
    ENDMODULE.   
    Its Urgent  
    Thank You.
    Basu

    Hi,
    WHEN 'INSERT'.
    " Here i want insert new lines ( New values ). Please tell me that how to Do? "
    <b>Append initial line to EMPLOYE.</b>
    Or
    Change the table control attribute for rows.
    Reward if helpful.

  • Table control View in Maintenance order Services tab

    Hi Experts,
    I am trying to change the table control fields of the services tab of the maintenance order , when we use PM03 control key to generate services PR.
    I try to remove some check box which are earlier defined as invisible to make it visible. However after saving the system variant system doesnt take the changes. It is coming back to the original .
    Here are couple of fields I would like to change the setting. As of now I am trying to change the below mentioned field to visible . Presently it is in invisible mode.
    Fields
    Formula::ESLL-FORMELNR,
    Form values: ESLL-FRMVAL1 to ESLL-FRMVAL5 and
    User field3:  ESLL-USERF1_TXT
    program name SAPLMLSP
    Control TC_VIEW
    I am following the below. Kindly let me know whether I am following the right step.
    1) Click on tbale setting
    2) CLick on administrator
    3) Select the field and do the necessary change to make visible or invisible.
    4)Activate
    5)Close
    6) save.
    RG
    Vinod
    Edited by: vnodpm on Feb 6, 2012 7:07 PM

    Hi,
    The IMG customizing will have greater priority than the screen table controls (also specific program logic can supersede the table controls). Check the customizing for service screen at following path:
    SPRO - Materials Management - External Services Management - Define Screen Layout
    -Paul

  • Record not shown in table control

    Hi experts,
    I am working on the module pool program with a screen 0100. There is a table control called TABL_MATR in screen 0100.
    There is no error while compiling the program. But no record shown when a record added into the table control.
    I do not want to use the headerline in the program, because I intented to do it in OO way.
    Record shown if I do like this:
    DATA: ITAB_TRAY  TYPE STANDARD TABLE OF LS_TRAY WITH HEADER LINE.
    In PBO
    loop at itab_tray  " record show in the table control
    whereas record not shown if do like this:
    DATA: ITAB_TRAY  TYPE STANDARD TABLE OF LS_TRAY.
    In PBO
    loop at itab_tray into wa_tray  " no record show in the table control
    Can someone guide me how to do it in the right way?
    Please help.
    Thanks in advance.

    Hi all,
    I have added the below images.
    1) http://i566.photobucket.com/albums/ss106/wkw510/pic6.jpg
    2) http://i566.photobucket.com/albums/ss106/wkw510/pic7.jpg
    3) http://i566.photobucket.com/albums/ss106/wkw510/pic8.jpg
    I have also followed what Devendra's suggested, however the same error message I get:
    "ITAB_TRAY" is not a structure or internal table with header line.
    As such I have changed the statement
    module fill_table_control output.
      MOVE-CORRESPONDING wa_tray TO itab_tray.
    endmodule.
    to
    module fill_table_control output.
      APPEND wa_tray TO itab_tray.
    endmodule.
    After changed, compiled no error.
    But, when I started to use the program I got another error which closed the whole SAP screen.
    Therefore I tried to change the TABLE CONTROL setting to
    4) http://i566.photobucket.com/albums/ss106/wkw510/pic10.jpg
    Now, everything is okay but I only get the latest record shows in the TABLE CONTROL. The record I inserted display more than one time, and filled all the table control.
    5) http://i566.photobucket.com/albums/ss106/wkw510/pic11.jpg
    I am wondering should we include
    MOVE-CORRESPONDING wa_tray TO itab_tray.
    or
    APPEND wa_tray TO itab_tray.
    According from Devendra, the PBO should only has this code
      loop at itab_tray into wa_tray
        with control tabl_matr
        cursor tabl_matr-current_line.
    *    module fill_table_control.   "shoule we exclude this?
      endloop.
    If I exclude the above code, the table control only show one record, regardless how many records are inserted.
    Something is not right here, but just cant find it out.
    Please help.

  • Doubt in smartform table control

    hi,
      in my smartform i want to display the table control, i got that normal table control, but i want to change the table control format, that means in write side in the tabs column no need of calculation i need event tab, how to make that?
    Thanks and regards,
    Gowri.

    Hi Gowri,
    You cannt display Table control in smartform output. As it is reporting tool. Not Dialog Module.
    In data tab of table control you can have events.
    Reward if useful.

  • Table Control Variant For ME21N - Item level - account assignment tab.

    Dear All,
    I want to change Table Control Screen that is in Me21n(Service PO)>Item level> Account Assignment  tab -> Table control.
    In that table control i want to add one column Name is OrderNo(AUFNR) ,but system is not changing the table control.
    When i m going to change table control scrren in ---> Condition tab its working fine but not for above case.
    Please guide me to solve this issue.
    Regards,
    Sanket.

    Please provide the solution.
    Regards,
    Sanket.

  • In tabstrip control to display table control

    Hi,
    I want to to display a table control under tabstrip tab , How can i write the programm.
    if any one knows pls reply me.

    hi Sridevi,
    -->create sub screen with 100 with some screen number.
    -->Create Table control..
    --> append table control screen to Tab Strip.
    --------------------- . . . . > > > > see the example below
    Scenario:
    Screen 601 has a table control named CTRL_ANVSTED.
    The table should be filled with records from the table zanvstedm
    For this purpose you use an internal table called TBL_ANVSTED
    * Declare the table control
    CONTROLS CTRL_ANVSTED TYPE TABLEVIEW USING SCREEN 601.
    *Internal table used to hold data
    DATA: TBL_ANVSTED LIKE ZANVSTEDM OCCURS 100 WITH HEADER LINE,
    * Flag for initial reading
    Data:   FLAG_INITIAL TYPE I VALUE 0.
    PROCESS BEFORE OUTPUT.
    * Read data into the table control and the internal table
    * PF status etc.
      MODULE INITIALIZE_601.
    * Read data from table anvstedm into internal table tbl_anvsted.
      MODULE INIT_TBL_ANVSTED.
    * Fill control with data from ythe internal table
      LOOP WITH CONTROL CTRL_ANVSTED.
        MODULE FILL_CTRL_ANVSTED.
      ENDLOOP.
    MODULE INIT_TBL_ANVSTED  OUTPUT.
    * Read data from table anvstedm into internal table tbl_anvsted.
      IF FLAG_INITIAL = 0.
        FLAG_INITIAL = 1.
        SELECT * FROM ZANVSTEDM INTO TABLE TBL_ANVSTED.
      ENDIF.
    ENDMODULE.
    MODULE FILL_CTRL_ANVSTED OUTPUT.
    * Fill control with data from the internal table
         READ TABLE TBL_ANVSTED INDEX CTRL_ANVSTED-CURRENT_LINE.
         IF SY-SUBRC NE 0.
           EXIT FROM STEP-LOOP.
         ENDIF.
    ENDMODULE.
    PROCESS AFTER INPUT.
    * Write changes in table control to internal table
    LOOP WITH CONTROL CTRL_ANVSTED.
      MODULE CTRL_ANVSTED.
    ENDLOOP.
    MODULE CTRL_ANVSTED INPUT.
    * Write changes in table control to internal table
       MODIFY TBL_ANVSTED INDEX CTRL_ANVSTED-CURRENT_LINE.
    ENDMODULE.
    Regards,
    Prabhudas

  • Table Control: Disabling editing for a column

    Hi everyone. Greetings from Buenos Aires, Argentina.
    First of all, I want to apologize for this question in case of it has already been made. The forum is too large to read it completely and I really need the answer, if any, to my trouble.
    I have a table control inside a screen. In it's PBO, I coded a module to change the table control attributes. I declared a work area like the line of the table control's control in order to loop it. I mean this:
    In the TOP of Table Control (I made it by using the wizard) I have this:
    CONTROLS: TC_1 TYPE TABLE VIEW USING SCREEN dynpro_number)
    And in the PBO module I have typed the following:
    MODULE control_change_attrs OUTPUT.
    DATA: wa_tc_1 LIKE LINE OF TC_1-COLS.
    LOOP AT TC_1-COLS INTO wa_tc_1.
    ENDLOOP.
    ENDMODULE.
    In the (...), I have put code with such a logic that, depending of the contents of certain fields in the dynpro, it will hide (or not) some columns of the Table Control. This part is made correctly.
    This logic, also makes (or should make) the table control to disable the input of a column, depending wether a flag is active or not. This flag is activated in other screen's PAI, which is called depending on the contents of the sy-ucomm field of this screen (the one with the table control).
    The (...) is something like this (I'll omit some parts):
    IF wa_tc_1-screen-name = 'COLUMN_TO_HIDE'.
       IF gv_flag = 'X'.
          wa_tc_1-screen-input = 0.
       ENDIF.
       MODIFY TC_1-COLS FROM wa_tc_1.
    ENDIF.
    In a PAI module of this screen, I have coded the following:
    MODULE user_command INPUT.
    CASE gv_ok_code.
       WHEN 'RUN'.
          PERFORM RUN.
        WHEN ...
    ENDCASE.
    END MODULE.
    And in the RUN subroutine, obviusly among other things, I have this:
    CALL SCREEN 0150 STARTING AT XX YY.
    In a module in the PBO of the screen 0150, I clear gv_ok_code. In a PAI module, this is what I have put:
    CASE gv_ok_code.
       WHEN 'ACCEPT'.
          gv_flag = 'X'.
          CLEAR gv_ok_code.
          LEAVE TO SCREEN 0.
      WHEN ...
      WHEN ...
    ENDCASE
    The thing is, when the contents of gv_ok_code is 'ACCEPT' and therefore the flag is activated, then the 0150 screen's PAI finishes and the previous screen's PBO is processed, I know for sure (by the mean of the debugging mode) that the table controls's atrributes are correctly modified, and the most important thing, they stay like that... But, the column desired does not gets disabled, at least not until the NEXT PBO (I mean, it gets disabled when I press the Enter key).
    Why is happening this?

    Thanks a lot for the response, Max.
    I' ve been testing your answer. When I implemented the code that you suggested, after the first PAI, the table control's columns appear as I want.
    The thing is, in order to test if the changes in the columns are reflected in the screen after the call of the dynpro no. 0150 (and the obvious return to the first one), I need to be able to select one or more table control's rows (since when I followed the table control wizard, I made it with selection column, and with multiple selection). But, after implementing your code, I'm not able any longer to select any rows.
    I click on them, but they don't turn yellow. I commented the call of the module inside the LOOP AT itab... of the PBO and I was able to select them once again, so we're sure the problem is caused because of the call to this new module. But why?
    Note: you should know, since the table control is with multilpe selection, the LOOP sentence in the PBO is like this:
    LOOP AT itable
           INTO work_area
           CONTROL tc_1
           WITH CURSOR tc_1-current_line.
    MODULE change_attribs.
    ENDLOOP.
    Does that give a hint to you?

  • How we can use table control

    Table control but without wizard.
    For instance for the table spfli, I want to design and use a table. The necessary steps for a good display and use are what?
    Thanks in advance.

    Hi,
        CHeck this sample code ... if u need more assistance means give ur mail id i will send u a document
    Working with the table control - Example
    Scenario:
    Screen 601 has a table control named CTRL_ANVSTED.
    The table should be filled with records from the table zanvstedm
    For this purpose you use an internal table called TBL_ANVSTED
    Declare the table control
    CONTROLS CTRL_ANVSTED TYPE TABLEVIEW USING SCREEN 601.
    *Internal table used to hold data
    DATA: TBL_ANVSTED LIKE ZANVSTEDM OCCURS 100 WITH HEADER LINE,
    Flag for initial reading
    Data:   FLAG_INITIAL TYPE I VALUE 0.
    PROCESS BEFORE OUTPUT.
    Read data into the table control and the internal table
    PF status etc.
      MODULE INITIALIZE_601.
    Read data from table anvstedm into internal table tbl_anvsted.
      MODULE INIT_TBL_ANVSTED.
    Fill control with data from ythe internal table
      LOOP WITH CONTROL CTRL_ANVSTED.
        MODULE FILL_CTRL_ANVSTED.
      ENDLOOP.
    MODULE INIT_TBL_ANVSTED  OUTPUT.
    Read data from table anvstedm into internal table tbl_anvsted.
      IF FLAG_INITIAL = 0.
        FLAG_INITIAL = 1.
        SELECT * FROM ZANVSTEDM INTO TABLE TBL_ANVSTED.
      ENDIF.
    ENDMODULE.
    MODULE FILL_CTRL_ANVSTED OUTPUT.
    Fill control with data from the internal table
         READ TABLE TBL_ANVSTED INDEX CTRL_ANVSTED-CURRENT_LINE.
         IF SY-SUBRC NE 0.
           EXIT FROM STEP-LOOP.
         ENDIF.
    ENDMODULE.
    PROCESS AFTER INPUT.
    Write changes in table control to internal table
    LOOP WITH CONTROL CTRL_ANVSTED.
      MODULE CTRL_ANVSTED.
    ENDLOOP.
    MODULE CTRL_ANVSTED INPUT.
    Write changes in table control to internal table
       MODIFY TBL_ANVSTED INDEX CTRL_ANVSTED-CURRENT_LINE.
    ENDMODULE.
    Using a Table control with an internal table
    Table control  : TC1
    Internal table : it_zsd00003
    In the attributes of the table control, select w/SelColumn to get a selection
    column on the table control, and give a name (In this example IT_ZSD00003-LINESEL).
    Remember to include the field IT_ZSD00003-LINESEL in the
    internal table ( linesel(1)       type c, ).
    When used with an internal table, remember to program
    the update functionality of the database tables. Update and
    validation can be done when leaving the screen or in PAI using controlname-
    current_line (E.g. TC1-current_line ) to indentify the entry in the internal table.
    process before output.
      module status_0100.
      loop at it_zsd00003 with control tc1 cursor tc1-
    current_line.
        module tc1_set_field_attr.     "Optional
      endloop.
    module status_0100 output.
      set pf-status 'SCREEN0100'.
    OPTIONAL: If it_zsd00003 hasn't allready been filled with
    data, you can do it the first time PBO is called
      module read_data.
    Setting the number of lines of the table control
      describe table it_zsd00003 lines tc1-lines.
    Optional: Place the cursor on line  g_current_line e.g. after a
    validation error has occured
      if not ( g_current_line is initial ).
        tc1-top_line =  g_current_line.
        clear g_current_line.
      endif.
    endmodule.                 " STATUS_0100  OUTPUT
    module read_data.
      if flag is initial.
        perform read_data.
        flag = 1.
      endif.
    endmodule.       
    module tc1_set_field_attr output.
    Optional: Protect some of the columns on the
    table control
        loop at screen.
          if screen-group1 = 'X'.
            screen-input = 0.
            modify screen.
          endif.
        endloop.
      endif.
    endmodule.                 " tc1_set_field_attr  OUTPUT
    process after input.
      loop at it_zsd00003.
         module modify_tc1.
      endloop.
      module user_command_0100.
    module modify_tc1 input.
    Modify an existing entry
      modify it_zsd00003 index tc1-current_line.
    OR
    Appending a new entry
      append it_zsd00003.
    endmodule.                 " modify_tc1  INPUT
    Deleting a single line selected with the selection column:
    form delete_record.
      loop at it_zsd00003.
        if it_zsd00003-linesel = 'X'.
           exit.
        endif.
      endloop.
       delete from zsd00003
           where  zdriftscenter     = it_zsd00003-zdriftscenter
    endform.                                               
    Sorting a table control
    While were on the subject. You may need a sort routine in
    case the user selects a column and desires to sort on
    its contents.  All you need is a sort icon on the
    applications toolbar of the screens GUI  to return the OK-
    code
    of 'SORT'.  You will need to copy this to the PAI of every
    screen and change the name of the module, and the actual
    itab for this screen 
    MODULE SORT_screen100 INPUT.
       CASE SAVE_OK_CODE.
          WHEN 'SORT'.
             LOOP AT T1-COLS INTO WA.
                IF WA-SELECTED = 'X' .
                   SPLIT WA-SCREEN-NAME AT '-' INTO FILE FLD.
                   SORT itab BY (FLD).
                ENDIF.
             ENDLOOP.
       ENDCASE.
    ENDMODULE.                 " SORT_screen100  INPUT
    Tom Quinn
    ESRI, Redlands, CA.  
    Scrolling the table control
    Now let's look at scrolling.
    (assume that the name of your table control is T1)
    In the screen logic you will have:
                    Loop with control T1.
                       module get_Looplines.
                    Endloop.
                        Module get_looplines.
                          Looplines = sy-loopc.
                        Endmodule.
    In the PBO of the screen you will have a module that loads
    the itab and determines the total number of lines read.
                      Module load_itab.
                            .      (select database table and
    append to itab)
                       describe table itab lines linecount.
                     Endmodule.
    We now have all the values necessary to construct a scroll
    module.
    MODULE SCROLL INPUT.
    CASE SAVE_OK_CODE.
    WHEN 'P--'.
       T1-TOP_LINE = 1.
    WHEN 'P-'.
       T1-TOP_LINE = T1-TOP_LINE - LOOPLINES.
         IF T1-TOP_LINE < 1.
            T1-TOP_LINE = 1.
         ENDIF.
    WHEN 'P+'.
       T1-TOP_LINE = T1-TOP_LINE + LOOPLINES.
         IF T1-TOP_LINE > LINECOUNT.
            T1-TOP_LINE = LINECOUNT - LOOPLINES + 1.
         ENDIF.
    WHEN 'P++'.
       T1-TOP_LINE = LINECOUNT - LOOPLINES + 1.
    ENDCASE.
    ENDMODULE.                 " SCROLL  INPUT
    Or else you can use the below code
        WHEN 'P--'.
          CLEAR SY-UCOMM.
          CTR1-TOP_LINE = 1.
        WHEN 'P-'.
          CLEAR SY-UCOMM.
          CTR1-TOP_LINE = CTR1-TOP_LINE - LINECOUNT1.
          IF CTR1-TOP_LINE < 1.
            CTR1-TOP_LINE = 1.
          ENDIF.
        WHEN 'P+'.
          DESCRIBE TABLE ITAB1 LINES N1.
          CTR1-TOP_LINE = CTR1-TOP_LINE + LINECOUNT1.
          IF CTR1-TOP_LINE > N1.
            CTR1-TOP_LINE = N1.
          ENDIF.
          CLEAR SY-UCOMM.
        WHEN 'P++'.
          DESCRIBE TABLE ITAB1 LINES N1.
          CLEAR SY-UCOMM.
          CTR1-TOP_LINE = N1.
    Other hints for using the table contro
    1. Setting the number of lines.
    2. Scrolling to a spcefic line.
    1. Setting the number of lines.
    tc1-lines = 500.
    > The problem is not in module scroll_code but rather the
    lack of module =
    > LINE_COUNT in your PBO. I have found this very reliable
    and absolutely =
    > necessary in getting the scrolling in table function to
    work. This module
    > =
    > has the following code in it:
    >
    > module line_count output.
    >     describe table itab lines tc1-lines.
    > endmodule.
    2. Scrolling to a spcefic line.
    tc1-top_line =  500.

  • Selection of records in TABLE CONTROL.

    hello friends, this is venkat.
    I have been using a table contrlo to display the contents of a custom table.
    my table control can display 10 records in one shot and my custom table had more than that. vertical scroll bar has been working properly so i can see all the records in the table control area.
    now my problam is after i selecting one record, to select another record i am using the vertical scroll bar. but the moment i am scrolling the vertical scroll bar the previously selected one becomes non selected..
    how can i select a record and still scroll down or up to select some more records..
    another doubt i had is when ever i use vertical scroll bar PAI is geeting triggered but i am not gettig any information in SY-UCOM... how can i catch this event...
    just like checking  for function code when we click on PUSH BUTTON.
    i will be very thanful if any one can give me some guidance.....
    Venkat.

    Hi Venkat,
    Basically there are 2 ways in which u can create a table control either for a internal table or for database table.
    u can use the wizard from within the screen painter OR
    create a table control manually adding individual fields and handling the table control on your own.
    in the former method, SAP generates the code behind automatically which is not really comprehendable.
    I prefer the later method where u code and have a lot of flexibility of changing the table control at a later stage.
    For information on creating table controls, please refer SAP library under
    ABAP Programming>ABAP User dialogs>Screens>Complex screen elements>Table controls

  • Problem with Table control lines

    Hi Friends,
    This is the problem with table control lines:
    I have screen with table control and I would like change the table control lines dynamicaly.
    Exp:
    In my PBO the Internal table which I am using to loop the TC is havig 7 records and its displayed with 7 records, now I have added one more record into my ITAB and now ITAB is having 8 records, when I am looping this ITAB with TC its taking the TC lines 7 only.
    here is the code:
    Initial values in gt_scr400 = 8
    Initial values in tc_scr400 = 8
    Now added one more recor into gt_scr400 , now gt_scr400  = 9.
      LOOP AT   gt_scr400
           INTO wa_scr400
           WITH CONTROL tc_scr400
           CURSOR tc_scr400-current_line.
      ENDLOOP.
    I have used this logic :
      DESCRIBE TABLE gt_scr400 LINES g_rec_300 .
      tc_scr300-lines = g_rec_300.
    but its not modifying the lines in my table control.
    How to change the TC lines based on ITAB total records.
    Thanks,
    Sridhar

    there is a field in TableViewName-xxx
    don't remember the exact field name for (total no of records)
    you can check it in debug.  when you add records in Internal table, u need to modify this field which is set at the first time when table control is populated.

  • Table control header

    Hi everyone,
    I want to change the table control header text dynamically.
    There are nearly 35 columns in my table control. So it's very difficult for me to create I/O field for every columns.
    Please suggest me if any alternative available..
    Thanks in advance,
    Sarath

    Hi Sarath,
    I guess you are left with no other option and you will have to use the Input/Output files in Output only mode so that you can change the text in the PBO module.
    Regards,
    S.Dakshna Nagarnatam.

Maybe you are looking for