‎2008 Feb 18 12:53 PM
Hey,
I have an old program with some select options fields. Inside the program, some select options fields are going to be filled, if they are initial at the beginning.
When using this select options field in my SQL selection, I´m getting a runtime error. How many entries are allowed in select options? In this case, I have about 3800...
Cheers
‎2008 Feb 18 1:01 PM
‎2008 Feb 18 12:57 PM
Hi,
as far as I know there must be less than 2000 entries in the Select-Option.
Look at Note 13607 - the Number is DB-dependent.
Martin
Edited by: Martin Pfeiffer on Feb 18, 2008 2:11 PM
‎2008 Feb 18 1:01 PM
‎2008 Feb 18 1:02 PM
Hi,
From SAP note 635318;
"When the SQL statement is generated at runtime, you should check the
following restrictions and divide or reduce the statement if necessary.
The static length (in the ABAP editor) of any ABAP command must not
exceed 28672 characters.In Open SQL commands with dynamic subclauses
(WHERE, GROUP BY, ORDER BY, and so on), the subclauses cannot contain
more than 28672 characters."
It could be that your select statement is too long, rather than specifically the number of entries in the select-option.
Regards,
Nick
‎2008 Feb 18 1:03 PM
The exact number depends on the database OS AND of abap limit of 32768 bytes.
(Look at OSS [Note 1001257 - SQL error -1105 Too complicated SQL statement|https://service.sap.com/sap/support/notes/1001257])
If one of the select-options has too many values, try to use a FOR ALL ENTRIES if possible.
Regards
‎2008 Feb 18 1:07 PM
When U declare the values in only low then it's restricted .
If U can declare the values in a range then it works fine ..
s_pernr ..
If only s_pernr-low is filled with all your values .. the select goes for a
dump ..
try to give a range ..
s_pernr-low = '10000000'.
s_pernr-high = '10999999'.
s_pernr-sign = 'I'.
s_pernr-option = 'BT'.
‎2010 Feb 17 1:23 PM