Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Handling Dropdown values in Webdynpro ABAP

Hello All,

i have a Dropdown list in my screen which is having values

SAP

ABAP

WebDynpro.

am able to display these three values on the drop down using a method POPULATE_DROPDOWN.

Code i have used here:

method POPULATE_DROPDOWN .

DATA: it_value_set_reports TYPE TABLE OF wdr_context_attr_value,

wa_value_set_reports TYPE wdr_context_attr_value,

lr_node_info_reports TYPE REF TO if_wd_context_node_info.

wa_value_set_reports-value = '01'.

wa_value_set_reports-text = 'SAP'.

APPEND wa_value_set_reports TO it_value_set_reports.

wa_value_set_reports-value = '02'.

wa_value_set_reports-text = 'ABAP'.

APPEND wa_value_set_reports TO it_value_set_reports.

wa_value_set_reports-value = '03'.

wa_value_set_reports-text = 'WebDynpro'.

APPEND wa_value_set_reports TO it_value_set_reports.

APPEND INITIAL LINE TO it_value_set_reports.

IF NOT it_value_set_reports IS INITIAL.

lr_node_info_reports = wd_context->get_node_info( ).

lr_node_info_reports->set_attribute_value_set( name = 'REPORTS'

value_set = it_value_set_reports ).

ENDIF.

endmethod.

This is working fine.

there is an action ONACTIONDISPLAY is associated with it.

once we select a value from the dropdown the above method triggers. here i have to capture the value which is selected from the dropdown.

Eg: Suppose if i select SAP then in the output it has to display data associated with SAP.

Could anyone suggest how to do that step by step.

Thanks,

Sree.

Former Member
Former Member replied

data: lv_value type < type of REPORTS attribute>.

wd_context->get_attribuet( name = 'REPORTS' value = lv_value ).

Abhi

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question