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.

Similar Messages

  • Disable some columns in table control?

    Hi
    How to disable some columns in table control.
    For Ex: Table contains 8 columns.
    In first row i want to disable first 4 columns.
    in second row i want to disable last 4 columns.
    In third row i want to disable first 2 and last 2 columns.  How can we achieve this?
    Cheers,
    Venkys.

    HI
    Create three attribute in the node which is bound to the table as data source.
    say pro1, pro2, and pro3 of type wdy_boolean.
    now bind the enabled property of first four column editors to pro1, last 4 to pro2, and pro3 to first 2 and last 2.
    then go to the eventhandler of the dropdown 's on select event and write the code to update the values of these attribute
    according to the selected value.
    here is the sample code.
    DATA lo_nd TYPE REF TO if_wd_context_node.
        DATA lo_el TYPE REF TO if_wd_context_element.
            DATA lv_VAL LIKE ls_dealer1-name.
        lo_nd = wd_context->get_child_node( name = 'DEALER1').
      lo_el = lo_nd->get_element(  ).
        lo_el->get_attribute(
          EXPORTING
            name =  `NAME`
          IMPORTING
            value = lv_VAL ).
         DATA PR1 TYPE WDY_BOOLEAN.
         DATA PR2 TYPE WDY_BOOLEAN.
         DATA PR3 TYPE WDY_BOOLEAN.
      PR1 = ABAP_TRUE.
    PR2 = ABAP_TRUE.
    PR3 = ABAP_TRUE.
    IF LV_VAL EQ 'A'.
    PR1 = ABAP_FALSE.
    PR2 = ABAP_TRUE.
    PR3 = ABAP_TRUE.
       ELSEIF LV_VAL EQ 'B'.
    PR1 = ABAP_TRUE.
    PR2 = ABAP_FALSE.
    PR3 = ABAP_TRUE.
    ELSEIF LV_VAL EQ 'C'.
      PR1 = ABAP_TRUE.
    PR2 = ABAP_TRUE.
    PR3 = ABAP_FALSE.
      ENDIF.
       LO_EL->SET_ATTRIBUTE(
       NAME = 'PRO1'
       VALUE = PR1
       LO_EL->SET_ATTRIBUTE(
       NAME = 'PRO2'
       VALUE = PR2
       LO_EL->SET_ATTRIBUTE(
       NAME = 'PRO3'
       VALUE = PR3
    thanks
    sarbjeet singh

  • How to get value on the table control in infotyp e0008

    Dear Freinds
                I have written a user exit ZXPADU02 for my requirement
    as per the requirement in i have calculated  wa-poo8-bet01 = wa_p0008-ansal/12 and i have passed on to the INNNN structure .
    Nowe when do a Create or Copy for a rcord in  infotype 0008  iam not
    getting value on Q0008-betrg field on the SCREEN , since it is table control how to get data on the table Control Cell .
    Please let me knlow
    regards

    Hi Syamala,
    The try to find the name of the table control and pass the values to it.
    Of course you have to loop and endloop, the table control and mofidy it from the work area.
    Message was edited by:
            Sera

  • Disable rows of a table control

    Hi Experts,
      I want to disable a row in table control, whenever SAVE is pressed.
      Scenario: A Table control having 5 rows. User entered data in the first row and pressed SAVE, then
                    that particular row should become greyed out or disabled, so that the user cant change or edit
                    anymore.
    Thanks
    Chandan

    Hi Chandan,
    in the PBO write the code to make the field display by the below logic..
    first read the table control internal table line and check whether the field is filled if the field had value make it display mode else make it input filed..
    see the below logic how to write it..
    PROCESS BEFORE OUTPUT.
    * 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 wa_zcxref_classes-required_flag is not intial.      "if the input field has some value making as disaply
        LOOP AT SCREEN.
          IF screen-name = 'WA_ZCXREF_CLASSES-ATWRT'. "field to make as display
            screen-input = 0.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
    ENDMODULE.                
    Regards,
    Prabhudas

  • Reg:How to delete the column in table control also from database table.

    Hi Experts,
    Once again thank u all for giving the responses.
    one more doubt is how to delete the columns of table control and also the record shold delete from ztable.
    With Regards,
    Saroja.P.

    Hi,
    If you want to delete the rows in the table control and simultaneously delete it from the database table, then you can implement a 'DELETE' functionality specific to your table control. Have a MARK field (you will find that in the screen attributes of the table control -> give a name for the MARK field, you will find an additional MARK column at the beginning of your table control). You can check whatever rows you want to delete from the table control, call the delete module.
    "This portion of code inside the LOOP...ENDLOOP.
    IF sy-ucomm eq 'F_DELETE'.
       gt_itab2-check = mark.  " Store the MARK field status into your internal table's correspoding field 'check'
      MODIFY gt_itab INDEX tabcontrol-current_line.
    ENDIF.
    iF sy-ucomm eq 'DELETE1'.
      DELETE gt_itab WHERE check eq 'X'. "Your internal table does not have rows that you want to delete
    ENDIF.
    Now you can modify your database table using the MODIFY statement.
    MODIFY ZDB FROM TABLE gt_itab.

  • How to add a column in table control

    Hi ,
       Can any one tell me how to add a column in table control? My requirement is to add two columns ( custom fields ) into table control ( It is a standard program). I have added the column in the table and also in the table control. But when I am running the standard program, The newly added column is not there. But I have added in the perticular screen. Change is not reflected.
       Can anyone help me on this please.
    Thanks in advance.
    Regards,
    Lakshmi.

    Hi,
    Ensure the following :
    1. After adjusting the database, you`ll have to use the database utility and activate the table.
    2. If you have changed the standard screen, in tcode se80 -- right click on the program and click activate all. This activates all objects related to that program.
    Now execute the program.
    Reward if helpful.
    Regards

  • How to create vertical Scrollbar in table control?

    Dear All,
    How to create vertical scrollbar in table controll.?
    regards,
    Dharmesh

    Hi
    It should be created automatically, if you can't see it, try to set the field lines of table control
    PROCESS PBO
    MODULE SET_ATTR_TC.
    LOOP AT ITAB WITH .....
    ENDLOOP.
    MODULE SET_ATTR_TC.
    DESCRIBE TABLE ITAB LINES SY-TABIX.
    <TABLE CONTROL>-LINES = SY-TABIX.
    ENDMODULE.
    Max

  • How can I work lsmw with table control using mm01 appl?

    Hi
    How can I work lsmw with table control using mm01 appl?
    Is it difefrent the way we handle table control in BDC?
    Thank You

    Hi
    How can I work lsmw with table control using mm01 appl?
    Is it difefrent the way we handle table control in BDC?
    Thank You

  • How to have push button in Table control

    Hi Experts,
       I have an internal table which I populate in table control. How can I have pushbutton in table control(in every row). If done how to have funtion code which will trigger PAI.
    Thanks and regards.
    Venkat

    Hi,
    I dont think that pushbuttons will be of much use as when you click a button same code will be executed all time.
    So, you can take either selection column in table control (use the SELCOL in the table attributes)
    or you can also take a checkbox in table control and then can perform action on lines which were selected by the user.
    Hope this helps you out.
    Regards,
    Tarun

  • How to display icon status in table control

    hi, i trying to display icon in table control its not displaying
    i given below statment.
    DATA: BEGIN OF WA_MARA,
            ICON1(4) TYPE C,
             END OF WA_MARA.
         INCLUDE <list>.
    MOVE ICON_GREEN_LIGHT TO IT_MARA-ICON1.
    APPEND IT_MARA..
    when i debugging it display green icon but after run the program its display ' @08@ '   in table control.
    how to display green icon in table control help me.

    Hi,
    check the link:
    Table control in custom infotypes

  • 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 disable perticluar cell of the table on the screen,at run time?

    HI All,
    I am using table control on the screen.
    I have 5 field in the table control.
    out of which one is posnr.
    Now, if user doesnt enters the value of posnr then it should be created automatically.
    I have written the code for that ,but this perticlar cell (for which posnr is generated automatically ) should be disabled now.
    Can anybody tell me how can i do it?
    Thnx in advance.

    Hello Sanjay,
      Write a module inside the loop...endloop in the PBO of your screen. Inside the module, check the field and disable it by modifying the SCREEN table.
    loop at itab with control tctrl.
      module modify screen.
    endloop.
    module modify_screen output.
      loop at screen.
       if screen-name cs 'POSNR'.
       if itab-posnr is not initial.
         screen-input = 0.
       else.
         screen-input = 1.
       endif.
       modify screen.
       endif.
      endloop.
    endmodule.
    Regards,
    Manoj

  • 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

  • Make cells of Table control grayed out(input disabled) based on condition

    Hello Experts,
    I have a requirement where the data is getting populated in table control from my custom tables.
    Now in three columns of the table control if the data is coming as blank from z table then I have to show the cell as editable so that user can put the data and it can be saved back in custom table but If some data is coming from custom table and it is shown in the table control then the cell should be grayed out(Non Editable).
    To achive this I'm using the Following piece of code but it is not working still.
    In PBO 
    loop at   gi_actual_tc
           into gw_actual_tc
           with control tc_actual
           cursor tc_actual-current_line.
           module tc_get_lines. 
    endloop.
    MODULE tc_get_lines OUTPUT.
    data : lv_index  TYPE sy-index,
           lv_index1 TYPE sy-index.
    lv_index = sy-tabix.
    CHECK gw_actual_tc-zlc_subcon IS NOT INITIAL.
    LOOP AT SCREEN.
      IF screen-name = 'GW_ACTUAL_TC-ZLC_SUBCON'.
         lv_index1 = sy-tabix.
         IF lv_index = lv_index1.
         screen-active  = 0.
         exit.
         ENDIF.
        screen-intensified = 1.
      ENDIF.
    MODIFY SCREEN.
    ENDLOOP.
    ENDMODULE.    
    Please let me know where I'm missing the trick here.
    Thanks,
    Jai

    hi ,
    LOOP AT SCREEN.  
    IF ( screen-name = 'GW_ACTUAL_TC-ZLC_SUBCON' AND
    gw_actual_tc-zlc_subcon IS NOT INITIAL )
    OR ( screen-name = ' GW_ACTUAL_TC-ZLC_SCWORK' AND
    gw_actual_tc-zlc_scwork IS NOT INITIAL )
    OR ( screen-name = 'GW_ACTUAL_TC-ZLC_VALJOB' AND
    gw_actual_tc-zlc_valjob IS NOT INITIAL ) .
    change code  to  below code  if it is character field 
    IF ( screen-name = 'GW_ACTUAL_TC-ZLC_SUBCON' AND
    gw_actual_tc-zlc_subcon IS  INITIAL )
    OR ( screen-name = ' GW_ACTUAL_TC-ZLC_SCWORK' AND
    gw_actual_tc-zlc_scwork IS  INITIAL )
    OR ( screen-name = 'GW_ACTUAL_TC-ZLC_VALJOB' AND
    gw_actual_tc-zlc_valjob IS  INITIAL ) .
    IF field is type P or I 
    then
    IF ( screen-name = 'GW_ACTUAL_TC-ZLC_SUBCON' AND
    gw_actual_tc-zlc_subcon =0 )
    OR ( screen-name = ' GW_ACTUAL_TC-ZLC_SCWORK' AND
    gw_actual_tc-zlc_scwork =0 )
    OR ( screen-name = 'GW_ACTUAL_TC-ZLC_VALJOB' AND
    gw_actual_tc-zlc_valjob =0 ) .
    screen-input = 1.
    MODIFY SCREEN .
    ENDIF.
    ENDLOOP.
    regards
    Deepak.

  • How to set column attributes in table control?

    I have the following requirement to build a table by using table control:
    if content of col 1 = 'Y', enable input for col 2 for that line only.
    if content of col 1 = 'N', disable input for col 2 for that line only.
    So the input attribute for col 2 in each line can be different.
    How can I achieve this?
    I have tried using loop at screen or loop at tablecontrol-cols into wa_cols statements,
    but these will change the entire column attributes to either on or off, and not on individual line.
    Instead of changing the COLUMN attributes, I think I should change the CELL attributes. 
    What is the syntax for that, is there something like tablecontrol-field?
    Thanks for any help in advance.

    I still not able to get the field attributes set on individual lines.
    These are my codes, can you help again.
    PROCESS BEFORE OUTPUT.
      MODULE pbo_0200.
      MODULE zitem_change_tc_attr.
      LOOP AT   lt_asset_item
           INTO ls_asset_item
           WITH CONTROL zitem
           CURSOR zitem-current_line.
        MODULE ZITEM_CHANGE_FIELD_ATTR.
        MODULE zitem_get_lines.
      ENDLOOP.
    MODULE zitem_change_field_attr OUTPUT.
    loop at screen.
      if ls_asset_item-replace_asset = 'X'.
         if screen-group1 EQ 'FR4'.        "these are the columns I want to turn input ON or OFF.
          screen-input = '1'.
          modify screen.
         endif.
      endif.
    endloop.
    Endmodule.
    At debug mode, the screen-input did change to '1'.  Can I check the return code of the MODIFY SCREEN statement?
    I tried to initialize the colums to be output only at screen definition, but it still doesn't help.
    I don't think I have to do anything at the PAI event.
    PROCESS AFTER INPUT.
    MODULE save_cursor_position.
      LOOP AT lt_asset_item.
       FIELD ls_asset_item-replace_asset
         MODULE get_replace_asset ON REQUEST.
        CHAIN.
         FIELD LS_ASSET_ITEM-REPLACE_ASSET.
         FIELD ls_asset_item-replace_cost.
          MODULE zitem_modify ON CHAIN-REQUEST.
        ENDCHAIN.
        FIELD ls_asset_item-mark
          MODULE zitem_mark ON REQUEST.
      ENDLOOP.
      MODULE zitem_user_command.
    Thanks again.

Maybe you are looking for

  • Strange problem when trying to burn a playlist

    I have a G5 and Itunes 6 or 6.0, whatever he current one is...anyway. I put in the songs (from my "library") into my playlist. All are, say, Aiff files, and all are playable (ie I can press the space before the song and it plays fine) and all are 44/

  • Customer appointments useless re iPad 2

    On Thursday, March 10, I received a phone call from a rep at the local Verizon Wireless store that they would be receiving the iPad  2s the next day, and asking if I'd like to make an appointment to come in and pick one up. So we set up an appointmen

  • How do you delete music off of your iphone on the new i0s7?

    how do you delete music off of your iphone on the new i0s7?

  • When I try to convert a file I get no response.

    What am I doing wrong?  I have reset my password and tried several time to get a pdf converted to a doc.  I put in my email address and password then click on sign in and I get no response at all.

  • Mail forwarding with so_object_send

    Hi, I have the problem that when I resend/forward an existing mail with attachment with fm "so_object_send" the old receiver gets the mail a second time, although he is not assigned in the table "receivers". How can I avoid, this behavior??? Thanks f