cancel
Showing results for 
Search instead for 
Did you mean: 

Restrict "Extensions" to only allow single values not range of values

former_member450736
Active Participant
0 Kudos

Hi,

i have created select options in wd abap, where i created selection field with no-intervals, however in extensions, user still has got option of entering values in ranges like from and to,

this feature i want to restrict.

please suggest

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Kranthi,

U need to set few parameters to get this functionality.



Data: l_complex_restrictions TYPE if_wd_select_options=>t_complex_restrictions,
          st_rsoptions           TYPE rsoptions.

  l_complex_restrictions-m_include = st_rsoptions.
  l_complex_restrictions-m_exclude = st_rsoptions.

select_options->add_selection_field( i_id                      = kunnr_id
                                                      it_result                 = t_rt_range_table
                                                      i_complex_restrictions    = l_complex_restrictions
                                                      i_use_complex_restriction = 'X'
                                                      i_no_complex_restrictions = 'X'
                                                      i_no_intervals            = abap_true )..

Thanks,

Anil

Answers (1)

Answers (1)

former_member184578
Active Contributor
0 Kudos

Hi Kranthi.,

try this.,

  • create a range table that consists of this new data element

lt_range_table =

wd_this->m_handler->create_range_table(

i_typename = 'ZDE_PERNR_D' ).

  • add a new field to the selection

wd_this->m_handler->add_selection_field(

i_id = 'ZDE_PERNR_D'

it_result = lt_range_table

i_read_only = read_only

i_no_intervals = 'X'

i_obligatory = abap_true

I_VALUE_HELP_TYPE = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_SEARCHHELP

I_VALUE_HELP_id = 'ZSH_MCS_PERNR' ).

hope this helps u.,

Thanks & Regards

Kiran

former_member450736
Active Participant
0 Kudos

Hi Kiran,

No intervals is working means intervals are not coming, however extensions ( arrow button ) is coming if i click on arrow button there i should not see intervals.. however i am able to restrict things like not equal, patterns and all other things except intervals..

hope i explained clearly what my problem is..

Former Member
0 Kudos

Hi Kranti,

Try with both these settings,

I_NO_INTERVALS = abap_true

I_NO_EXTENSION = abap_true .

Thanks,

Aditya.

Former Member
0 Kudos

Please make necessary changes -

IS_COMPLEX_RESTRICTIONS-m_exclude-BT = ' '.

IS_COMPLEX_RESTRICTIONS-m_exclude-NB = ' '.

append IS_COMPLEX_RESTRICTIONS to It_COMPLEX_RESTRICTIONS

In ADD_SELECTIONFIELD method apply these settings and check

I_NO_EXTENSION = ABAP_TRUE

I_NO_INTERVALS - ABAP_TRUE

I_USE_COMPLEX_RESTRICTION = ABAP_TRUE

I_COMPLEX_RESTRICTIONS = it_complex_restrictions

former_member450736
Active Participant
0 Kudos

Hi Lekha,

sorry for the delayed response.

i tried the code you given, however that really not solved the problem, i am looking for something where, when you select 'mulitple selection'( button with arrow next to select option )

in normal sap gui we will be provided with options like

1. select single values

2. select ranges

3. exclude single values

4. exclude ranges

i just want only 'select single values' option where i can enter multiple single values not ranges, this is not coming.

Please suggest!!

gill367
Active Contributor
0 Kudos

I guess the way you want it is not possible.

you can remove the arrow completely or it will coem with that option of ranges.

as told above you can use I_NO_EXTENSION = abap_true for hiding that arrow

thanks

sarbjeet singh