2008 Dec 15 11:46 AM
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
2008 Dec 15 11:59 AM
How many records do you have in VBFA, VBRK and r_buff_rcbal[].
2008 Dec 15 12:00 PM
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
2008 Dec 15 12:38 PM
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
2008 Dec 16 7:09 AM
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
2008 Dec 16 8:47 AM
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.
2008 Dec 16 10:15 AM
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.
2008 Dec 16 10:36 AM
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.