Edit only single line of table control

Hi All,
I have one scenario. Suppose i have created one table control. I have two row initially which is in display mode but I want to add one more blank row which should be only editable.
Thanks,
Anjaneya.

DATA: wa_col TYPE cxtab_column.
In PBO
LOOP AT tctrl_ti-cols INTO wa_col.
      wa_col-screen-input = 0.
      MODIFY tctrl_ti-cols FROM wa_col.
    ENDLOOP.
this is to make the entire column display mode.
For  row wise display mode option,
in the table control loop module, write the code to make the screen input as zero based on the condition
  loop at  it with control tctrl_it
                           cursor tctrl_it-top_line.
    module toggle_display.
  endloop.

Similar Messages

  • No of lines in table control

    Hi,
    I want to set the no of lines in table control as equl to no of rows in the base table.Actually i designed the table control with reference to a table.
    and i am able to display the no of rows of base table in the table control also.
    But the table control is also showing the blank lines,after displaying the complete set of rows of base table.
    I would like to have the no of rows in table control is equal to no of rows of the table.(I.E there should not be any blank lines at the end  of control table).
    If any body has any idea regarding this,Let me know something.
    with Rgds,
    Anil Kumar.

    Hi,
    The statement DESCRIBE TALBE <itabname> LINES <tabctr>-lines is required to adjust/link it with the data available in your program. Creating a table control with reference to a transparent table will only specify the columns and their types. To constantly adjust the table control with your program data, you need to issue statements to inform the screen interpreter about changes carried out by abap interpreter at runtime.
    Please correct me if I am talking out of context and you need to use the control in some other way.
    Regards

  • How to read a current line in table control in dialoug program ?

    How to read a current line in table control in dialoug program ?
    this code required to provide F4 help.

    Hi,
    You can use the variable <tablecontrol>-Currentline as Ebus says but there is a problem with this.Suppose there are 10 records in the table control with only 5 records visible then when u press a page down and press F4 the first record in page 2,  <tablecontrol>-Currentline will have value of 1 instead of 6.So you will need to write a small logic for that.
    index = ( <tablecontrol>-topline - <tablecontrol>-currentline ) + 1.
    read internal table itab at index.
    Hope this helps.
    Regards,
    Vivek

  • How to determine fixed line of table control using BDC program ?

    Dear All,
    I create program using BDC that contains table control.
    Unfortunately the table control line of BDC program will depend on the resolution of our PC setting.
    Sometime I have 2 lines, sometime 3 lines (in different PC).
    How to determine fixed line of table control?
    So it will never be confusing me whether I have 2 or 3 lines.
    Thnx - Regards,
    (Taufik K.)

    Hi Taufik,
    Check the table CTU_PARAMS and field DEFSIZE for setting fixed line of a table control.
    CALL TRANSACTION 'VA01' USING it_bdcdata
    OPTIONS FROM OPT
    MESSAGES INTO it_mesg.
    opt of type ctu_params.
    WA_CTU_PARAMS-DISMODE = 'N'. "no screen mode
    WA_CTU_PARAMS-UPDMODE = 'S'. "synchronus update
    WA_CTU_PARAMS-NOBINPT = 'X'.
    WA_CTU_PARAMS-NOBIEND = 'X'.
    WA_CTU_PARAMS-DEFSIZE = 'X'. "Default size
    Default size will play good role in terms of resoultion. in one system in table control you can see 10rows, but in others system it will show 20 records. it depends on resoultion. but when you set the default size then it will take same (default screen size) in all the systems when you run BDC.
    Reward if helps.
    Regards,
    Senthil
    Message was edited by: senthil kumar

  • How to view lines in table control after pressing vertical scroll bar

    Hi Experts, 
    I created table control in MPP, While design my layout I design table control with 12 lines(Fixed),  But I am moving my internal table values to table control. my internal table have more then 12 lines. My problem is I cant view my 13, 14th line in table control.  Could you help me in solve this issue?

    Please make sure that you have used the following code in the PBO
    DESCRIBE TABLE it_tab LINES tab_ctrl-lines.

  • Not able to view more than two line in table control

    Hi all,
    I am not able to see more than two lines in table control. Although my table control height is 21...
    Please see attached pic and suggest me what to do.

    hi,
    You have to set the LINES property of the table control In the PBO of your screen, to the number of entries in the internal table.
    data: lv_line type i.
    DESCRIBE TABLE  gt_table LINES lv_line.
    table_control-lines = lv_line + 1.
    or else
    You can do two thing in table control properties check horizontal and vertical scroll options plus in PBO you can based on number of lines in internal table assign it to TC_ABC-LINES if no lines are there then add by default 20..10.. any number of lines as you want.

  • How to Enable a Selected single record from Table control...

    Hi,
    I have 5 records in my table control and in screen Painter in Made all the fields in Table control as Output field.
    and  successfully all my Table control fields are disabled...
    Now Now i want to enable the record which i selected n rest all the 4 records should be in Disable.
    what i did is:
    in PBO.
    loop at itab into wa with contol TBC1 .
    Module XYZ.
    endloop.
    Module XYZ.
    loop at screen.
    if screen-group = 'x'.
    screen-input =  1.
    modify screen.
    endif.
    End Module.
    Please help me....
    Thanks,

    hi
    in the layout of the screen u might have dragged and dropped the table control
    double click on it u will get attributes screen in that u select MULTIPLE or SINGLE under Line-Selection
    under attributes tab based on ur requirement.
    table control declaration:
    controls : control type tableview using screen 8000.
    the internal table in table control must be like
    data : begin of itab occurs 0,
    empno type .......,
    empname......,
    empcity.....,
    check(1), " for tab selection"
    end of itab.
    data : itab1 like itab occurs 0 with header line.
    data : flag.
    data : wk_init type i.
    data : lines type i.
    in the attributes screen of the table control
    pass the value ITAB-CHECK to the field W/SELECTION
    in SE51
    PBO
    Module_status_0800
    loop with control table_control_name.
    module_fill_tcontrol.
    endloop.
    PAI
    Module_user_command_0800
    loop with control table_control_name.
    module_read_tcontrol.
    endloop.
    in se38
    Module_status_0800.
    describe table itab1 lines lines.
    control-lines = lines.
    endmodule.
    Module_fill_tcontrol.
    describe table itab1 lines wk_init.
      if wk_init is not initial.
        read table itab1 into itab index control-current_line.
      endif.
    for enabling a row in the table control:
    if sy-ucomm = 'EDIT'.
        loop at screen.
          if flag is initial.
            screen-input = 0.
          elseif ( flag eq 'Y' ).
            if  ( ( screen-name = 'ITAB-EMPNO' or
                    screen-name = 'ITAB-EMPNAME' or
                    screen-name = 'ITAB-EMPCITY' )   
              and control-line_selector eq itab-check
              and control-current_line le lines ).
              screen-input = 1.
            else.
            endif.
          endif.
          modify screen.
        endloop.
      endif.
    endmodule.
    Module_read_tcontrol.
    READ TABLE itab1 INDEX control-current_line.
    IF sy-subrc EQ 0.
    MODIFY itab1 FROM itab INDEX control-current_line.
    ELSE.
    MOVE-CORRESPONDING itab TO itab1.
    APPEND itab1.
    CLEAR itab1.
    ENDIF.
    endmodule.
    module_user_command.
    case sy-ucomm.
    when 'EDIT'. -
    > Function Code assigned to the pushbutton to enable the field 
          flag = 'Y'.
    endcase.
    endmodule.
    Regards
    Murali.M

  • Table borders in Dreamweaver cs4 design view too big, I would like to have a single line for tables

    Hi All,
    I design email templates using only tables but the design view options in cs4 only provide a huge 3px border in order to display the tables. In older versions of macromedia etc the table view is only 1px wide which makes designing a whole lot easier.
    When I add tables within tables it adds more spacing and looks way off and it also looks off in browsers, causing me to have to increase and decrease padding sure this is no way to create table even if they have no borders and the table width is already fixed?
    I have tried turning borders off in visual aids but there is no option to have just a single line to demonstrate a border!!
    I can't work like this, can anybody help me or is this just the way borders are displayed in cs4 for the pc???

    Hi Guys, thanks for getting back to me.
    the problem is purely about design view display and not about coding.
    Below is how CS4 displays borders with two lines which I find difficult to decipher:
    Then below is Macromedia DM 8 and this how I want the borders to look, with single lines to display the tables.
    This may just be the way Abobe have decided to display tables in design view and there may not be any option to change it but if you know any way to change it I would be most greatful.
    Thanks again.
    G

  • Issue with selecting a line on table control

    Hello Experts,
    We have a table control and using w/ SelColumn for selecting the highlighted line on a table control. It's working fine sometimes but not working in other cases. It's really wierd.
    On this screen, under the Table Control, we have provided Bottons do some functionality.
    When the users select a row and click on this push button, it has to call another pop-up screen.
    We have the code like this:
    PROCESS BEFORE OUTPUT.
      MODULE INIT_0600.
      LOOP AT T_qacomp_prt INTO qacomp_prt WITH CONTROL TC_qacomp_prt.
        module fill_part_number.
        MODULE Gray_Parts.
        FIELD T_qacomp_prt-MARK.
        module highlight_lines.
        MODULE LINES_0600.
      ENDLOOP.
    PROCESS AFTER INPUT.
      MODULE CANCEL_600 AT EXIT-COMMAND.
      LOOP AT T_qacomp_prt.
        FIELD T_qacomp_prt-MARK.
        MODULE READ_TABLE_CONTROL_600.
      ENDLOOP.
      MODULE USER_COMMAND_0600.
    In User-Command the code is like this:
    MODULE USER_COMMAND_0600 INPUT.
      when 'ADD'.
       if t_qacomp_prt-mark = 'X'.
        get cursor line lin.
      call screen 0615 starting at 30 15.
    else.
       message i999(zxx) with 'Please select a line'.
    endif.
    For eg, When there are 5 lines on the table control, If I select the 2nd line and click on "ADD", it is calling the pop-up correctly.
    However, If I select the 4th line and click on "ADD" button, it is giving the message "Please select the line".
    PS: PBO, PAI code already exists, I only added the "USER-COMMAND" code.
    Can you please let me know what went wrong? I greatly appreciate your help.
    Thanks.

    Hi,
    Provide a Check box for that table control. Declare that Check box field as Type c in Main program. Go to screen PAI module write code for deleting that lines by clicking one button using sy-ucomm. Delete it where is_chk = 'X'..like try

  • Single selection in table control

    hii all..
    I am stuck at a very unique problem. i have created a table control to display some data. from that control user can select only a single row. So for that i have set the table control attribute single row selection. Now the problem is suppose i have 50 rows in my internal table that is showing in table control. In the table control 25 rows are displayed at a time. When user presses Page down the next 25 rows are displayed.
    Now when table control is showing first set of 25 rows, a user is able to select only a single row according to the attribute that i have set. But when a user selects any row in the first 25 rows and presses Page down and then selects another row in the next set of 25 rows, both the previous selection and the current selection are retained which i didnt wanted.
    How can i solve this problem.... really got stuck
    points guranteed!!

    Hi,
    In every PAI count the no. of selected records and in every PBO if the count is greater than one, then give the information message and unselect all those selected rows.
    <u>Example</u>:
    CONTROLS flights TYPE TABLEVIEW USING SCREEN 100.
    DATA: count type i.
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
      if count > 1.
        count = 0.
        message 'You can select only a single Record' type 'I' .
        loop at itab into wa.
          wa-mark = ' '.
          modify itab from wa.
        endloop.
      endif.
    ENDMODULE.
    MODULE count_selected_rows INPUT.
        loop at itab into wa.
          if wa-mark = 'X'.
            count = count + 1.
          endif.
        endloop.
    ENDMODULE.                 " count_selected_rows  INPUT\
    <b>Screen FlowLogic</b>
    PROCESS BEFORE OUTPUT.
      MODULE STATUS_0100.
        LOOP AT ITAB INTO DEMO_CONN WITH CONTROL FLIGHTS.
      ENDLOOP.
    PROCESS AFTER INPUT.
      MODULE CANCEL AT EXIT-COMMAND.
      LOOP AT ITAB.
        module read_table_control.
      ENDLOOP.
        module count_selected_rows.
      module user_command_0100.
    <b>Reward if useful,</b>Regards,
    Sudheer

  • How to disable single cell in table control.

    Hi my requirement is to disable single cell in the table control. Please let me know How to do this.
    If possible please provide good module pool examples.
    Harish

    Hi,
    I´m not quite sure if this is gonna work. You have to make a loop over the screen and then you can change some characteristics of it, which includes the Input option:
      LOOP AT SCREEN.
        IF screen-group1 = 'ABC'.
          screen-input = '0'.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    I´ve used this code for selection screens but could help you. Check in SE11 all options for SCREEN.

  • Issue with number of lines in Table control for an web transaction in ITS

    Hi,
    We have acustom web transaction ZC03 where we have used table controls. Recently a kernal patch has been installed and after that the number of lines appearing in table control has got changed. Earlier table control was coming with 5 lines and presently its coming with 3 lines. Can you please help me to fix the issue.
    The  code used in HTML template for table controi is given below:
    `SAP_DynproLayerBegin(005,013,067,006)`
      `SAP_TableControl("TC_TIME1")`
        `SAP_DynproLayerEnd()`
    I have tried other alternatives like  `SAP_DynproTableControl("TC_TIME1")`, `D_TableControl("TC_TIME1') but did n't get any fruitful result also.
    Thanks and Regards,
    Ranadev

    What where the precise Kernel updates? What where you on and what did you upgrade too?
    Did you apply any BASIS Support Pack corrections during the Kernel upgrade?
    If you applied a new BASIS support pack - check the following WIKI:
    [How to check the publishing Date of an Internet Service|http://wiki.sdn.sap.com/wiki/x/OYG8BQ ]
    if you need to republish - use the following WIKI:
    [How to activate, publish and test ITS services in the integrated ITS?|http://wiki.sdn.sap.com/wiki/x/kmE ]
    Regards,
    Oisin

  • Determine Lines in Table Control During BDC

    Hello
    I am trying to determine the number of lines shown on a screen for a table control during a BDC session.  I know the number of lines shown in the table can be different as users can have different screen size, fonts, etc.  My goal is to know how many lines are on the screen in the table so then I know how far I have to page down before I can select the appropriate line I want and then proceed with the BDC.  Any help is greatly appreciated.  Thanks.

    Eric
    If you use CALL TRANSACTION to run your BDC you can resolve your problem passing the parameters OPTIONS FROM <your structure> with these informations:
    <your structure>-DISMODE = 'N'. "BackGround
    <your structure>-UPDMODE = 'S'. "Synchronous
    <your structure>-DEFSIZE = 'X'. "This field indicate that screen will be in standard size. So the lines you have in transaction SHDB will be always the same.
    *The <structure> will be like CTU_PARAMS.
    CALL TRANSACTION <tcode> OPTION FROM <your structure>.
    Have some ways to count the lines during the execution of BDC, but I need to find in my programs.

  • I need two header line in table control

    Hi all,
    I am using table control. The requirement is to have 2 headers in the table control. for example., if their is field name ' Vendor Comments', I need to display 'Vendor' in one line and 'Comments' in next line. Is it possible to have such 2 headers for 1 field?
    If have answer please reply me.
    Thanks in advance,
    Kaarthick

    You cannot do this in table control in dynpro environment. Maybe you can check the ALV to get more flexibility about header titles.

  • Add Line in Table control

    Hi,
       I have a proble in table control where my table control have 3 lines and when i enter three records i can see the records in table control scrren and when i want to add a 4 th line  i need to press a BUTTON.when i press the button a new line inserted but i need to scroll to see the fourth record,but my req ments is to see the 4th record in the 3 rd line of the table control and 3 rd will be seen in the 2 nd line of the table control. Is there any good soultions to achieve this.
    Thanks,
    Deesanth

    Hi Deesanth,
    In the PBO of the screen just add code:-
    tab_ctrl-lines = tab_ctrl-lines + 10. "tab_ctrl is name of table control
    This will insert 10 extra line in the table control.
    You can see these empty line when you scroll the vertical scroll bar of the table control.
    Hope this solves your problem.
    Thanks & Regards,
    Tarun Gambhir

Maybe you are looking for