05-06-2009 6:14 PM
Hi All,
Can we enter any number of values in select-options on the selection screen. What is the limit on the number of values that can be given for select options.
For example if the limit for a select-options field is 100000 and if i want to give 999999 values as input on the selection screen, how am I supposed to handle this.
Thanks in advance,
Madhu
05-06-2009 7:37 PM
Total Questions: 33 (21 unresolved)
You might want to think about cleaning up your old posts.
Rob
05-06-2009 6:20 PM
05-06-2009 6:36 PM
Hi Madhu,
see the sample code below .. i hope it this will help you..
SELECT-OPTIONS: s_order FOR vbak-vbeln . "Default the value range 100000 to 9999999 appears on the screen
INITIALIZATION.
* Loading default values to screen input for Sales Order field
MOVE 'I' TO s_order-sign.
MOVE 'BT' TO s_order-option.
MOVE '1000000' TO s_order-low.
MOVE '9999999' TO s_order-high.
APPEND s_order.
* Screen field Validation
AT SELECTION-SCREEN ON s_order.
if s_order-low NE 100000.
message 'Sales order Low value should be 100000' type 'E'.
endif.
if s_order-High NE 999999.
message 'Sales order High value should be 999999' type 'E'.
endif.
Regards,
Prabhudas
05-06-2009 7:37 PM
Total Questions: 33 (21 unresolved)
You might want to think about cleaning up your old posts.
Rob
05-06-2009 7:41 PM
I want to give entries such as 1,4 ,51, 72 .........9999999 . So i cannot give a range.
I want to know the way to handle the inputs if the number of values exceed the limit.
Thank you,
Madhu
05-06-2009 7:48 PM
Try this way..
data : w_count type i.
SELECT-OPTIONS: s_order FOR vbak-vbeln .
* Screen field Validation
AT SELECTION-SCREEN ON s_order.
DESCRIBE TABLE s_order LINES w_count.
if w_count LT 0. "Enter value here how many minimum values need to enter
message 'Minimum one sales order need to entry' type 'E'.
endif.
if w_count GT 99999. "enter Values here what is the Maximum inputs
message 'Maximum Sales order inputs should not excedd 999999' type 'E'.
endif.
Regards,
Prabhudas
05-06-2009 8:34 PM
You can not enter any number in the select-option field and the number is limited by the length of the SQL string supported by your database system. Obviously, the number of entries depends on the width of the field. When the entries exceed the string length limit, you will get a run time error (short dump).
You have two options:
1) See if you can implement "for all entries" feature of ABAP SELECT statement.
2) You go in a loop and submit just 1000 (or so) entries at a time to the SELECT statement.