Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2242

Error : DBIF_INCL_INVALID_CURSOR

$
0
0

Hello All,

 

I have developed something like following code to extract data from database table in block:

 

 

OPEN CURSOR WITH HOLD DBCUR FOR SELECT * FROM (QUERY_TABLE) UP TO ROWCOUNT ROWS.

 

DO.

 

FETCH NEXT CURSOR DBCUR INTO CORRESPONDING FIELDS OF TABLE <ITAB>  PACKAGE SIZE BLOCK_SIZE.

 

CALL FUNCTION 'CUSTOME_FM' ----> This function push data in table parameters to extranal system

           DESTINATION 'BACK'       " (In case of External system call)

            EXPORTING

                P_STOP = P_STOP

            TABLES

                T1 = T1

                T2 = T2.

 

REFRESH : T1,T2,

 

ENDDO.

 

 

This code works perfectly for 1st  call.

And some times till 2nd or 3rd call.

But meanwhile it drop the looping at  FETCH NEXT CURSOR and raise error DBIF_INCL_INVALID_CURSOR. Not sure whether the FETCH statement losses CURSOR position.

 

I would appreciate help on this.

 

Regards.


Viewing all articles
Browse latest Browse all 2242

Trending Articles