Cl_wd_table - enable/disable certain cells

Hello together,
I'm looking for a good solution to enable/disable certain cells in a table.
For example I have the following table (the real table is more complex - with buttons and so on...):
User
ToDo
State
A
Todo1
Done
B
Todo2
In Process
A
Todo3
In Process
B
Todo4
Done
I have different users which are working on this tabe:
- Administrator: Can edit whole table (except State column)
- Employee: Can only edit State Column where he is assigned
I think it would be difficult to work with context attributs in this case?
Is it possible to Loop over all table lines an set "enabled" Attribut in the coding?
Best Regards

Hi Uwe,
Check this below links
How to edit conditionally row of a ALV table in Web Dynpro for ABAP
ABAP WebDynpro: Can edit a cell in a column?
Thanks
KH

Similar Messages

  • ALV: how to disable editable cell and F4 in certain rows only.

    I am building a table maintenance front-end with an ALV grid using OOP concept.  Certain fields are editable and also have customised search helps assigned to them in the ALV structure defined for the grid. What I want is where I have identified an entry in my database table as being locked by another user, I want to grey the line out on the ALV grid so that the entry cannot be edited and not have f4 input whilst this entry is locked by another user.
    I can grey the line out or disable F4 but not both at the same time.  If I disable the cells of the row concerned using MC_STYLE_DISABLED, the F4 is still active and will change the contents of the cell concerned via the data_changed event method in CL_GUI_ALV_GRID.
    I have used MC_STYLE_DISABLED where I have declared  a layout in my table similiar to this:
    DATA: BEGIN OF OUTPUT OCCURS 0,
    FIELD1,
    FIELD2,
    STYLE TYPE LVC_T_STYL,
    LOCK TYPE C.
    END OF OUTPUT.
    DATA: ls_celltab TYPE lvc_s_styl.
    * Where lock identified, field LOCK set to 'X'.
    LOOP AT OUTPUT where lock = 'X'.
    ls_celltab-fieldname = 'FIELD1'.
    ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
    APPEND ls_celltab TO OUTPUT-STYLE.
    ls_celltab-fieldname = 'FIELD2'.
    ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
    APPEND ls_celltab TO OUTPUT-STYLE.
    ENDIF.
    append OUTPUT.
    I have tried adding MC_STYLE_F4_NO to field LS_CELLTAB-STYLE2 but this does not do both actions atthe same time.
    Can anyone suggest what I might be doing wrong or an alternative way around this?
    Many thanks
    Regards
    Larissa

    As I have explained, I have fields that are editable AND are F4 enabled.  What I want is for certain rows of the ALV that I do not want any procesing to occur to make all fields in that row not available for input AND not f4 enabled.  I read a lock using a lock object.  If the entry in my ALV matches the key locked in the lock object, I want that line to be in display mode only in the ALV with no F4 help being able to be called.  It happens on the grid frontend when I press enter and have checked if any of my entries in my ALV are already locked by another user. The code is too long to post here. I can disbale the editable fields using MC_STYLE_DISABLED as described above but then the little drop down to enable F4 input is still visible against the field. 
    I have got round it by calling the f4 in event HANDLE_ON_F4 to not go via the search help and set er_event_data->m_event_handled = c_yes so that the F4 hit list does not appear, but I want to get rid of the drop down marker in that field in that instance.
    Hope this is a little clearer now.
    Larissa

  • Disable input in certain cells of ALV

    Hi All,
    This probably has been posted before, but i can't find the answer to my question, I have an ALV table that requires certain cells to be disabled and enabled based on the  value.
    Can anyone guide me on how do i go about solving this? also if you have good sites/guide step by step on cell variant. please let me know.
    Help is very much appreciated.
    Thank you,
    Vinod

    You need to use Cell variant.
    Refer the Program: SALV_WD_TEST_TABLE_CV
    Also refer thread [Cell variant | Re: Table row / cell editable;
    BM

  • I have tried all the steps you listed in your FAQ sextion on enabling and disabling cookies but I am still getting the error message "cookies not enabled" on certain websites. Now what do I do?

    I have tried every step you have listed in your FAQ section for enabling and disabling cookies but I am still getting error messages "cookies not enabled" on certain websites? Why is this and what do I need to do to fix this?

    I have STILL NOT received an answer to my question as of this date. I am VERY disappointed in Firefox support.

  • Enable / disable combo box in datagrid cell

    I have a datagrid with 8 columns 2 check boxes a text box and
    5 combo boxes. I am trying to disable the combo boxes if the first
    check box is not checked. So far I am able to disable the entire
    column with the combo box in it, but what i am trying to achieve is
    if the check box is false then the 5 combo boxes are to be
    disabled.
    So what I am asking in a nutshell is is there a way to enable
    or disable particular cells in a datagrid ?
    Example
    of what I have already done
    Any suggestions will be gratefully received.

    I put the following code in that I took from samples:
    Bindable]public var test:ArrayCollection;
    private  
    function init():void
    test =
    new ArrayCollection([{label:"High", data:"high"},{label:
    "Medium", data:"medium"},{label:
    "Low", data:"low"}]) 
    Then in the mxml:
    <mx:DataGridColumn 
    headerText="From Fiscal Period">
    <mx:itemRenderer>
    <mx:Component>
    <mx:ComboBox dataProvider="{test}">
    </mx:ComboBox>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    I still get the same error: 1120: Access of undefined property test.

  • ALV enable input for certain cells only

    Hi,
    I wanna to have certain cells in my ALV grid display are ready for input.
    I am using FM 'REUSE_ALV_GRID_DISPLAY'.
    Appreciate for any help.
    Many thanks
    Alia

    HI,
    i am sending you a complete woking code ..you just run it and see the option in the output screen..select any of the check box and hit F8..and there it is.. you can modify the code to meet yur need
    Reward point if it satisfy your needs..
    REPORT ZOBJK1 .
    Use of colours in ALV grid (cell, line and column)            *
    Table
    tables : mara.
    Type
    types : begin of ty_mara,
              matnr         like mara-matnr,
              matkl         like mara-matkl,
              counter(4)    type n,
              free_text(15) type c,
              color_line(4) type c,           " Line color
              color_cell    type lvc_t_scol,  " Cell color
    end of ty_mara.
    Structures
    data  : wa_mara     type ty_mara,
            wa_fieldcat type lvc_s_fcat,
            is_layout   type lvc_s_layo,
            wa_color    type lvc_s_scol.
    Internal table
    data : it_mara     type standard table of ty_mara,
           it_fieldcat type standard table of lvc_s_fcat,
           it_color    type table          of lvc_s_scol.
    Variables
    data : okcode like sy-ucomm,
           w_alv_grid          type ref to cl_gui_alv_grid,
           w_docking_container type ref to cl_gui_docking_container.
    parameters : p_column as checkbox,
                 p_line   as checkbox,
                 p_cell   as checkbox.
    at selection-screen output.
      perform get_data.
      perform fill_catalog.
      if w_docking_container is initial.
        perform create_objects.
      endif.
    *&      Form  create_objects
    form create_objects.
      create object w_docking_container
        exporting
          ratio                       = 40
        exceptions
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          lifetime_dynpro_dynpro_link = 5
          others                      = 6.
      create object w_alv_grid
        exporting
          i_parent          = w_docking_container.
    Field that identify color line in internal table
      move 'COLOR_LINE' to is_layout-info_fname.
    Field that identify cell color in inetrnal table
      move 'COLOR_CELL' to is_layout-ctab_fname.
      call method w_alv_grid->set_table_for_first_display
        exporting
          is_layout                     = is_layout
        changing
          it_outtab                     = it_mara
          it_fieldcatalog               = it_fieldcat
        exceptions
          invalid_parameter_combination = 1
          program_error                 = 2
          too_many_lines                = 3
          others                        = 4.
    endform.
    *&      Form  get_data
    form get_data.
      select * from mara up to 5 rows.
        clear : wa_mara-color_line, wa_mara-color_cell.
        move-corresponding mara to wa_mara.
        add 1                   to wa_mara-counter.
        move 'Blabla'           to wa_mara-free_text.
        if wa_mara-counter = '0002'
        and p_line = 'X'.
    Color line
          move 'C410' to wa_mara-color_line.
        elseif wa_mara-counter = '0004'
        and p_cell = 'X'.
    Color cell
          move 'FREE_TEXT' to wa_color-fname.
          move '6'         to wa_color-color-col.
          move '1'         to wa_color-color-int.
          move '1'         to wa_color-color-inv.
          append wa_color to it_color.
          wa_mara-color_cell[] = it_color[].
        endif.
        append wa_mara to it_mara.
      endselect.
    endform.
    *&      Form  fill_catalog
    form fill_catalog.
    Colour code :                                                 *
    Colour is a 4-char field where :                              *
                 - 1st char = C (color property)                  *
                 - 2nd char = color code (from 0 to 7)            *
                                     0 = background color         *
                                     1 = blue                     *
                                     2 = gray                     *
                                     3 = yellow                   *
                                     4 = blue/gray                *
                                     5 = green                    *
                                     6 = red                      *
                                     7 = orange                   *
                 - 3rd char = intensified (0=off, 1=on)           *
                 - 4th char = inverse display (0=off, 1=on)       *
    Colour overwriting priority :                                 *
      1. Line                                                     *
      2. Cell                                                     *
      3. Column                                                   *
      data : w_position type i value '1'.
      clear wa_fieldcat.
      move w_position to wa_fieldcat-col_pos.
      move 'MATNR'    to wa_fieldcat-fieldname.
      move 'MARA'     to wa_fieldcat-ref_table.
      move 'MATNR'    to wa_fieldcat-ref_field.
      append wa_fieldcat to it_fieldcat.
      add 1 to w_position.
      clear wa_fieldcat.
      move w_position to wa_fieldcat-col_pos.
      move 'MATKL'    to wa_fieldcat-fieldname.
      move 'MARA'     to wa_fieldcat-ref_table.
      move 'MATKL'    to wa_fieldcat-ref_field.
    Color column
      if p_column = 'X'.
        move 'C610'     to wa_fieldcat-emphasize.
      endif.
      append wa_fieldcat to it_fieldcat.
      add 1 to w_position.
      clear wa_fieldcat.
      move w_position to wa_fieldcat-col_pos.
      move 'COUNTER'  to wa_fieldcat-fieldname.
      move 'N'        to wa_fieldcat-inttype.
      move '4'        to wa_fieldcat-intlen.
      move 'Counter'  to wa_fieldcat-coltext.
      append wa_fieldcat to it_fieldcat.
      add 1 to w_position.
      clear wa_fieldcat.
      move w_position  to wa_fieldcat-col_pos.
      move 'FREE_TEXT' to wa_fieldcat-fieldname.
      move 'C'         to wa_fieldcat-inttype.
      move '20'        to wa_fieldcat-intlen.
      move 'Text'      to wa_fieldcat-coltext.
      append wa_fieldcat to it_fieldcat.
    endform.

  • Enabling/Disabling PDF in Browser Option (Acrobat XI)

    Firstly, know that yes I understand that this setting is no longer found in and handled by Acrobat XI and that to enable or disable PDF in browser setting you enable/disable the add-on in IE (or other browser).
    In the hopes of making it more straightforward and convenient for users to toggle this setting, one option is being explored to create a custom Javascript action in Acrobat to write to the user registry to turn this on/off.
    Is this feasible? Can Acrobat JavaScript actions read and write to the user's registry? As we have a collection of users that need to regularly toggle this setting (for reasons I won't go into here), it would be ideal to have an easy and straightforward means to change this setting. One possibility might be a custom Acrobat JavaScript action.
    Thoughts, suggestions, ideas?
    Thank you

    Thank you. Forgive me but I want to make absolutely certain...in no way can a custom Acrobat JavaScript action change the user's registry. Is this correct? A pointer to official documentation stating such would be excellent. I have to convince someone not easily convinced

  • Hide/show or enable/disable report column

    Hi,
    I m using Oracle Apex4.0
    I m having an interactive report which has a cloumn with Link provided to it.
    I want to enable/disable the linked cloumn for certain records or else the link column can ba hidden/shown for certain records.
    How can it be done?

    Hi,
    Did you look at the Denes example ? It looks as good solution for you.
    Is your report in format like this ?
    col_1 col_2 col_link
    col_1 - column1
    col_2 - column2
    col_lnk - column with link
    in the link there is some redirection to detail page where you can provide update ?
    the link should contains record ID. correct ?
    The only possibility in your case is Denes or some other simple solution. (case solution)
    It should be good if you reproduce it on apex.oracle.com
    We can provide more help to you in there.
    Regards
    J :D

  • Updater fails 9.1.1 to 9.1.2 - msg "re-enable disabled components"

    Adobe reader 9.1.1 won't update itself via updates, nor will the stand alone updater work.
    The "re-enable disabled components" message referred to with other products pops up.
    I've deleted the app.  Deleted all pref and lib/app support files.  Reinstalled, and hit the same wall.
    The computer is PPC running 10.5.7.
    The HD is formatted w/ a case-sensitive journaled HFS.

    Michael:
    Thanks for your speedy reply.
    Adobe Reader has worked atop case sensitive file systems for me for some time.  I began using them in 10.4 Tiger, though they were introduced as an option going back to 10.3 Panther, which was released to the public 10/2003, and developers like Adobe  before that.
    If the file system is not supported then it should be clearly, and prominently noted on the download page, and perhaps a warning in the installer (if the installer can't itself test for the presence/type of file system and put up some dialog box warning of pending difficulties).
    While I don't use/have no need for the CS, I'm aware of the issues Adobe had w/ the CS suite and case sensitivity (it was just reported in the mac news) but I don't ever recollect seeing that Reader was affected.  Certainly finding out that this is the case by doing google searching, troubleshooting, and help forums takes a distant rear seat to getting warned up front.
    Just to make sure, I went to the download page (no warning), went to system requirements (no warning), and opened up the files that are downloaded (and again, no warning in the installers).
    As a layperson I have trouble imagining that the coding/development of a PDF reader would be inconsistent to the  point that it breaks down trying to point to its own components..but that is probably an oversimplification.
    Hope that it is resolved, and that until then appropriate warnings are offered to end users.
    Thanks again for your time and interest.

  • Is it possible to programatically enable/disable a schedule?

    Hi,
    I'm looking for a way to start and stop an existing schedule based on certain criteria.
    Is it possible to enable/disable a schedule programatically, from within an Action block?  Calling an HTTP URL for example?
    Thanks.

    Hi,
    One solution would be using the Illuminator service for this:
    First execute the Scheduler service with list mode (using XML query or HTTP Post action) as :
    /XMII/Illuminator?service=Scheduler&mode=List
    This will give you the list of the available scheduler configurations in the system along with the corresponding Job ID. Use XPath in BLS to retrieve the JobID from the list by the Scheduler Config name.
    Next execute the Scheduler service with Disable mode passing the JobID retrieved from :
    /XMII/Illuminator?service=Scheduler&mode=Enable&ID=<JobID>
    This will disable that particular scheduled job. To enable it use the same service with Enable mode:
    /XMII/Illuminator?service=Scheduler&mode=Disable&ID=<JobID>
    Hope this helps.
    Thanks,
    Dipankar

  • Disabling a cell or a row in a matrix

    1.is there a way to disable a cell in a matrix?
    2.is there a way to disable a row in a matrix?
    3.is there a fast way to disable all the controls on a form as a result of a checkbox change?
    rgds
    Hagai

    1) Yes
    <b>Code (C#):</b>
    // Get the item properties of a cell
    SAPbouiCOM.Item oItem = (SAPbouiCOM.Item)oMatrix.Columns.Item("LOC_CODE").Cells.Item(1);
    // Disable the cell
    oItem.Enabled = false;
    <i>Notes:
    - oMatrix is my matrix object
    - LOC_CODE is a column name in my matrix
    </i>
    2) Probatly... It can be done for each column as I described above, but there could be a better alternative?
    3) I guess not, you should disable all controls one by one

  • Multipage Crashes if enabling/disabling

    Hi folks
    This is the first time using this control and I have some real issues with it after initially thinking 'this is a cool control', no more frames and tabstrips!!  However, for no apparent reason, just enabling or disabling the multipage as the form loads or
    disabling certain controls within it in normal use causes Excel to go 100% processor, 'Not Responding' and you have to end the process.  If I click a tab and all the controls are disabled within it, I can get the same problem.  I have
    even stepped through the code where it disables a control or the multipage and it crashes after executing the line!!
    The form is very straightforward, 4 radio buttons, about a dozen text boxes spread between three pages connecting to an Access DB after doing some simple updates to a spreadsheet.  I have tried the same spreadsheet in 2003, 2007, 2010 and 2013
    on different machines and all exhibit the same problem.  Just removing a control from the form or disabling the multipage after the form is displayed seemed to solve the problem until it reared it ugly head again when I disabled all the controls on one
    tab and then selected the tab after the form was displayed...crash again.  Locking the controls instead of disabling them...all works fine!!!!
    I have only found one similar post to this and the 'clean-up tools' link is broken.  Is there anything I can do with this to identify what the problem is?  Obviously a nasty exception under the hood.

    Eventually I found out what causes this and similar problems!  When you first use an ActiveX control it caches a version of it to speed up loads the next time.  If for some reason, most recently, a security update causes the underlying DLL interface
    to change, the interface can end up being incompatible and crashes the workbook.  You can get similar problems when you move a workbook written in 32-bit to 64-bit.  On some systems you will not see any problems because a recompile would normally
    refresh the caches but various reasons can prevent them from being updated.
    mmacneill123 (MCP)

  • There is no enable/disable 3g option in iphone 4s, when will we have this option

    There is no enable/disable 3g option in iphone 4s,
    It is missing.  2G provide me that better cell coverage and less battery use.
    When will we have this option? İ dont need 3g in my daily usage, rarly i need to use 3g to get big files.
    Do we have this option in ios 5.1 we must have this!

    "When will we have this option?"
    There is no reason to believe that this will ever be an option.

  • Apple script to enable/disable dark menu bar and dock when sunsets/sunrises

    Greetings,
    Regarding the new dark menu bar and dock function in Yosemite. Would it be possible to write a script that would enable this function at a certain time say sunset and to disable it at another time say sunrise?
    If so, is there anybody who could possibly help me write such a script or atlas point me in the right direction please?
    Many thanks in advance
    G_D

    Although you can set or remove the Dark interface style with defaults write syntax, the reset back to default (non-dark) interface will require a log-out/log-in cycle to entirely remove the Dark style. Toggling this style on and off in the System Preferences > General panel does not require the preceding log-out disruption. Unfortunately, other than possible GUI scripting, the Apple Script dictionary in Yosemite is very limited with respect to System Preferences access, and enabling/disabling the dark interface style.

  • Enable/disable fields in Workspace form

    Okay here is my scenario. I need to disable some fields on a form depending on which user logs onto workspace to open the same form.
    1. User1 logs onto workspace and opens leave request form, fields at the top of the form are enabled for the user to fill out, bottom fields which are for leave request administrator to fill out are disabled but visible.
    2. User1 fills out top portion of leave request form and completes form. Workflow sends form to leave request administrators "To do" list in Workspace.
    3. Administrator opens up submitted form in Workspace and sees User1's filled out data on the form and the bottom fields are now enabled for administrator to approve or dissaprove. Bottom fields only include two check boxes, two text fields and one date field.
    Now how is this done? I am sure their maybe scripting involved? if so what is it and at what events in the form? Is this whole process done in the form or through Admin UI or Workebench as well? Please help!!!!!!!!!

    Hi Rahat,
    You can use the same form and enable/disable some fields according to the user's role with only little scripting. Review the steps the below:
    1-First place a hidden field ("user_role") in your form
    2-Insert a script object into your form onder "Variables" in object hierarchy and write a script for enabling/disabling the fields (regarding the value of "user_role")
    3-On the initialize and change events of the "user_role" call your script object
    4-On your process design, put a SetValue service before User tasks. In the asssignment you should set the desired user_role to the form, so that the script is triggered in your form and the fields are enabled/desiabled
    Fro further needs on your form or process design you can contact us from: http://www.kgc.com.tr/company_Contact.html
    Oguz
    http://www.kgc.com.tr

