Skip to Content
Author's profile photo Sankara Bhatta

Web UI modifications in SRM7

In every SRM developer’s life there comes a day when he/she needs to modify the standard Web UI and this blog is intended for that day. Let’s get into the details now

The things you need to know/have before reading this blog are

  • – Work experience in SRM7
  • – Good knowledge of ABAP webdynpro
  • – Patience

I am going to divide the general requirements into few categories and discuss how we can achieve each of those requirements

  1. – Hide certain field/ tab/container etc.,
  2. – Replace the standard search help with a custom search help
  3. – Make field non-editable/mandatory
  4. – Add new fields/tabs

Category 1:

SAP has provided a beautiful BADI WD_BADI_DOMODIFYVIEW for achieving most of the requirements under this category.This is a filter dependent BADI, so you can create multiple implementations based on  webdynpro component and the VIEW name. It has an import parameter called VIEW , which gets the reference to the view controller at runtime. So, if you want to hide any of the UI element on a particular view, just proceed as below

  • Right click on the field and go to technical help to identify the WD comp and VIEW that field belongs to
  • Create an implementation of the BADI using WD component and VIEW as BADI filter
  • Inside the implementation, get the reference of the UI element and remove/hide it from the UI

sounds like a piece of cake. isn’t it?. well not always. let’s look at an example to understand it better

For instance, if you want to hide PO number field on overview tab of the PO screen.


The technical help of PO number field gives us the information about WD component, VIEW name and component configuration


Create an implementation for the badi  with the following filter combination


In the implementation of BADI use the following code

DATA : lo_trans_cont  TYPE REF TO cl_wd_transparent_container .
*every UI element in webdynpro has a corresponding class. Find the class for the UI element that you want to hide
CONSTANTS lc_main_cont_id TYPE string  VALUE ‘MAIN_CONTAINER’.
CONSTANTS lc_left_cont_id TYPE string  VALUE ‘LEFT_CONTAINER’.

*In this case the field is embedded in a transparentUIcontainer with name ‘LEFT_CONTAINER’, which in turn embedded

*in another container with name ‘MAIN_CONTAINER’

lo_trans_cont ?= view->get_element( lc_main_cont_id ).
lo_trans_cont ?= lo_trans_cont->get_child(
id = lc_left_cont_id ).

IF lo_trans_cont  IS NOT INITIAL.
*Remove input field
id = ‘PO_NUMBER’).
*Remove label

PO number field is removed from the VIEW now


Same goes for hiding any container present in the view. For hiding subviews, please refer to my other blog Floorplan Manager for WebDynpro ABAP: Dynamical… | SCN

Other way of doing this is creating a Z component configuration by copying the std one and making the changes to it

/SAPSRM/WDCC_PO_DOFC_OV_HD. click on ‘other functions’ and select ‘Enhance’


you can change the ‘visible’ property of the UI element


This method can be used , if the changes to the web UI applies to all the users

Category 2:

For this case, we will use the same BADI, but now we use the import parameter WD_CONTEXT, which holds the reference to the VIEW context.

Value helps are assigned at context attribute level. Every contest attribute has two properties related to search help

  • – input help mode

SAP use below code for different types of the search help









Application defined


  • – input help name – this field holds the actual search help name

Get the name of the view context attribute that holds the search help and use the below sample code to attach/overwrite new/existing search help

Below is the sample code to attach/overwrite search help to a context attribute

DATA lo_nd_attrib           TYPE REF TO if_wd_context_node.

DATA lo_nd_attrib_info      TYPE REF TO if_wd_context_node_info.

*get the reference to context node info

lo_nd_attrib_info =  lo_nd_attrib->get_node_info( ).

*attach the search help to the relevant attribute
lo_nd_attrib_info->set_attribute_value_help( name = ‘here enter the ID of the context

value_help_mode = ‘121’ (if it is DDIC shlp)
value_help = ‘here enter the custom search help name that you have created’)

Category 3:

Use the below SPRO configuration to make the fields non-editable/mandatory



Add the field to the above configuration and select ‘Field enabled’ and ‘Field required’ check boxes as required. Same thing goes for fields at item level. You can define customer class and method to enable/disable fields based on custom logic. For more information on customer class, please refer to the SPRO documentation.

Category 4:

There is an excellent blog written by Ricardo Romero on how to add custom fields to SC and POWL. You can find the blog here Add custom field to SC and POWL

For adding new main views/Tabs, please refer to my other blog Floorplan Manager for WebDynpro ABAP: Dynamical… | SCN

If you can not achieve the requirement by any of the above said methods, the last option would be to enhance the standard webdynpro component/view.

There might be other better ways of doing whatever I said above, so please post your thoughts and comments.

I hope you enjoyed reading it as much as I did writing.

PS: This blog is the result of a boring weekend

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo MAHESH K
      MAHESH K


      when ur save any customizing object / table what type of transport request it is saved?

      Author's profile photo sankara rao bhatta
      sankara rao bhatta
      Blog Post Author

      customizing transport request

      Author's profile photo Mark Hallett
      Mark Hallett

      Hi Sankara

      Is it possible to move a SAP standard shopping cart line item field from one tab to another using any of the above methods?

      Author's profile photo sankara rao bhatta
      sankara rao bhatta
      Blog Post Author


      I don't think so.

      Author's profile photo MAHESH K
      MAHESH K

      For customized changed settings records are generally saved in customized transport request.

      Workbench request:Workbench requests record changes made to ABAP Workbench

      Author's profile photo MAHESH K
      MAHESH K

      exactly how many times to create a secondary index in table ?

      I think it is 9 times to create a secondary index.So, please give me a reply it is correct or wrong.

      Author's profile photo MAHESH K
      MAHESH K

      what is search help exit and what are the common  parameters using search help exit fm ?

      Author's profile photo Former Member
      Former Member

      Hi sankara rao bhatta,

      This is a good useful blog... and your other blogs are also good.


      Author's profile photo sankara rao bhatta
      sankara rao bhatta
      Blog Post Author

      Thanks Ganapathi..

      Author's profile photo Mohit Kumar
      Mohit Kumar

      Hi sankara rao bhatta,

      I shouldn't say this, however, hope you have a few more boring weekends 😉

      Thanks for nice information and explanations.

      Author's profile photo sankara rao bhatta
      sankara rao bhatta
      Blog Post Author

      Hi Mohit,

      Thanks 🙂 unfortunately not many happening nowadays 🙂

      Author's profile photo Sudhanshu Das
      Sudhanshu Das

      Very well written !!

      Author's profile photo sankara rao bhatta
      sankara rao bhatta
      Blog Post Author

      Thanks Das