Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ABAP runtime error in selection

Former Member
0 Likes
1,374

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

1 ACCEPTED SOLUTION
Read only

JozsefSzikszai
Active Contributor
0 Likes
1,116

hi Arne,

I also had the same problem some time ago. Pls. have a look at this thread:

hope this helps

ec

6 REPLIES 6
Read only

Former Member
0 Likes
1,116

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

Read only

JozsefSzikszai
Active Contributor
0 Likes
1,117

hi Arne,

I also had the same problem some time ago. Pls. have a look at this thread:

hope this helps

ec

Read only

Former Member
0 Likes
1,116

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

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,116

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

Read only

Former Member
0 Likes
1,116

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'.

Read only

Former Member
0 Likes
1,116

No ongoing question anymore...