Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Select Option

Former Member
0 Likes
707

Hello.

I am using a select option, which i need to exclude the ranges and mulit-values option..

Ideally it should behave like a parameter.. but i can not change it to parameter

is there any FM for doin that ?

Regards,

Dhruv.

5 REPLIES 5
Read only

Former Member
0 Likes
671

HI,

Use

Select-options : s_vbeln for vbak-vbeln no-extension no intervals.

Thanks

Mahesh

Read only

ferry_lianto
Active Contributor
0 Likes
671

Hi,

Please try FM SELECT_OPTIONS_RESTRICT.

Check this link for sample codes.

http://www.saptechnical.com/Tips/ABAP/restrict.htm

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
671

USE NO INTERVALS with select options

Read only

0 Likes
671

I am building select options dynamically so cant use no extension no intervals statement,.

Ferry I will try to use your FM.. thanks

Read only

0 Likes
671

See the example below.


TABLES: t001.

SELECT-OPTIONS s_bukrs FOR t001-bukrs.

INITIALIZATION.

  PERFORM remove_ranges_for_sel_options.
*&---------------------------------------------------------------------*
*&      Form  remove_ranges_for_sel_options
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM remove_ranges_for_sel_options.

  TYPE-POOLS sscr.
  DATA: optlist  TYPE sscr_opt_list,
        restrict TYPE sscr_restrict,
        ass      TYPE sscr_ass.

*-- Allow EQ only
  CLEAR optlist.
  optlist-name       = 'EQ_ONLY'.
  optlist-options-eq = 'X'.
  APPEND optlist TO restrict-opt_list_tab.

  CLEAR ass.
  ass-kind    = 'S'.
  ass-sg_main = 'I'.
  ass-sg_addy = 'N'.
*-- Make S_BUKRS range to have only EQ
  ass-name    = 'S_BUKRS'.
  ass-op_main = 'EQ_ONLY'.
  APPEND ass TO restrict-ass_tab.

  CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
    EXPORTING
      restriction            = restrict
    EXCEPTIONS
      too_late               = 1
      repeated               = 2
      selopt_without_options = 3
      selopt_without_signs   = 4
      invalid_sign           = 5
      empty_option_list      = 6
      invalid_kind           = 7
      repeated_kind_a        = 8
      OTHERS                 = 9.

ENDFORM.                    " rem_ranges