cancel
Showing results for 
Search instead for 
Did you mean: 

Can some one help me to call a Procedure in HANA from a transformation

Hari_Krishana
Explorer
0 Kudos

Can some one help  me to call a Procedure in HANA from  a transformation

when i use the below statement with the  procedure name it returns sy-subrc 8 and  goes to a  short dump can some one help me on this as to what could be the issue

  lr_sql->execute_procedure( proc_name  )

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member93896
Active Contributor
0 Kudos

Hello Hari,

try the following:

stmt_ref->execute_ddl( 'TRUNCATE TABLE zrs_testproc_p1' ).

res_ref = stmt_ref->execute_query( 'CALL zrs_testproc( zrs_testproc_p1 ) WITH OVERVIEW' ).

res_ref = stmt_ref->execute_query( 'SELECT * FROM zrs_testproc_p1' ).

Usage is not trivial and requires a good understandig how to deal with the transfer tables (temporary column tables).

It will become much easier with ABAP 7.40 where you can call a procedure just like a function module:

DATA: out TYPE TABLE OF zif_get_user_context=>tt_result.

CALL DATABASE PROCEDURE zget_user_context ( importing tt_result = out )


Regards,
Marc
SAP Customer Solution Adoption (CSA)

Hari_Krishana
Explorer
0 Kudos

Hi Marc,

Thanks a lot for your inputs  this looks simple but  my requirement  may be little complex I need to pass  internal table from SAP to HANA where in am using HANA as a secondary data base

My requirement is simple I will need to use for all entries for the data in HANA,

I may need help on  creating procedure on HANA side also as to how to take it as  an input parameter.

Usually in normal BW transformation we do a Look up on some other DSO using for all entries and get the value and assign it to Target the same requirement instead of accessing DSO in the same data base i want to access the data from HANA

former_member93896
Active Contributor
0 Kudos

Hari,

I'm not sure if your idea to call a procedure inside a BW transformation is the best way to implement your requirement. Why don't you model your transformation logic in HANA as a calc view (which is similar to your procedure) and then either load the data from the calc view via a DTP into BW or use a transient provider to read the data from the calc view directly?

Regards,
Marc

SAP Customer Solution Adoption (CSA)

Hari_Krishana
Explorer
0 Kudos

Hi Marc,

Thanks a Lot for your help culd you please help me with an Example and syntax of the same

0 Kudos

Hi Marc,

I have just seen that HANA database procedures can be called in ABAP by database proxy. Could this be called in ABAP in a BW transformation. I dont have an use case but just thinking...

Best regadrs,

Magesh Umapathy

former_member93896
Active Contributor
0 Kudos

Hello Magesh,

yes, that's technially possible. However, the better/right way to leverage HANA for transformations will be to use BW 7.40 (planned for end of 2013). Selected transformations can be push down to HANA already or you can run complete analytic processes in memory (orchestrated by BW).

Regards,
Marc

SAP Customer Solution Adoption (CSA)

0 Kudos

Thanks Marc. I am waiting for the latest SP on BW 7.4 to be released end of 2013.

From update rules/transfer rules to transformations to in-memory transformations- what a journey!

I have a suggestion... when I use Bex Query as source fo for a transformation , it doesnt let me introduce an infosource inbetween the Bex Query and the target infoprovider.