cancel
Showing results for 
Search instead for 
Did you mean: 

Select Options

Former Member
0 Kudos

Hi,

IN select options, if we click on 'OPTION' there are two option -

"Exclude From Selection " and "Select" .

I would like to disable "Exclude from Selection", as user do not want to see this option.

Can anyone hekp me on this.

Regards,

Vishal

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Vishal,

Use the following code in WDDOINIT of the view on which you have implemented select options.

DATA : i_complex_restrictions TYPE if_wd_select_options=>t_complex_restrictions.

DATA : wa_rsoptions TYPE rsoptions.

DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.

DATA : lt_range_table TYPE REF TO data,

rt_range_table TYPE REF TO data,

read_only TYPE abap_bool,

typename TYPE string.

MOVE 'X' TO wa_rsoptions-bt.

MOVE 'X' TO wa_rsoptions-cp.

MOVE 'X' TO wa_rsoptions-eq.

MOVE 'X' TO wa_rsoptions-ge.

MOVE 'X' TO wa_rsoptions-gt.

MOVE 'X' TO wa_rsoptions-le.

MOVE 'X' TO wa_rsoptions-lt.

MOVE 'X' TO wa_rsoptions-nb.

MOVE 'X' TO wa_rsoptions-ne.

MOVE 'X' TO wa_rsoptions-np.

i_complex_restrictions-m_include = wa_rsoptions.

lo_cmp_usage = wd_this->wd_cpuse_selopt( ).

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_selopt( ).

wd_this->m_handler = wd_this->m_wd_select_options->init_selection_screen( ).

lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'S_CARR_ID' ).

wd_this->m_handler->add_selection_field(

i_id = 'S_CARR_ID'

it_result = lt_range_table

***************************************************************

*" Implementing select options with no "Exclude options"

***************************************************************

i_complex_restrictions = i_complex_restrictions

i_use_complex_restriction = 'X'

**************************************************************

i_read_only = read_only ).

Regards,

Chitrali

Former Member
0 Kudos

Thanks Chitrali,

this is working fine for "Exclude options". I have to remove "include options(Green Color)" in other scenarios. Can u tell me the same for removing include options also .

Regards,

Vishal.

Former Member
0 Kudos

I tried using :

i_complex_restrictions-m_exclude = wa_rsoptions.

instead of

i_complex_restrictions-m_include = wa_rsoptions.

Than it works fine.

Thanks a lot. Points rewarded.

Regards,

Vishal.

Former Member
0 Kudos

Hi,

Check this link,

[SAP Online Help - IF_WD_SELECT_OPTIONS|http://help.sap.com/saphelp_nw70/helpdata/EN/45/bf07361248003de10000000a11466f/content.htm]

-

Achyut

Former Member
0 Kudos

Hi Vishal,

Try using UPD_SELECTION_FIELD of IF_WD_SELECT_OPTIONS and set parameter I_READ_ONLY to ABAP_TRUE.

former_member189058
Active Contributor
0 Kudos

Hi Vishal,

try using this.. in the add_selection_field method of if_wd_seelct-options....

pass this parameter I_NO_COMPLEX_RESTRICTIONS = X

Regards,

Reema