on 07-22-2011 11:35 AM
Hi,
I am working on SELECT-OPTIONS to accept single and multiple values for company code. I am using CREATE_RANGE_TABLE and ADD_SELECTION_FIELD and all is good but I was prompted with error "Invalid value in OPTION field of value table for IN itab operator. operator" when I enter 2 single value.
SIGN OPTION LOW HIGH
| |CN01| |
| |SG02| |
However, below combinations working good for me and I don't get the above error.
SIGN OPTION LOW HIGH
I |BT |CN01|CN02|
| |SG02| |
SIGN OPTION LOW HIGH
| |SG02| |
I am using below coding.
DATA:
ls_cmp_restrictions TYPE if_wd_select_options=>t_complex_restrictions,
ls_rsoptions TYPE rsoptions.
CLEAR ls_rsoptions.
ls_rsoptions-bt = abap_true.
ls_rsoptions-cp = abap_false.
ls_rsoptions-eq = abap_true. " for enable only single value*
ls_rsoptions-ge = abap_false.
ls_rsoptions-gt = abap_false.
ls_rsoptions-le = abap_false.
ls_rsoptions-lt = abap_false.
ls_rsoptions-nb = abap_false.
ls_rsoptions-ne = abap_false.
ls_rsoptions-np = abap_false.
ls_cmp_restrictions-m_exclude = ls_rsoptions.
CLEAR ls_rsoptions .
ls_rsoptions-bt = abap_true.
ls_rsoptions-cp = abap_false.
ls_rsoptions-eq = abap_true. " for enable only single value*
ls_rsoptions-ge = abap_false.
ls_rsoptions-gt = abap_false.
ls_rsoptions-le = abap_false.
ls_rsoptions-lt = abap_false.
ls_rsoptions-nb = abap_false.
ls_rsoptions-ne = abap_false.
ls_rsoptions-np = abap_false.
ls_cmp_restrictions-m_include = ls_rsoptions.
* Create a reference to range table
lr_field = wd_this->m_helper->create_range_table( `BUKRS` ).
* Add the select-option to the group
wd_this->m_helper->add_selection_field(
i_id = `BUKRS`
i_value_help_structure = 'P0001'
i_value_help_structure_field = 'BUKRS'
it_result = lr_field
i_no_intervals = abap_true
i_no_extension = abap_false
i_complex_restrictions = ls_cmp_restrictions
i_use_complex_restriction = abap_true ).
FREE lr_field.
Edited by: Girish Nabar on Jul 22, 2011 12:35 PM
Solved by myself.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Another way of asking this question is why SIGN and OPTION is not auto-populated for the multiple single value but it is auto-populated for a range.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Srinivas for your reply. Hope more people can share if they encountered the similar problem before. Thanks in advance.
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 Girish,
People are answering not for points, just to share the knowledge.
And I think the way of structure is wrong. i think we cannot pass two single values in your way. am not sure about .
low means it will accept single value. for one record in sign structure.
wait for other replys.
Regards
Srinivas
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.