Maybe you are looking for

  • Why Scalar Subquery expression cannot be used in HAVING clauses?

    Hi All, I'm new to SQL. I'm confused with Scalar Subquery. Is there anyone who can answer me why Scalar Subquery expression cannot be used in HAVING clauses. Can you show me a example? Thanks very much, Xianyi.Ye Edited by: 908428 on 2012-1-16 下午7:24

  • Open Hub 3rd party tool - API not returning data table

    I am implementing a 3rd party tool to get data from BI using the Open Hub Service. I have my server running and the API functions are working somewhat, but I have two problems. When I get notified by BI (RSB_API_OHS_3RDPARTY_NOTIFY), the REQUESTID fi

  • Encrypted string is too long

    hi, I have to en/decrypt a lot of text for storing in a database. all crypt.classes I found put out an encrypted string which is much longer then the original string. that may be good for passwords, but not for real text and a limited amount of chars

  • "You are not connected to the internet"....sometimes.

    I've had to write this in IE on XP in Parallels as it is the only reliable way I can access the web. Since upgrading to 10.6, Safari (and Firefox to a lesser extent) has been giving me frequent (and instant) "You are not connected to the internet" er

  • How can i view images ?

    In some web sites (famous, big retail websites) the images are not loaded when i view a website, instead i see a square with a question mark for each picture that was supposed to be.... just to make sure, the "laod pictures" is checked on the prefere