Quantcast
Channel: SCN : All Content - ABAP for SAP HANA
Viewing all articles
Browse latest Browse all 831

Use of commit for the asynchronous proxy call on the fetch Cursor loop

$
0
0

Hi members,

 

I need to fetch the data in packages from the HANA view ( with help of external view), I have used the Cursor statement to do so.

In  the Cursor fetch loop, i need to pass on that data to the asynchronous proxy method. I have to commit after sending the data to asynchronous proxy method. I tried it using the following approaches:

1. Using FM DB_COMMIT : the PI messages are still in the "message recorded,commit missing" status.

2. Using COMMIT WORK : The cursor is invalidated.

 

I can do the commit work after the Cursor loop, but this approach will keep all the messages in PI queue untill it gets the commit statement.

 

Please guide as how can this be resolved.

 

 

TRY.

       OPEN CURSOR WITH HOLD c FOR SELECT DISTINCT .....

                            FROM      ...

                            WHERE ...

 

       DO.

FETCH NEXT CURSOR  c INTO CORRESPONDING FIELDS OF TABLE lt_initiative PACKAGE SIZE gv_package_size.

:

:

--call to asynchronous PI message

" need to commit here



END DO.

close cursor c.

{ commit work here works fine}

 

Regards,

Nidhi


Viewing all articles
Browse latest Browse all 831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>