Application Development 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: 

is exist restriction for select-options.........?

Former Member
0 Kudos
101

is exist restriction for select-options?

for example:

<b> data: ftxt04(4).

select-options: txt04 for ftxt04.</b>

5 REPLIES 5

Former Member
0 Kudos
60

No,

What u have done is correct.

Vasanth

jayanthi_jayaraman
Active Contributor
0 Kudos
60

Hi,

You can restrict select-options.

SELECT-OPTIONS : S_VKORG FOR TVKO-VKORG MEMORY ID VKO.

Form F1000_RESTRICT_VKORG.

INITIALIZATION.

PERFORM F1000_RESTRICT_VKORG.

  • Define the object to be passed to the RESTRICTION parameter

DATA lw_restrict TYPE SSCR_RESTRICT.

  • Auxiliary objects for filling RESTRICT

DATA lw_opt_list TYPE sscr_opt_list.

DATA lw_ass TYPE sscr_ass.

  • Assign selection screen objects to option list and sign

  • NOINTERVLS: BT and NB not allowed

CLEAR lw_opt_list.

MOVE 'NOINTERVLS' TO lw_opt_list-name.

MOVE 'X' TO: lw_opt_list-options-cp,

lw_opt_list-options-eq,

lw_opt_list-options-ge,

lw_opt_list-options-gt,

lw_opt_list-options-le,

lw_opt_list-options-lt,

lw_opt_list-options-ne,

lw_opt_list-options-np.

APPEND lw_opt_list TO lw_restrict-opt_list_tab.

  • KIND = 'S':

CLEAR lw_ass.

MOVE: 'S' TO lw_ass-kind,

'S_VKORG' TO lw_ass-name,

'I' TO lw_ass-sg_main,

'*' TO lw_ass-sg_addy,

'NOINTERVLS' TO lw_ass-op_main.

APPEND lw_ass TO lw_restrict-ass_tab.

CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'

EXPORTING

restriction = lw_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. "Restriction error encountered for Select

"Option

MESSAGE I001 WITH 'ERROR IN SELECT OPTION'."ERROR IN SELECT OPTION

ENDIF.

endform. " F1000_RESTRICT_VKORG

Former Member
0 Kudos
60

i think exist is not a restriction for select-options

the code what u wrote is right.

Former Member
0 Kudos
60

Former Member
0 Kudos
60

somebody are not undenstanding me.

i mean that for <b>txt04</b> is not refer to distionary type.

in my case report is runnig but don't might reach to selection screen. in other words report is not might generate selection screen 1000.