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

hide the high value in selection screen range

In the selection screen of an ABAP Program, I need to use a field where I have to restrict the users from entering a range of values, but still need to enter a list of values. I tried using 'no intervals' in the select-options, but still it lets me enter range. How can I accomplish this?

Thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Sep 04, 2008 at 03:58 PM

    Ok Lets do one thing validate the selection-screen that iof user inputs this and press execute then Trrigger Error message!!

    Regards

    Sas

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 04, 2008 at 03:54 PM

    No way are you sure .

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 04, 2008 at 03:56 PM

    SELECT-OPTIONS s_carrid FOR spfli_wa-carrid NO INTERVALS.

    It will not allow you to give range of values this is for sure.

    If you want to give more values your code shouls NOT contain

    NO-EXTENSION .

    Pls check .

    If you still have the problem why dont you paste your code.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 04, 2008 at 03:57 PM

    You need to use the function module SELECT_OPTIONS_RESTRICT additionally to the simpler NO INTERVALS addition for this.

    That way, besides of restricting the "TO" input field from appearing, you also restrict the tabs in the extension screen (yellow arrow button).

    Check this code and adapt to yours:

    DATA:
      wa_restrict TYPE sscr_restrict,
      wa_opt_list TYPE sscr_opt_list,
      wa_ass      TYPE sscr_ass.
    
        wa_opt_list-name = 'OBJECTKEY1'.
        wa_opt_list-options-eq = 'X'. "Enabling only single inclusion lists
        APPEND wa_opt_list TO wa_restrict-opt_list_tab.
    
        wa_ass-kind = 'S'.
        wa_ass-name = 'S_CONOCI'. "Replace with your select option name
        wa_ass-sg_main = 'I'.
        wa_ass-sg_addy = space.
        wa_ass-op_main = 'OBJECTKEY1'.
        APPEND wa_ass TO wa_restrict-ass_tab.
        CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
             EXPORTING
                  restriction            = wa_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 e013.
        ENDIF.
    

    Hope this helps.

    Regards

    Edited by: Alejandro Bindi on Sep 4, 2008 12:57 PM

    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.