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

DBIF_RSQL_SQL_ERROR

Former Member
0 Likes
594

Hi All,

I am getting rutime time error with DBIF_RSQL_SQL_ERROR.

Code written is as follows.

select vbapvbeln vbapposnr into table itab_vbap

from vbap inner join vbak

on vbapvbeln = vbakvbeln

where vbak~auart = 'KB'

and vbap~vbeln in s_vbeln

and vbap~posnr in s_posnr

and vbap~werks in s_werks

and vbap~lgort in s_lgort

and vbap~matnr in s_matnr

and vbap~abgru <> 'SF'.

sort itab_vbap by vbeln posnr.

Dump is coming at SORT statement.

Can anyone help me in rectifying this error.

Thanks in advance.

Regards,

Ashwini Patil.

5 REPLIES 5
Read only

Former Member
0 Likes
564

Hi Ashwini,

Can you elaborate the dump details.

Maybe the field order in internal table itab_vbap is not in the same sequence as VBELN and POSNR.

Or this selection is fetching a lot of records.

Can you paste the dump details?

Regards,

Ankur Parab

Read only

guilherme_frisoni
Contributor
0 Likes
564

No, dump is in your SELECT.

Check the order of fields in your select and in structure of table itab_vbap.

Regards,

Frisoni

Read only

Former Member
0 Likes
564

Hi,

This error usually occurs because SAP support a limited number of records in range selection. I'm not sure exactly whats the number it allows, i believe that it has to be less than 5000.

select vbap~vbeln vbap~posnr into table itab_vbap
from vbap inner join vbak
on vbap~vbeln = vbak~vbeln
where vbak~auart = 'KB'
and vbap~vbeln in s_vbeln " Check # of records in s_vbeln
and vbap~posnr in s_posnr " Check # of records in s_posnr
and vbap~werks in s_werks " Check # of records in s_werks
and vbap~lgort in s_lgort " Check # of records in s_lgort
and vbap~matnr in s_matnr " Check # of records in s_matnr
and vbap~abgru 'SF'.

Hope it helps.

Regards,

Gilberto Li

Edited by: Gilberto Li on Jan 8, 2010 6:14 PM

Read only

Former Member
0 Likes
564

Hi Ashwini ,

Check this



and vbap~abgru 'SF'

" should be 

and vbap~abgru = 'SF'

Hope this helps you.

Read only

Clemenss
Active Contributor
0 Likes
564

Hi Ashwini Patil,

always use SELECT .. INTO CORRESPONDING FIELDS OF TABLE ..

Some people say that this is a performance issue but they do not have any proof at all because it is simply not true.

And you are always on the safer side of life.

Regards,

Clemens