Showing results for 
Search instead for 
Did you mean: 

Events for Dropdown in selection screen in Webdynpro ABAP

Former Member
0 Kudos

I have added a parameter as dropdown in the selection screen in webdynpro ABAP using the method IF_WD_SELECT_OPTIONS=>ADD_PARAMETER_FIELD.

When the value of the dropdown is changed by the user, I need to update a text line (added to the selection screen) based on the value selected in dropdown. How can this be achieved?

(I am trying to imitate the AT SELECTION-SCREEN OUTPUT event in a GUI report in Webdynpro)

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

The WDDOMODIFYVIEW method is not triggerd/ called on the change of the value in the selection screen dropdown. It is triggered only when the buttons are hit (here the 'Execute' button). So this does not simulate the AT SELECTION-SCREEN OUTPUT event.

Does any1 have any idea on what else I can try?

Former Member
0 Kudos

Create an onSelect action for the dropdown field.

In this method you can read the selected value as follows

DATA lo_nd_cn_visa TYPE REF TO if_wd_context_node.
    DATA lo_el_cn TYPE REF TO if_wd_context_element.
    DATA ls_cn TYPE wd_this->element_cn_nodename.
    DATA lv_ca TYPE wd_this->element_cn_nodename-ca_attribute name
*   navigate from <CONTEXT> to <CN_visa> via lead selection
    lo_nd_cn = wd_context->get_child_node( 'NODENAME' ).
*   get element via lead selection
    lo_el_cn = lo_nd_cn_visa->get_element( ).
*   get single attribute
        name =  `ATTRIBUTE NAME`
        value = lv_ca ).

Now you can use lv_ca in your text line.


Former Member
0 Kudos

Hi Radhika,

The sample code you gave is a normal dropdown. I am having a dropdown in a selection screen (using if_wd_select_options - ).


Former Member
0 Kudos

Hi Renuka,

You can do one thing on selection of the drop down set the flag as 'X' and write the code in the do modify view where u write the code as if flag = 'X' then by using the case statements you can capture the drop down selected values and update the text as and what you need.

I sugested to set the flag as WDDO MOdify view calls this method every time the user clicks so to avoid the unnessesary calls follow this method. Hope it helps you .




Active Contributor
0 Kudos

I am in SP12, i don't see any such event provided in select options component.

However you can have the code in WDDOMODIFYVIEW , read the entered value and fill in the text you want.