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: 

Regarding sql error.....ABAP Dump

Former Member
0 Kudos
176

Hi Gurus...

The Dump is as below:

Error in RSQL module of database interface

o The maximum size of an SQL statement has been exceeded.

o The statement contains too many input variables.

o The space needed for the input data exceeds the available memory.

I am taking the values in a range for a buffer table

Logic written as follows.

SELECT vbfavbelv vbrkvbeln INTO TABLE i_vbfa_vbrk

FROM ( vbfa INNER JOIN vbrk

ON vbfavbeln = vbrkvbeln )

WHERE vbfa~vbelv IN r_buff_rcbal[]

AND vbfa~vbtyp_n = c_invoice

AND vbfa~vbtyp_v = c_delivery.

Please Advice for the the above problem.

Thanks in Advance...

Gaurav

7 REPLIES 7

matt
Active Contributor
0 Kudos
144

How many records do you have in VBFA, VBRK and r_buff_rcbal[].

ThomasZloch
Active Contributor
0 Kudos
144

r_buff_rcbal[] probably contains too many single entries, try splitting these into blocks of e.g. 1000, or - if only single entries are involved - also investigate using FOR ALL ENTRIES with an internal table instead of the range.

Thomas

former_member194613
Active Contributor
0 Kudos
144

it is a typical dump with ranges, guess there are more than 1000 or 2000 lines in r_buff_rcbal

Use FOR ALL ENTRIES instead of your range:

WHERE vbfa~vbelv IN r_buff_rcbal[]

Siegfried

Former Member
0 Kudos
144

Hi

I think the dump is because of range r_buff_rcbal[] . Check the range for values and also use a input variable for the screen. Sometimes timeout dump will occur because of this

regards

Shiva

Former Member
0 Kudos
144

Hi, Gaurav.

Check the query statement using T-Code 'ST05'.(You can scan native sql using 'ST05')

When open sql statement returns native sql, IN Ranges clause returns the

union of the solution sets of all select statements that would result if you wrote

a separate statement for each line of the ranges.

SELECT vbfa~vbelv vbrk~vbeln INTO TABLE i_vbfa_vbrk
FROM ( vbfa INNER JOIN vbrk
ON vbfa~vbeln = vbrk~vbeln )
WHERE vbfa~vbelv IN r_buff_rcbal[]
AND vbfa~vbtyp_n = c_invoice
AND vbfa~vbtyp_v = c_delivery.

maybe returns native sql like this,

SELECT vbfa~vbelv vbrk~vbeln INTO TABLE i_vbfa_vbrk
FROM ( vbfa INNER JOIN vbrk
ON vbfa~vbeln = vbrk~vbeln )
WHERE ( vbfa~vbelv = r_buff_rcal-vbelv1 or
             vbfa~vbelv = r_buff_rcal-vbelv2 or
             vbfa~vbelv = r_buff_rcal-vbelv3 or
                 .... as many as count(r_buff_rcal)
AND vbfa~vbtyp_n = c_invoice
AND vbfa~vbtyp_v = c_delivery.

Namely, Ranges r_buff_rcbal has too much values.

That's why short dump arise.

Regards

Kyung Woo.

Former Member
0 Kudos
144

Hi ,

I think the error is with r_buff_rcbal[].

if that doesnot contain any values all the entries will be fetched.

before this select statement check forr_buff_rcball entries.

the best method would be to use for all entries.

SELECT vbfavbelv vbrkvbeln INTO TABLE i_vbfa_vbrk

FROM ( vbfa INNER JOIN vbrk

ON vbfavbeln = vbrkvbeln )

for all entries in r_buff_rcball

WHERE vbfa~vbelv = r_buff_rcball-vbelv

AND vbfa~vbtyp_n = c_invoice

AND vbfa~vbtyp_v = c_delivery.

rainer_hbenthal
Active Contributor
0 Kudos
144

The in clause will result in abif SQL if there are many entries. use FAE and check the blocking factor.

Goto ST05 and check your SQL statement and see how big they will be.