cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Multiple Single Values with Select Options

Former Member
0 Likes
6,112

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.

View Entire Topic
FLSaito
Participant
0 Likes

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 Likes

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