2010 Jan 08 3:01 PM
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.
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
2010 Jan 08 3:13 PM
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
2010 Jan 08 3:13 PM
No, dump is in your SELECT.
Check the order of fields in your select and in structure of table itab_vbap.
Regards,
Frisoni
2010 Jan 08 5:14 PM
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
2010 Jan 09 4:17 AM
Hi Ashwini ,
Check this
and vbap~abgru 'SF'
" should be
and vbap~abgru = 'SF'
Hope this helps you.
2010 Jan 09 2:05 PM
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
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |