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

Selection screen

madan_ullasa
Contributor
0 Likes
856

hi frnds,

i have a requirement to, not to display the included values ( the green color ) in the multiple selection screen of the select option. i have found the type pools for it.. but im not able to figure out the element to be used. the type pools is SSCR...

points assured to all replies...

regards,

Madan....

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
791

Hi

Sorry misunderstood your req earlier.

Here it is

Use ,

The function module <b>SELECT_OPTIONS_RESTRICT </b>allows you to restrict the set of selection options available for a SELECT-OPTION (for example, only single values and patterns, i.e. 'EQ' and 'CP' are allowed). You can also forbid the leading sign 'E' (= 'Exclude from selection'). This means that you can considerably restrict the selections which can be entered on the selection screen.

Regards,

Raj

Message was edited by: Rajasekhar Dinavahi

7 REPLIES 7
Read only

Former Member
0 Likes
792

Hi

Sorry misunderstood your req earlier.

Here it is

Use ,

The function module <b>SELECT_OPTIONS_RESTRICT </b>allows you to restrict the set of selection options available for a SELECT-OPTION (for example, only single values and patterns, i.e. 'EQ' and 'CP' are allowed). You can also forbid the leading sign 'E' (= 'Exclude from selection'). This means that you can considerably restrict the selections which can be entered on the selection screen.

Regards,

Raj

Message was edited by: Rajasekhar Dinavahi

Read only

Former Member
0 Likes
791

hi Madan,

Chk this FM 'SELECT_OPTIONS_RESTRICT'.

in the documentation of this FM , there is one program , that may help u

Message was edited by: Chandrasekhar Jagarlamudi

Read only

0 Likes
791

hi chandra,

im using the same function module....

the "inclusive" columns in the multiple selection screen of the select option should not appear....

iwant to kno the elements i need to pass to the parameter "restrict"..

regards,

MAdan....

Read only

Former Member
0 Likes
791

Hi,

try below FM

SELECT_OPTION_OPTIONS

SELECT_OPTIONS_APPLY

SELECT_OPTIONS_PROVIDE

SELECT_OPTIONS_RESTRICT

Regards

Amole

Read only

Former Member
0 Likes
791

Hi

Check this code:

CLEAR FS_OPT_LIST.

MOVE 'S_AISLE' TO: FS_OPT_LIST-NAME.

MOVE 'X' TO: FS_OPT_LIST-OPTIONS-BT,

FS_OPT_LIST-OPTIONS-EQ.

APPEND FS_OPT_LIST TO IT_RESTRICT-OPT_LIST_TAB.

CLEAR FS_ASS.

MOVE: 'A' TO FS_ASS-KIND,

'I' TO FS_ASS-SG_MAIN,

'S_AISLE' TO FS_ASS-OP_MAIN.

APPEND FS_ASS TO IT_RESTRICT-ASS_TAB.

CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'

EXPORTING

RESTRICTION = IT_RESTRICT.

Regards,

Raj

Read only

Former Member
0 Likes
791

Hi,

use below logic

CLEAR wa_optlist.

DATA i_restrict TYPE sscr_restrict.

DATA wa_optlist TYPE sscr_opt_list.

DATA wa_assoc TYPE sscr_ass.

  • JUST_EQ: Only EQ allowed

CLEAR wa_optlist.

MOVE 'JUST_EQ' TO wa_optlist-NAME.

MOVE 'X' TO wa_optlist-OPTIONS-EQ.

APPEND wa_optlist TO i_restrict-OPT_LIST_TAB.

  • KIND = 'S': applies to SELECT-OPTION s_dtysaf

CLEAR wa_assoc.

MOVE: 'S' TO wa_assoc-KIND,

'S_DTYSAF' TO wa_assoc-NAME,

'I' TO wa_assoc-SG_MAIN,

' ' TO wa_assoc-SG_ADDY,

'JUST_EQ' TO wa_assoc-OP_MAIN,

'JUST_EQ' TO wa_assoc-OP_ADDY.

APPEND wa_assoc TO i_restrict-ASS_TAB.

MOVE 'S_DTYREG' TO wa_assoc-name.

APPEND wa_assoc TO i_restrict-ASS_TAB.

MOVE 'S_DTYDEP' TO wa_assoc-name.

APPEND wa_assoc TO i_restrict-ASS_TAB.

MOVE 'S_DTYBNK' TO wa_assoc-name.

APPEND wa_assoc TO i_restrict-ASS_TAB.

  • activate the restriction:

CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'

EXPORTING

RESTRICTION = i_restrict.

also check program RSVTPF01

Regards

Amole

Read only

Former Member
0 Likes
791

HI,

Look at the sample program:

report sample.
tables: usr02.
type-pools: sscr.
select-options: usrbnam for usr02-bname no intervals,
                creator for usr02-aname no intervals.
data: restrict type sscr_restrict,
      opt_list type sscr_opt_list,
      ass      type sscr_ass.

initialization.
  clear: opt_list.
  opt_list-name = 'EQAL'.
  opt_list-options-eq = 'X'.
  append opt_list to restrict-opt_list_tab.

  clear: ass.
  ass-kind = 'S'.
  ass-name = 'USRBNAM'.
  ass-sg_main = 'I'.
  ass-sg_addy = ' '.
  ass-op_main = 'EQAL'.
  ass-op_addy = 'EQAL'.
  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.
  if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.

start-of-selection.
  select * from usr02 where bname in usrbnam
                        and aname in creator.
    write: / usr02-bname, usr02-aname.
  endselect.

look at the below link for more examples:

http://sap4.com/wiki/index.php?title=SELECT_OPTIONS_RESTRICT

http://www.sap-img.com/abap/how-to-restrict-the-select-options.htm

Regards

Sudheer