on 06-16-2014 1:44 PM
Hello Experts,
I Already Done ALV Report In webdynpro with use of view Container UI element.But i do not know ALV report with help of select option.so
Kindly Give Me simple Example of Use in select Option In ALV.
Reply ASAP.
Regards,
Ameya Karadkhedkar
First you need to add the component WDR_SELECT_OPTIONS to the tab "Used components" of your Web Dynpro component and then also in the properties tab of your view. In the layout you need to create another view container and embed the view WND_SELECTION_SCREEN of the new used component to it.
Then in the WDDOINIT method of your view you can write this code (where SEL_OPT is the given name for the used component) in order to set the select option (This example is a select option for a date):
DATA: lo_cmp_usage TYPE REF TO if_wd_component_usage,
lo_interfacecontroller TYPE REF TO iwci_wdr_select_options,
lo_r_helper_class TYPE REF TO if_wd_select_options,
rt_range_date TYPE REF TO data.
* Instantiate used component WDR_SELECT_OPTIONS (SEL_OPT)
lo_cmp_usage = wd_this->wd_cpuse_sel_opt( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
* Call method in used controller
lo_interfacecontroller = wd_this->wd_cpifc_sel_opt( ).
lo_r_helper_class = lo_interfacecontroller->init_selection_screen( ).
* Create select option for the date
CALL METHOD lo_r_helper_class->create_range_table
EXPORTING
i_typename = 'DATS'
RECEIVING
rt_range_table = rt_range_date.
CALL METHOD lo_r_helper_class->add_selection_field
EXPORTING
i_id = 'DATS'
it_result = rt_range_date
i_read_only = ABAP_FALSE.
* Hide unnecessary buttons
CALL METHOD lo_r_helper_class->set_global_options
EXPORTING
i_display_btn_cancel = abap_false
i_display_btn_check = abap_false
i_display_btn_reset = abap_false
i_display_btn_execute = abap_false.
Finally you need to write the following code in the action of the button in order to fetch the range table selected by the user.
DATA: lo_cmp_usage TYPE REF TO if_wd_component_usage,
lo_interfacecontroller TYPE REF TO iwci_wdr_select_options,
lo_r_helper_class TYPE REF TO if_wd_select_options,
rt_date TYPE REF TO data.
FIELD-SYMBOLS: <fs_date> TYPE table.
* Instantiate used component WDR_SELECT_OPTIONS (SEL_OPT)
lo_cmp_usage = wd_this->wd_cpuse_sel_opt( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
* Call method in used controller
lo_interfacecontroller = wd_this->wd_cpifc_sel_opt( ).
lo_r_helper_class = lo_interfacecontroller->init_selection_screen( ).
* get selected range of inspections date
CALL METHOD lo_r_helper_class->get_range_table_of_sel_field
EXPORTING
i_id = 'DATS'
RECEIVING
rt_range_table = rt_date.
ASSIGN rt_date->* TO <fs_date>.
Then you can use the value that is assigned to the field symbol <fs_date> to continue with your ALV.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You need to use two VC UI elements
1)Select options ( component to be used is WDR_SELECT_OPTIONS)
2)ALV Table ( component to be used is SALV_WD_TABLE).
Thanks
KH
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.