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: 

ABAP/4 processor: DBIF_RSQL_SQL_ERROR

Former Member
0 Kudos

Hi All,

I have scheduled a job in background.The job is taking a very long time than usual to process.After processing for around 5000 sec's the job is getting cancelled.Upon checking the job log it is found that the job is cancelled with the following error "ABAP/4 processor: DBIF_RSQL_SQL_ERROR " .

The bottleneck of the code is found at a select query retrieving all the records from a std.table.

Is there any way to solve this problem without changing the program now? Does this happen when the server is busy ?

SELECT BVBELN BPOSNR AFKART AKUNAG AKUNRG AERDAT B~MATNR

BPMATN BPRSDT BARKTX BFKIMG BMEINS BNETWR B~MWSBP

BABRBG BFBUDA BPRODH BAUBEL B~AUPOS

INTO TABLE I_VBRP

FROM VBRK AS A

INNER JOIN VBRP AS B

ON AVBELN = BVBELN

FOR ALL ENTRIES IN I_FINAL

WHERE ( B~AUBEL = I_FINAL-VBELN AND

B~AUPOS = I_FINAL-POSNR ) AND

A~ERDAT >= '20070101'.

IF SY-SUBRC EQ 0.

SORT I_VBRP BY VBELN POSNR ERDAT..

Kindly Advise.

Thanks.

7 REPLIES 7

ThomasZloch
Active Contributor
0 Kudos

DBIF_RSQL_SQL_ERROR can have many causes. What does the dump say in section "error analysis"? Any database-specific error code mentioned? E.g. ORA-xxxxx

Thomas

0 Kudos

Hi Thomas,

SQL error 1652 occurred when accessing table "VBRK ".

ABAP runtime errors DBIF_RSQL_SQL_ERROR

Occurred on 10/27/2008 at 20:20:35

002900 I_FINAL-KUNNR = I_VEDA-KUNNR.

002910 I_FINAL-NAME1 = I_KNA1-NAME1.

002920 I_FINAL-POSNR = I_VBAP-POSNR.

002930 I_FINAL-MATNR = I_VBAP-MATNR.

002940 I_FINAL-ARKTX = I_VBAP-ARKTX.

002950 I_FINAL-ZIEME = I_VBAP-ZIEME.

002960 I_FINAL-ZMENG = I_VBAP-ZMENG.

002970 I_FINAL-NETWR = I_VBAP-NETWR.

002980 I_FINAL-ERDAT = I_VEDA-ERDAT.

002990 PERFORM POPULATE_FINAL.

003000

003010 APPEND I_FINAL.

003020 CLEAR: I_FINAL, I_VBAP.

003030 ENDLOOP.

003040

003050 IF P_BILL = 'X'.

003060 IF NOT I_FINAL[] IS INITIAL.

003070 SELECT BVBELN BPOSNR AFKART AKUNAG AKUNRG AERDAT B~MATNR

003080 BPMATN BPRSDT BARKTX BFKIMG BMEINS BNETWR B~MWSBP

003090 BABRBG BFBUDA BPRODH BAUBEL B~AUPOS

003100 INTO TABLE I_VBRP

003110 FROM VBRK AS A

003120 INNER JOIN VBRP AS B

003130 ON AVBELN = BVBELN

003140 FOR ALL ENTRIES IN I_FINAL

003150 WHERE ( B~AUBEL = I_FINAL-VBELN AND

003160 B~AUPOS = I_FINAL-POSNR ) AND

> A~ERDAT >= '20070101'.

003180 IF SY-SUBRC EQ 0.

003190 SORT I_VBRP BY VBELN POSNR ERDAT.

003200 REFRESH I_KNA1.

0 Kudos

Please also provide the text in section "error analysis".

Thomas

0 Kudos

Hi Thomas,

Please find the error log.

System Log: Local Analysis of nysesapq 2

Time Ty. Nr Cl. User Tcod MNo Text Date : 28.10.08

09:27:57 BTC 14 030 MDSAUTO BYL Database error 1652 requires intervention by the database administrator

09:27:57 BTC 14 030 MDSAUTO BY4 Database error 1652 at FET access to table VBRK

09:27:57 BTC 14 030 MDSAUTO BY0 > ORA-01652: unable to extend temp segment by 640 in tablespac

09:27:57 BTC 14 030 MDSAUTO BY0 > PSAPTEMP#

09:27:57 BTC 14 030 MDSAUTO R68 Perform rollback

09:27:58 BTC 14 030 MDSAUTO AB0 Run-time error "DBIF_RSQL_SQL_ERROR" occurred

09:27:58 BTC 14 030 MDSAUTO AB1 > Short dump "081028 092758 nysesapq MDSAUTO " generated

09:27:58 BTC 14 030 MDSAUTO D01 Transaction termination 00 671 ( DBIF_RSQL_SQL_ERROR 20081028092758nysesapq MDSAUTO 0301 )

09:27:58 BTC 14 030 MDSAUTO R68 Perform rollback

eading:

umber of records read......... 2777

umber of records selected..... 146

ld records skipped............ 2631

urther selection:

umber of records read......... 146

umber of records selected..... 9

arameter records suppressed... 137

umber of records printed...... 9

nd of system log

System Log: Local Analysis of nysesapq 3

0 Kudos

This is the system log section, which is also quite interesting.

But I was referring to the chapter "error analysis" in the short dump text (tx ST22). Maybe you can provide this too.

Based on the information so far, either have tablespace PSAPTEMP extended by a system adminstrator, or change the program so that it does not read/process that much data in one large block, go for smaller block processing instead (e.g. chop I_FINAL into pieces).

Thomas

P.S. also try changing "from vbrk join vbrp" to "from vbrp join vbrk", since your WHERE-conditions refer to vbrp.

0 Kudos

Hi Thomas,

I am getting same error when archieving IDOCs,error is coming in the FM "ARCHIVE_GET_NEXT_OBJECT" while updating ADMI_STATS table.

Please find the error analysis below.

An exception occurred. This exception is dealt with in more detail below

. The exception, which is assigned to the class 'CX_SY_OPEN_SQL_DB', was

neither

caught nor passed along using a RAISING clause, in the procedure

"UPDATE_ADMI_STATS" "(FORM)"

.

Since the caller of the procedure could not have expected this exception

to occur, the running program was terminated.

The reason for the exception is:

How to correct the error

The exception must either be prevented, caught within the procedure

"UPDATE_ADMI_STATS"

"(FORM)", or declared in the procedure's RAISING clause.

To prevent the exception, note the following:

Database error text........: "[8115] Arithmetic overflow error converting

expression to data type int.#[3621] The statement has been terminated."

Internal call code.........: "[RSQL/UPDT/ADMI_STATS ]"

Please check the entries in the system log (Transaction SM21).

You may able to find an interim solution to the problem

in the SAP note system. If you have access to the note system yourself,

use the following search criteria:

-


"DBIF_RSQL_SQL_ERROR" CX_SY_OPEN_SQL_DBC

"SAPLARCH" or "LARCHF06"

"UPDATE_ADMI_STATS"

-


Could you please thorugh some light how to correct error..

Former Member
0 Kudos

It appears to be a memory issue. Try reducing the a mount of data being processed.

Rob