Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Re: xsodata and Fiori problem when saving to Intersection tables

$
0
0

Ewa,

 

first of all welcome to the world of HANA, UI5, Fiori, etc.

 

In my experience with HANA, UI5, Fiori, etc.. here are a few suggestions

 

1) I see you already have the part where you insert a record - great job!  I suggest you move your sql code from the xjslib into a stored procedure - (database design time object, .hdbprocedure)

 

2) the issue you have is to use the inserted record - reference key - for your next insert on the intersection table. here I would suggest you use a sequence (database design time object - .hdbsequence) and from within the stored procedure you could a) get the next value in the sequence, d) use it in the insert and then the generated ID could be used as a reference for your next insert.

 

I suggest you look into the HANA developer guide and also look at more posts here to

a) become familiar with the database design time objects

b) become familiar how to call stored procedures from your xsjslib - here is a blog:

 

http://scn.sap.com/community/developer-center/hana/blog/2015/11/18/callling-stored-proc-with-multiple-values

 

 

3) once you have made the update, your UI could refresh by calling your xsodata again

 

 

here are some other tutorials :  http://help.sap.com/saphelp_hanaplatform/helpdata/en/1e/109b2e781941f7836110eca2c84df3/content.htm?frameset=/en/34/29fc63a1de4cd6876ea211dc86ee54/frameset.htm&current_toc=/en/34/29fc63a1de4cd6876ea211dc86ee54/plain.htm&node_id=372&show_children=false

 

 

you can also check out you tube - hana academy

 

hope this is a good direction and somewhat helpful


Viewing all articles
Browse latest Browse all 9165

Trending Articles



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