Quantcast
Channel: SCN: Message List - ABAP for SAP HANA
Viewing all articles
Browse latest Browse all 2110

Re: HANA Session Lifecycle

$
0
0

I did some further analysis and I found something really interesting. Here is what I did using an ABAP program and executing native SQL:

 

EXEC SQL.

 

CREATE LOCAL TEMPORARY TABLE #my_global_temp_table (

                  Column1 INTEGER,

                   Column2 VARCHAR(10),

                   Column3 VARCHAR(20)

)

 

ENDEXEC.

 

EXEC SQL.

 

     INSERT INTO #my_global_temp_table VALUES (1,2,3)

 

ENDEXEC.

 

EXEC SQL.

     open dbcur for select * from #my_global_temp_table

ENDEXEC.

 

 

   DO.

 

     EXEC SQL.


        fetch next dbcur into :ls_test

 

     ENDEXEC.

 

     IF sy-subrc NE 0.

 

       EXIT.

 

     ELSE.

 

       APPEND ls_test TO lt_test.

 

     ENDIF.

 

   ENDDO.


Now when I run the program from my user ID the local temporary table gets created and I am able to insert data to it. Let's say I start a new session within some X amount of time. The create statement throws an exception as the table already exists. If I directly try to read the temporary table, it has data that I inserted in another session. Also, if I login with a different user id, I can still access the temporary table created by another user. However, as I said all this is dependent on some X time. Hence, what I feel is SAP is disconnecting the session after some time - idle time which leads to the table getting lost. Is that a right finding? I am on ECC on HANA system. What is the lifecycle of the HANA connections from ABAP?


Any expert advice would help? My idea is to use this temporary table as some form of caching for a UI5 application that I am building.


Viewing all articles
Browse latest Browse all 2110

Trending Articles



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