on 03-17-2009 11:51 PM
Hi,
Based on certain criteria i need to hide/display my selection criteria. Like i have 5 fields like customer, material , plant, chain, date . I need to have select options for all these fields but based on the value selected in the drop down.
I tried by adding one more usage of wdr_select_option in the component, but it doesn't seems to work.
can any one please suggest the procedure for that.
Or
If we can conditionally display the required select options.
Thanks,
Hi,
In the layout, take UIcontainer element
and in the method: WDDOINIT, write the following code for getting select options:
Take one component say select options of type WDR_SELECT_OPTIONS,
method wddoinit .
data :cu type ref to if_wd_component_usage,
ic type ref to iwci_wdr_select_options,
so type ref to if_wd_select_options,
lt_range type ref to data.
u need to instantiate usage component
cu = wd_this->wd_cpuse_select_option( ).
if cu->has_active_component( ) ne 'X'.
call method cu->create_component( ).
endif.
Create a ref to interface controller ,so that u access its helper classes.
ic = wd_this->wd_cpifc_select_option( ).
using the ref initialize selection screen.
so = ic->init_selection_screen( ).
create a range
call method so->create_range_table
exporting
i_typename = 'BU_PARTNER'
receiving
rt_range_table = lt_range.
.
using the ref to helper class,add a field to the selection screen
call method so->add_selection_field
exporting
i_id = 'BU_PARTNER'
it_result = lt_range.
endmethod.
Edited by: Rammohan Nagam on Mar 18, 2009 2:32 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't see any visibility property for Seleciton Fields.
You have to delete the selection fields first and add everytime the selection changes in the dropdown
use method REMOVE_ALL_SEL_SCREEN_ITEMS to delete, You hav Readonly parameter instead
of making invisible u can make it readonly in method UPD_SELECTION_FIELD
Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.