Skip to Content
author's profile photo Former Member
Former Member

Selection screen parameter.

Hi Gurus,

How to declare selection screen parameter based on customer number : KNA1-KUNNR

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 02, 2007 at 06:27 AM

    hI

    If you want to have the functionality of a select-option but doesn't want the user to enter ranges, then what you can do is to use the SELECT-OPTIONS with NO-INTERVALS. Then use the function module RSRESTRICTSEL*,so that now the user will be able to enter multiple single values but cannot enter ranges.

    A compromise could be that you provide the user with only LOW option to fill in and remove the ranges and exclude conditions. That way user will be forced to enter single values and you can validate each of them by looping at the select option.

    I think your customer will understand the reason. Let the customer know that it is possible to say either you found values or didn't find values, but not the way they want it. Explain it to them with several examples to showcase how many variations there can be and how difficult it will be to validate each of those variations. Tell them SELECT-OPTIONS gives them the flexibility of entering ranges, excluding ranges, single values etc. Such a powerful flexibility comes with a small price of not being able to validate each and every value.

    If they still insist, then you have to restrict their ability to enter 'EXCLUSIONS', and may be even ranges. Look at the function module 'SELECT_OPTIONS_RESTRICT'. There is very good documentation associated with it.

    Here is an example using this function module where I restrict the users to just multiple single values for a select option called S_EXWRK which is for plant.

    TYPE-POOLS sscr.

    DATA: ls_restrict TYPE sscr_restrict,

    ls_opt_list TYPE sscr_opt_list,

    ls_ass TYPE sscr_ass.

    CLEAR ls_opt_list.

    MOVE 'EQ' TO ls_opt_list-name.

    ls_opt_list-options-eq = 'X'.

    APPEND ls_opt_list TO ls_restrict-opt_list_tab.

    ls_ass-kind = 'S'.

    ls_ass-name = 'S_EXWRK'.

    ls_ass-sg_main = 'I'.

    ls_ass-sg_addy = ' '.

    ls_ass-op_main = 'EQ'.

    ls_ass-op_addy = 'EQ'.

    APPEND ls_ass TO ls_restrict-ass_tab.

    CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'

    EXPORTING

    restriction = ls_restrict

    EXCEPTIONS

    OTHERS = 1.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 02, 2007 at 04:41 AM
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.