on 10-22-2012 3:48 PM
Dear Experts
We have a requirement to maintain select-options for multiple fileds with searh help in webdynpro abap.
I am able to create select-options for multiple fileds using wdr_select_options componet usage.
for search help i have created the ovs and it's wokring.
Here may problem is like for ex : i have 3 fields in selction screen.
when i am selecting f4 for all 3 fiedls taking the first f4 help only..
Could anyone please suggest me How can i maintain the different search helps for diffrent inputs.
This is how i have created multiple fiedls in selection screen.
DATA: lt_range_table TYPE REF TO data,
rt_range_table TYPE REF TO data,
read_only TYPE abap_bool,
typename TYPE string.
DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_select_options( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
wd_this->m_wd_select_options = wd_this->wd_cpifc_select_options( ).
wd_this->m_handler = wd_this->m_wd_select_options->init_selection_screen( ).
* * Setting Globle options
wd_this->m_handler->set_global_options(
i_display_btn_cancel = abap_false
i_display_btn_check = abap_false
i_display_btn_reset = abap_false
i_display_btn_execute = abap_false ).
* create a range table that consists of this new data element
lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'ORGEH' i_length = 8 ).
lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'OBJID' i_length = 8 ).
lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'PERSONID_EXT' i_length = 8 ).
* * * * add a new field to the selection
wd_this->m_handler->add_selection_field(
i_id = 'ORGEH'
i_description = 'Organizational unit'
it_result = lt_range_table
i_read_only = read_only
i_no_intervals = abap_true " disable intervals
i_value_help_type = if_wd_value_help_handler=>co_prefix_ovs ).
wd_this->m_handler->add_selection_field(
i_id = 'OBJID'
i_description = 'Job family'
it_result = lt_range_table
i_read_only = read_only
i_no_intervals = abap_true " disable intervals
i_value_help_type = if_wd_value_help_handler=>co_prefix_ovs ).
* * * add a new field to the selection
wd_this->m_handler->add_selection_field(
i_id = 'PERSONID_EXT'
i_description = 'Holcim Id'
it_result = lt_range_table
i_read_only = read_only
i_no_intervals = abap_true " disable intervals
i_value_help_type = if_wd_value_help_handler=>co_prefix_ovs ).
And the is how able to generate the search help (example)..
CASE i_ovs_data-m_ovs_callback_object->phase_indicator.
WHEN if_wd_ovs=>co_phase_0. i_ovs_data-m_ovs_callback_object->set_configuration( col_count = 2 table_multi_select = abap_true ).
WHEN if_wd_ovs=>co_phase_1.
** i_ovs_data-m_ovs_callback_object->set_input_structure( input = P0002 ).
WHEN if_wd_ovs=>co_phase_2. SELECT pernr vorna nachn INTO CORRESPONDING FIELDS OF TABLE lt_pernr FROM pa0002 UP TO 10 ROWS.
i_ovs_data-m_ovs_callback_object->set_output_table( output = lt_pernr ).
WHEN if_wd_ovs=>co_phase_3. ASSIGN i_ovs_data-m_ovs_callback_object->selection->* TO <lt_ovs_result>.
ASSIGN i_ovs_data-mt_selected_values->* TO <lt_sel_opt_result>. LOOP AT <lt_ovs_result> ASSIGNING <p0002> .
INSERT <p0002>-pernr INTO TABLE <lt_sel_opt_result>.
ENDLOOP. ENDCASE.
Thanks in Advance,
Ravi.
Hi Vallepu,
I haven't tried this myself, but I think what you may be missing is...
Cheers,
Amy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
From what I could tell in this code, you are not distinguishing between different fields in the different phases. It seems you handling them all the same and as a result all of them will give you the same search help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.