Application Development 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: 

select...endselect limit!

Former Member
0 Kudos

hi !

one report will occurs runtime error currently.

Runtime Errors DBIF_RSQL_INVALID_RSQL

Except. CX_SY_OPEN_SQL_DB

occuring this runtime erorr of circumstance :

When the inquiry's terms of the scope of the date of the bigger (the system used for a long time, and a large quantity of data up-to-date, the database will soon increase)

report code as follow:

SELECT awerks blifnr bekgrp agjahr amatnr abelnr abuzei aebeln

aebelp abwart alfbnr alfpos axblnr abudat a~menge

awrbtr awaers admbtr ahswae abwtar bbsart

INTO CORRESPONDING FIELDS OF et_out

FROM ekbe AS a JOIN ekko AS b ON aebeln = bebeln

  • AND AWERKS = BBUKRS

WHERE a~belnr IN s_belnr AND

a~ebeln IN s_ebeln AND

b~lifnr IN s_lifnr AND

b~bsart IN g_r_bsart AND

a~budat IN s_budat AND

a~vgabe = 1 AND

a~matnr IN s_matnr AND

a~werks = p_werks AND

b~ekgrp IN s_ekgrp AND

a~menge > 0 AND

a~bwart IN ('101','102','105','106','161','162','122','123') .

include other select .

ENDSELECT .

in debug I found that this statement can be perform

SELECT awerks blifnr bekgrp agjahr amatnr abelnr abuzei aebeln

aebelp abwart alfbnr alfpos axblnr abudat a~menge

but loop again,in this statement occur runtime dump!

so i want to know what limit about select ... endselect!

and it's working function!

thank you very much!

8 REPLIES 8

Former Member
0 Kudos

Hi,

Try to get this select query data into one internal table...and then loop on that int table. Or if you dont want to use loop again..then use FOR ALL ENTRIES IN previous table.

Don't use select...endselect.

SELECT awerks blifnr bekgrp agjahr amatnr abelnr abuzei aebeln

aebelp abwart alfbnr alfpos axblnr abudat a~menge

awrbtr awaers admbtr ahswae abwtar bbsart

INTO CORRESPONDING FIELDS OF table it_out

FROM ekbe AS a JOIN ekko AS b ON aebeln = bebeln

AND AWERKS = BBUKRS

WHERE a~belnr IN s_belnr AND

a~ebeln IN s_ebeln AND

b~lifnr IN s_lifnr AND

b~bsart IN g_r_bsart AND

a~budat IN s_budat AND

a~vgabe = 1 AND

a~matnr IN s_matnr AND

a~werks = p_werks AND

b~ekgrp IN s_ekgrp AND

a~menge > 0 AND

a~bwart IN ('101','102','105','106','161','162','122','123') .

loop at it_out

select........

endloop.

Thanks and Regards,

Kuldeep.

Edited by: Kuldeep Mane on Sep 24, 2008 5:00 PM

ThomasZloch
Active Contributor
0 Kudos

> When the inquiry's terms of the scope of the date of the bigger

?

Try pasting the short dump section "error analysis" here, but I cannot guarantee anything...

Former Member
0 Kudos

SELECT awerks blifnr bekgrp agjahr amatnr abelnr abuzei aebeln

aebelp abwart alfbnr alfpos axblnr abudat a~menge

awrbtr awaers admbtr ahswae abwtar bbsart

INTO CORRESPONDING FIELDS OF et_out

FROM ekbe AS a JOIN ekko AS b ON aebeln = bebeln

  • AND AWERKS = BBUKRS

WHERE a~belnr IN s_belnr AND

a~ebeln IN s_ebeln AND

b~lifnr IN s_lifnr AND

b~bsart IN g_r_bsart AND

a~budat IN s_budat AND

a~vgabe = 1 AND

a~matnr IN s_matnr AND

a~werks = p_werks AND

b~ekgrp IN s_ekgrp AND

a~menge > 0 AND

a~bwart IN ('101','102','105','106','161','162','122','123') .

include other select .

ENDSELECT .

Is this field g_r_bsart is a range table defined as ranges in the program? If so then check whether it is containing more than 1000 recs. If so then the dump is because of this.

Former Member
0 Kudos

Hi you first retrive data from one table in an internal table itab1.

noe use as

if itab1[] is not initial.

select

INTO CORRESPONDING FIELDS OF et_out

for all entries in itab1

where <field> = itab1-<field>.

Former Member
0 Kudos

hi Joyjit Ghosh ! thank you!

your answer is right!

this select statement responce time is very long!

so in select .... endselect statement have what limit!

0 Kudos

As per my knowledge it has no limit. But I am not sure, may be someone can validate it.

Former Member
0 Kudos

thank you your answer!

0 Kudos

Hi ,

I also have faced such a problem in one join , and is due to the

number of records in a range table . In my case the range table containing more than 3000 records , when i reduce the records to nearly 2220 , the join works for me .

Ratheesh