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: 

SHORT DUMP DBIF_RSQL_INVALID_CURSOR

Former Member
0 Kudos

HI,

we are trying to achieve the parallel processing.

we are writing the code in the USER EXIT for enhancement RSAp0001.Here SAP program provides one internal table C_T_DATA and using this table we are processing data and having some complex look ups and again updating the C_T_DATA with processed data. Then further that data goes to BW system.

First Data package goes through well, but for the next selection it gives the ABAP dump and job gets cancelled.

Please help to understand and resolve problem.

Thanks

Santosh.

Some of the details in the DUMP:

Invalid interruption of a database selection.

The termination occurred in the ABAP/4 program "GP$GLX$ZZBLPCA " in

"FETCH".

The main program was "SBIE0001 ".

The termination occurred in line 621

of the source code of program "GP$GLX$ZZBLPCA " (when calling the editor 6210).

The program "GP$GLX$ZZBLPCA " was started as a background job.

006010 * full aggregation upon period is requested

006020 IF C_S_CURSOR-X_CUMULATED EQ GUSL_C_TRUE OR

006030 C_S_CURSOR-PERIOD_AGGR EQ GUSL_C_PERAGGR_FULL.

006040 L_POST_PROC = GUSL_C_TRUE.

006050 ELSE.

006060 L_POST_PROC = GUSL_C_FALSE.

006070 ENDIF.

006080

006090 IF L_POST_PROC EQ GUSL_C_TRUE AND

006100 C_S_CURSOR-PACKAGE GT 0.

006110 PERFORM RESTORE_FETCHSTATE USING C_S_CURSOR-SX_FETCHSTATE

006120 CHANGING L_SX_FETCHSTATE.

006130 ENDIF.

006140

006150 L_COUNTER = 0.

006160 C_S_CURSOR-SUBRC = 0.

006170 WHILE I_PACKAGE_SIZE EQ 0 OR

006180 L_COUNTER LT I_PACKAGE_SIZE.

006190 FETCH NEXT CURSOR C_S_CURSOR-CURSOR

006200 INTO CORRESPONDING FIELDS OF TABLE G_T_RECORDS

> PACKAGE SIZE L_PSIZE.

006220 IF SY-SUBRC EQ 0.

006230 IF L_CLEAR EQ GUSL_C_TRUE.

006240 CLEAR: C_T_GLU1, C_T_DATA.

006250 L_CLEAR = GUSL_C_FALSE.

006260 ENDIF.

006270 DESCRIBE TABLE G_T_RECORDS LINES L_TFILL.

006280 ADD L_TFILL TO L_COUNTER.

006290 ELSE.

006300 IF L_COUNTER EQ 0.

I am pasting the code:

LOOP AT C_T_DATA INTO WA_ZZBLPCW.

APPEND WA_ZZBLPCW TO ITAB_ZZBLPCW.

CLEAR WA_ZZBLPCW.

ENDLOOP.

CLEAR KICK_COUNT.

CLEAR RAN_SERIAL.

LOOP AT ITAB_ZZBLPCW INTO WA_ZZBLPCW.

RAN_SERIAL = RAN_SERIAL + 1.

MOVE RAN_SERIAL TO I_C_T_DATA-SERIAL_ID.

CASE WA_ZZBLPCW-AWTYP.

WHEN 'MKPF'.

MOVE '1' TO I_C_T_DATA-PID.

MOVE-CORRESPONDING WA_ZZBLPCW TO I_C_T_DATA.

WHEN 'BKPF' OR 'BKPFF' OR 'RMRP'.

MOVE '2' TO I_C_T_DATA-PID.

MOVE-CORRESPONDING WA_ZZBLPCW TO I_C_T_DATA.

WHEN 'VBRK'.

MOVE '3' TO I_C_T_DATA-PID.

MOVE-CORRESPONDING WA_ZZBLPCW TO I_C_T_DATA.

WHEN OTHERS.

