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

Re: Execute Procedure with input parameters as table from ABAP

$
0
0

Hi,

 

something like this (syntax wise you adjust it accordingly):

 

* HANA temporary table is already created and flushing out table record

lo_sql->execute_ddl( 'TRUNCATE TABLE "HANA_INPUT_TABLE"' ).

lo_sql->execute_ddl( 'TRUNCATE TABLE "HANA_OUTPUT_TABLE"' ).

 

* bring abap internal table record into temporary table

LOOP AT abap_it_table INTO lv_tab_content
  lo_sql->execute_update( 'INSERT INTO "HANA_INPUT_TABLE" VALUES(''' && lv_tab_content &&''')').
ENDLOOP.

 

* call your own procedure which processed your business logic

lo_result = lo_sql->execute_query( 'CALL "your.procedure"( "HANA_INPUT_TABLE", "HANA_OUTPUT_TABLE" ) WITH OVERVIEW ' ).

lo_result->close( ).

 

* Get the data from output table (optional depending on your requirement)

lo_result = lo_sql->execute_query( 'SELECT * from "HANA_OUTPUT_TABLE"' ).

 

Regards.

YS


Viewing all articles
Browse latest Browse all 2110

Trending Articles



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