You are on page 1of 5

Playing around with SRM 7.

0 webdynpro screens
Skip to end of metadata

Attachments:6 Added by neerja thakur, last edited by neerja thakur on Sep 27, 2013 (view change) Go to start of metadata

Overview
In earlier versions of SRM, the screens are based on ITS technologies. Modifying the screens upto 5.0 is a cumbersome task. First of all you have to identify the HTML template for your screen and then change the Business HTML code for the screens. Moreover this option does not provide too much flexibility of e.g.; removing a button, hiding a link, hiding a text, making a field non-editable, renaming a tab etc. All this can be achieved in the webdynpro screens of SRM 7.0 and that too without modifying the Standard screens i.e. no access key is required. Given below I am listing some examples of the screens and how they can be modified using webdynpro component.

Scenario1:Hide order as direct material label and input field in below screen.

First of all, you need to identify the WD component detail of an element on screen. To do this, right click on the SRM screen and click on Technical Help. You will see something like this:-

This gives you the WD component name for the current screen. Now click on Views and Views elements, it will provide you the detail of the element.

Now it can be hidden in a couple of ways using code. From WD component directly:-

Go to WD component in se80 and click on View name. Create a custom enhancement and write code in post-exit method WDDOMODIFYVIEW. Using BADI WD_BADI_DOMODIFYVIEW:-

This BADI can be used for any WD component. You need to put your WD component name and view name as filter values in this BADI. Write code:DATA : lo_ref TYPE REF TO cl_wd_transparent_container. lo_ref->remove_child( id = 'ORDER_DIRECT_MAT_LABEL' ). lo_ref->remove_child( id = 'ORDER_DIRECT_MAT' ).

Scenario2:Hide Versioning button on the screen

Get the WD component and view name and write code in either of them. lo_ui_elem ?= view->get_element( 'VERSIONING_BUTTON' ). IF NOT lo_ui_elem IS INITIAL. lo_ui_elem->set_visible( lo_ui_elem->e_visible-none ). ENDIF.

Scenario3:Hide a standard tab table extension

DATA : lo_nd_local_ui_control TYPE REF TO if_wd_context_node, lo_el_local_ui_control TYPE REF TO if_wd_context_element, ls_local_ui_control TYPE wd_this->Element_local_ui_control,

lv_d_i_ct_tabvisible TYPE wd_this->Element_local_ui_control-d_i_ct_tabvisible.

* navigate from <CONTEXT> to <LOCAL_UI_CONTROL> via lead selection lo_nd_local_ui_control = wd_context->path_get_node( path = `COMP_CONTEXT.LOCAL_UI_CONTROL` ). lo_el_local_ui_control = lo_nd_local_ui_control->get_element( ).

* get single attribute lo_el_local_ui_control->get_attribute( EXPORTING name = `D_I_CT_TABVISIBLE` IMPORTING value = lv_d_i_ct_tabvisible ).

IF lv_d_i_ct_tabvisible = 'X'. **Remove the tab. CLEAR lv_d_i_ct_tabvisible.

* set single attribute lo_el_local_ui_control->set_attribute( name = `D_I_CT_TABVISIBLE` value = lv_d_i_ct_tabvisible ). ENDIF.

Scenario4:Hide approve button in POWL

Go to the POWL feeder class /SAPSRM/CL_IBO_FEEDER_HELPER, go to method READ_CUST_ACTIONS. Create an enhancement in it and write code to remove a button. delete et_actions where actionid = BUTTONID.

You might also like