MOVE '4' TO I_C_T_DATA-PID.

MOVE-CORRESPONDING WA_ZZBLPCW TO I_C_T_DATA.

ENDCASE.

APPEND I_C_T_DATA.

CLEAR WA_ZZBLPCW.

ENDLOOP.

SORT I_C_T_DATA.

DELETE FROM ZBW_EXIT_TAB WHERE PID <> ' '.

exec sql.

truncate table ZBW_EXIT_TAB

endexec.

COMMIT WORK.

INSERT ZBW_EXIT_TAB FROM TABLE I_C_T_DATA.

COMMIT WORK.

CLEAR I_C_T_DATA.

REFRESH I_C_T_DATA.

REFRESH: ITAB_ZZBLPCW.

CLEAR WA_ZZBLPCW.

KICK_COUNT = 0.

WHILE KICK_COUNT < 3.

KICK_COUNT = KICK_COUNT + 1.

CONCATENATE 'ZSUBMIT_BIW' KICK_COUNT INTO jbname.

CALL FUNCTION 'JOB_OPEN'

EXPORTING

JOBNAME = jbname

IMPORTING

JOBCOUNT = jbcnt.

SUBMIT ZBW_BP_SI_USER_EXIT

with P_PID = KICK_COUNT

via job jbname number jbcnt

AND RETURN.

CALL FUNCTION 'JOB_CLOSE'

EXPORTING

JOBCOUNT = jbcnt

JOBNAME = jbname

STRTIMMED = 'X'.

MOVE JBNAME TO I_JOB_STATUS-I_JOB_NAME.

MOVE JBCNT TO I_JOB_STATUS-I_JOB_COUNT.

APPEND I_JOB_STATUS.

WAIT UP TO 2 SECONDS.

ENDWHILE.

DO.

SELECT JOBNAME FROM TBTCO INTO CORRESPONDING FIELDS OF TABLE

I_TBTCO FOR ALL ENTRIES IN I_JOB_STATUS

WHERE JOBNAME = I_JOB_STATUS-I_JOB_NAME AND

JOBCOUNT = I_JOB_STATUS-I_JOB_COUNT AND

STATUS = 'F'.

DESCRIBE TABLE I_TBTCO LINES WS_CNT.

IF WS_CNT = KICK_COUNT.

EXIT.

*ELSE.

*CONTINUE.

ENDIF.

ENDDO.

CLEAR I_TBTCO.

REFRESH I_TBTCO.

CLEAR I_JOB_STATUS.

REFRESH I_JOB_STATUS.

CLEAR WS_CNT.

SELECT * FROM ZBW_EXIT_TAB

INTO CORRESPONDING FIELDS OF TABLE ITAB_ZZBLPCW.

C_T_DATA[] = ITAB_ZZBLPCW[].

DELETE FROM ZBW_EXIT_TAB WHERE PID <> ' '.

exec sql.

truncate table ZBW_EXIT_TAB

endexec.

COMMIT WORK.

5 REPLIES 5

Former Member
0 Kudos

I have seen this dump when a COMMIT WORK is used within a SQL access... If you are performing a commit during the SQL access, then this could be your problem... The first time through, everything looks great, then the commit happens and interrupts the SQL. Then, the Fetch is attempted and you have lost the cursor due to the commmit... and the short dump... try working the commit outside of your SQL statements.. That should take care of it...

0 Kudos

Thanks ! I found one SAP NOte 413807 which also explains the things.

0 Kudos

Could you then, please close the thread and markt the question as answered ?

0 Kudos

Thread is not yet ready for closure.WE are still having the same issue.

One more question:

Does SUBMIT and RETURN statment close the CURSOR?

Any clue?

Thanks

0 Kudos

See the online help to "open cursor".

There are the statemtns listed which do close the cursor.

SUBMIT is not among them.

if the commit work is the issue you could try it with open cursor with hold and set a commit work in native sql - not an elegant work but avoids closing the cursor.

Christian