cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Single Values with Select Options

Former Member
0 Kudos

hi,

I'm using the SELECT_OPTIONS to accept the multiple input values through CREATE_RANGE_TABLE and it is working well but

1) i have requirement for some input fields that should accept multiple single values means without RANGES(From .. To).. Usually we achieve this by statement SELECT-OPTIONS in ABAP, could you help me out how i can achieve same functionality in webdynpro application.

2) i'm using dictionary search helps for WD4A, here i need to select multiple rows in the F4 results.

kindly provide suggestion how to achieve above functionalities.

thanks,

gupta.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

Use select options with no intervals.

Use like the  below code.

select-options var for mara-matnr no intervals.

Former Member
0 Kudos

hi All,

thanks for the suggestions, in fact i have already resolved it.

now i'm having the look n feel problem, i have 3 select options input fields which are different data type lengths. so it is showing with irregular input lengths, i want display them uniformly. usually we can achieve this by using length parameters in graphical layout design, i haven't find options where i can change the design parameters in select options.

thanks,

gupta.

Former Member
0 Kudos

Hi Gupta,

Use interface method:

lt_range = sel_opt->create_range_table(

i_typename = aTypename

i_length = aNumber ). <<<<

sel_opt->add_selection_field(

i_id = anID

i_description = aDesc

it_result = lt_range... )

Regards,

George

Former Member
0 Kudos

hi,

i have already tried with length but no change in display.

Former Member
FLSaito
Participant
0 Kudos

Hi, try to use the following code:


  data: ls_complex_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_true.
  ls_rsoptions-eq = abap_false.
  ls_rsoptions-ge = abap_true.
  ls_rsoptions-gt = abap_true.
  ls_rsoptions-le = abap_true.
  ls_rsoptions-lt = abap_true.
  ls_rsoptions-nb = abap_true.
  ls_rsoptions-ne = abap_true.
  ls_rsoptions-np = abap_true.

  ls_complex_restrictions-m_exclude = ls_rsoptions.

  clear ls_field.
  ls_field-m_id                      = 'FIELD_OBJID_D'.
  ls_field-m_description             = 'Tipo de Formação'.
  ls_field-m_is_auto_description     = abap_true.
  ls_field-m_type                    = if_wd_select_options=>mc_sscreen_item_type_field.
  ls_field-m_within_block            = 'SEL_GROUP_1'.
  ls_field-mt_range_table            = lt_range_table_objid_d.
  ls_field-m_no_intervals            = abap_true.
  ls_field-m_complex_restrictions    = ls_complex_restrictions.
  ls_field-m_use_complex_restriction = abap_true.
  ls_field-m_no_complex_restrictions = abap_true.
*  ls_field-m_obligatory              = abap_true.
  ls_field-m_value_help_type         = if_wd_value_help_handler=>co_prefix_ovs.
  append ls_field to lt_fields.

att.

Fabio Saito

Former Member
0 Kudos

Hi , make the ls_rsoptions-eq eq abap_true .. this disable the multiple value selection

data: ls_complex_restrictions type if_wd_select_options=>t_complex_restrictions,
           ls_rsoptions                    type rsoptions.

  clear ls_rsoptions.
  ls_rsoptions-bt = abap_false.
  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_complex_restrictions-m_exclude = ls_rsoptions.
  clear ls_rsoptions .
  ls_rsoptions-bt = abap_false.
  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_complex_restrictions-m_include = ls_rsoptions.


wd_this->m_handler->ADD_SELECTION_FIELD(
    I_ID                         =  typename
    I_DESCRIPTION                = 'N length 5'
    IT_RESULT                    = lt_range_table
    I_COMPLEX_RESTRICTIONS       = ls_complex_restrictions 
    I_USE_COMPLEX_RESTRICTION    = ABAP_TRUE
    I_NO_EXTENSION               = ABAP_false
    I_NO_INTERVALS               = ABAP_TRUE ).

for result see this screen shot from the below URL , hope this is your requirement

[http://i35.tinypic.com/2u8ckno.jpg|http://i35.tinypic.com/2u8ckno.jpg]

Regards

Chinnaiya P

Former Member
0 Kudos

Hi,

I assume you use the standard component WDR_SELECT_OPTIONS in your WD4A application. Check interface IF_WD_SELECT_OPTIONS.

When creating the SO fields with mth <add_selection_field> use:

1) I_NO_EXTENSION = abap_true and I_NO_INTERVALS = abap_true

2) just I_NO_INTERVALS = abap_true

Regards,

George

Former Member
0 Kudos

hi,

I have already used the method I_NO_INTERVALS = abap_true. It simply disables the TO field but if you click the SELECT OPTIONS button, still opens with all options like OPTION, FROM & TO in the Range Table popup. I want to disable here as well, so that user cannot give TO value any where.

Sharathmg
Active Contributor
0 Kudos

To add a single value field, then use method add_parameter_field instead of add_selection_field. This is used while building the select options.

While retreiving the value, use the method get_parameter_field and obtain the data of the single value field.

Regards,

Sharath

Former Member
0 Kudos

Hi,

In addition, use parameters I_USE_COMPLEX_RESTRICTION = abap_true, and

I_COMPLEX_RESTRICTIONS-m_include-eq = abap_true

Regards,

George

Former Member
0 Kudos

1.) To accept only single values without extensions use the paramter I_NO_INTERVALS in the method add_selection_field. Pass abap_true to that parameter.

2.) I think it is not possible to select multiple values from dictionary F4 help for a select option. Alternatively you can use OVS search help. You can refer to my article below which deals with that subject.

http://divulgesap.com/blog.php?p=OTk=

Hope it helps.

Regards,

Ravi