on 08-17-2018 9:38 AM
Hi,
I have two tables. The first one is Items table, the second one is a UDT that contains itemCode and some other columns. I want to do left join to get all records from Items table and related records from second table (if exists). How can I do that?
Thanks
Haktan
Hello Haktan,
If your question is how to achieve that I would recommend 2 approaches:
1) Call a view instead of a standard ServiceLayer entity. More info: https://blogs.sap.com/2018/02/01/new-sap-business-one-semantic-layer-view-exposure/
2) Call a procedure using XSJS (not ServiceLayer, but still HTTP REST). You need to implement your XS JS wrapper for the procedure or you can use the following: https://blogs.sap.com/2018/07/19/hana-procedure-performer-xs-js-project/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Haktan Cinkilic,
You can opt to use Crossjoin for your purpose. Please do not get confused with the Database Joins that you might be thinking.
Refer to following thread:
Kind regards,
ANKIT CHAUHAN
SAP Business One Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Haktan Cinkilic,
As mentioned previously, do not confuse with Crossjoin and the joins that you use in SQL or HANA Studio.
Write the Left Join query in SAP HANA Studio and try to use that same query using Crossjoin in Service Layer.
Update: Just came to know that the Left Join is not supported yet.
Kind regards,
ANKIT CHAUHAN
SAP Business One Support
User | Count |
---|---|
94 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.