on 01-16-2019 5:31 PM
Hello,
I am trying to use USING CLIENT addition for specifing client for view but it return me this error. Please could you help me?
select * from SAPABAP1.IMATERIALSTOCK using client '200'
Error:
Could not execute 'select * from SAPABAP1.IMATERIALSTOCK using client '200''
SAP DBTech JDBC: [257]: sql syntax error: incorrect syntax near "using": line 1 col 39 (at pos 39)
I need to do it because this CDS view is @ClientHandling.algorithm: #SESSION_VARIABLE
It returns empty table when client is not specified in select.
As you are using the schema name in your select I assume that you execute it directly on DB level and not on the ABAP level. The "using client" addition is only available on the ABAP layer. On DB layer you just have to add a where condition (... where client = '200') if you wanna restrict the data set to a specific client.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately "where" is not working in case @ClientHandling.algorithm: #SESSION_VARIABLE
Point is that I would like to use existing CDS views prepared by SAP, but it expect client to be specified in session variable, what I don't know how to do it calling this CDS view directly from database or from Microsoft PowerBI for example.
Maybe another possibility is to copy existing CDS view and specify client this new custom view so it will not take it from session variables... do you have any advice?
For example this is very nice movement view: I_GoodsMovementCube that I would like to access directly from database or MS Power BI.
Please would it be possible to clarify if you are working on the ABAP Layer or directly on DB layer or something else. In your question it sounded you try it from DB layer directly (mixed with ABAP), now you saying you wanna do it with PowerBI. What is your final goal?
florian.pfeffer
I am using connection from Power BI application but the same problem I have when trying to connected to view from our SQL server.
Example for Power BI:
Here are I am calling predefine CDS view for storage location list. This view has annotation @ClientHandling.algorithm #SESSION_VARIABLE. So it expected client to be specified for connection session. For all such a CDS views i get empty table in Power BI or calling them from SQL server. (My own views working perfectly). Yes, I can write my one CDS views, but there is so many nice views already predefine in HANA database, so I really would be happy to find way to use them. Thank you for any advice.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.