Skip to Content
0
Jun 01, 2020 at 09:39 AM

Insert data to third party table from SAP HANA using HANA XS

415 Views

Hello All,

Basically intention is to archive AUDIT LOG table in PUBLIC schema of HANA database, below is the scenario step by step

Scenario

1) Insert that deleted data and insert it into a table in SYBASE database table, which is third party system.

2) Delete data from AUDIT_LOG table in PUBLIC Schema of HANA DB after successful insertion of record in that third party table

Approach:

We are using HANA DB and below is the approach which i followed

1) I created stored procedure in HANA to clear the entries from AUDIT LOG table using 'ALTER SYSTEM CLEAR AUDIT LOG UNTIL' statement

2) I have used one more procedure to select the data from AUDIT LOG table for inserting it to other system table

3) Now i have created XS Project, created XS JS file and written script to call the procedures

Question:

Now i want know how to connect other DB ( SYBASE IQ ) from HANA XS JS and insert AUDIT LOG entries in the table of that DB

Note:

1) I have tried many blogs for this , like below blog is example from Lars , it is just to clear AUDIT LOG and insert data in HANA DB itself, so this cannot be used in our case , https://answers.sap.com/questions/239823/cleanup-auditlog-table-data-older-than-30days.html

2) We cannot use AMDP for consuming it in application layer in ABAP and use DB connection to connect other DB for this because System manipulation code like 'ALTER SYSTEM' cannot be used in AMDP, that is why we are using stored procedure

3) We are using HANA XS to consume the stored procedures in a script and schedule it as job in XS engine

Please let me know how to do this.

Thanks,