11-18-2021 3:27 PM
Hi All,
I have a Requirement in which i have to restrict the value in select-option range from 1 to 16. User can't input more than 16 values in select-option range.
Can anyone help me regarding this?
11-18-2021 3:44 PM
Use AT SELECTION SCREEN ON FIELD for validation regarding number of entries in select option table and give error message for more that 16 entries.
11-18-2021 3:44 PM
Use AT SELECTION SCREEN ON FIELD for validation regarding number of entries in select option table and give error message for more that 16 entries.
11-19-2021 5:37 AM
11-19-2021 6:13 AM
11-19-2021 6:17 AM
AT SELECTION-SCREEN ON S_RPMAX.
IF S_RPMAX[] IS NOT INITIAL.
IF S_RPMAX-HIGH > 16.
MESSAGE 'Please enter range of value between 1 to 16 in selecion option' TYPE 'E'.
ENDIF.
ENDIF.
11-19-2021 6:17 AM
11-19-2021 8:17 AM
For ranges, where you want one entry between two specific values, use two parameters on the same line - one for the high, one for the low, as detailed in this blog concerning dates: https://blogs.sap.com/2014/02/07/dates-and-select-options/
11-19-2021 1:24 PM
Thanks Matthew, for the answer actually I am new to Abap So i am learning.
11-19-2021 1:16 PM
I guess that you want to use a very limited version of the powerful "select-options".
So, instead, as Matthew said, you should define 2 fields, one "from" and one "to".
For instance, two fields in the same line:
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (30) text-s01. " and define the text of text symbol S01
SELECTION-SCREEN POSITION 32.
PARAMETERS p_from TYPE i.
PARAMETERS p_to TYPE i.
SELECTION-SCREEN END OF LINE.
See all the explanations in the ABAP documentation.
11-19-2021 1:26 PM
11-19-2021 1:37 PM