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

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

Former Member
0 Likes
752

is exist restriction for select-options?

for example:

<b> data: ftxt04(4).

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

is exist restriction for select-options?

for example:

<b> data: ftxt04(4).

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

5 REPLIES 5
Read only

Former Member
0 Likes
711

No,

What u have done is correct.

Vasanth

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
711

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

Read only

Former Member
0 Likes
711

i think exist is not a restriction for select-options

the code what u wrote is right.

Read only

Former Member
0 Likes
711
Read only

Former Member
0 Likes
711

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.