Skip to Content
Technical Articles
Author's profile photo Kallol Chakraborty

Easy way to hide/disable elements(Texts/Fields) in a View of a Web Dynpro Application


This tutorial is for beginners. A requirement might come in where you have to hide fields in a Web Dynpro application. There are several blog posts regarding the same but they are very lengthy & quiet confusing sometimes for the beginners. For this reason, I am writing this short blog post. ๐Ÿ™‚

I am assuming that for hiding the fields, no code is written earlier.



Please follow the below-mentioned steps to achieve the same.

  1. Enter the Tcode SE80: Object Navigator
  2. Mention the name ofย  Web Dynpro Comp./Intf.
  3. Go to the Methods tab of the Views node. You will be able to see all the methods related to the views.
  4. Create a new method here, say with a name: ZMETHOD_HIDE. Provide a description of the method.
    Provide a parameter: IM_CONTAINER with REFto CL_WD_UIELEMENT_CONTAINER.Parameter
  5. Enter the below-mentioned codes in that method. Please refer to the comments for further details.Method%20for%20hiding%20fields
  6. Now go back & find the method: WDDOMODIFYVIEW in the same View & double click into that. In case of a new View, by default, it will have this method.
  7. Now, please enter the below-mentioned codes in that method.Modify%20View%20Method

That’s it. Activate it & enjoy ๐Ÿ™‚


Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.