Quantcast
Channel: SCN : Blog List - All Communities
Viewing all articles
Browse latest Browse all 2548

Updating Z-table using dynamic insert from AMDP

$
0
0

Hi All,

 

Can anyone  help  on the  Dynamic  insert  statement in ABAP-HANA  using  AMDP.

 

I created a method in AMDP  to  update  one of the cross schema Z-Table  from an internal table. It is working  only  Dev  system.

 

INSERT INTO :SAPSC1.ZTABLE   select * from :it_rcnet;

 

This is because of SAPSC1  is  deve  system.

 

I am  running  this  from  CAR  system  to  POSDM.  SAPSC1  is  POSDM  system.

 

To  make   this  as  dynamic and  to  work in QA and PRD  I tried  lot  using  native or other  ways.  But  I  couldn't  get  result.

 

I wrote the logic  like  below in the method  implementation :

 

Method  insert_ztable by database procedure for HDB language sqlscript  .

declare lv_sql varchar2(200);

 

begin

lv_sql   :=   'INSERT INTO'  || :IV_TABLE ||  ' select * from :itab';

end;

 

endmethod.

 

when I run this from ABAP  I am  getting  message:  SQL Code error 257.  Can anyone  help  me  in this..


Viewing all articles
Browse latest Browse all 2548

Trending Articles



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