Skip to Content
avatar image
Former Member

Disable a Table Column input field in a Standard Web Dynpro ?


How to make disable input field in a table in Standard Web Dynpro? I have created Enhancement Implementation and in WDDOINT Post method I am trying to write a code to disable it. What logic do I need to put?

wd_node1 = wd_context->get_child_node( name = 'EMPLOYEE' ).

wd_sub_node = wd_node1->get_child_node( name = 'TABLE1' ).

lo_inp = wd_sub_node->GET_ELEMENT( EXPORTING ID = 'EMPNO' ).


Please let me know.



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Apr 08, 2010 at 11:58 PM

    Hello Monica,

    if the enabled/disable attribute of the field is bound to the context, then you will be able to do it the way you are attempting, by setting the element attribute to the value you want.

    I would guess, however, that it is unlikely that this is the case.

    You could just enhance the layout - remove the editor for the field, and then insert your own, in a view state, or binding the enabled attribute to a attribute in the context - which I guess you would have to enhance too.

    If however, you want to just disable a column in the application for all rows, then perhaps using a configuration of the application would be an easier path - you could then easily disable the column, and it doesn't need any code/enhancement.

    Hope this helps,



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member


      You'll have to fetch the logged in user name and compare it against the list of users maintained in some Ztable and then find whether that user should have input field enabled or not.

      If you have to enable the input field for a user then just set the context attribute which you creted for enabled\ disabled to abap_false, Use the code wizard ( CTRL +F7 ) to set the attribute value.

      Another way( which chris also suggested ) can be to create 2 different application configurations ( one which have column enabled and other for column disabled ). This will result in 2 different application URL, now you can give this URL's to user based on their role.


      Manas Dua

      Edited by: Manas Dua on Apr 10, 2010 9:40 AM

  • avatar image
    Former Member
    Aug 08, 2011 at 04:30 PM

    Thanks for all your answers. It helped to resolve the issue.

    Add comment
    10|10000 characters needed characters exceeded