<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Using client addition in SQL  select in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/using-client-addition-in-sql-select/qaa-p/822812#M262413</link>
    <description>&lt;P&gt;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.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Jan 2019 18:46:48 GMT</pubDate>
    <dc:creator>pfefferf</dc:creator>
    <dc:date>2019-01-16T18:46:48Z</dc:date>
    <item>
      <title>Using client addition in SQL  select</title>
      <link>https://community.sap.com/t5/technology-q-a/using-client-addition-in-sql-select/qaq-p/822811</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
  &lt;P&gt;I am trying to use USING CLIENT addition for specifing client for view but it return me this error. Please could you help me?&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;select * from SAPABAP1.IMATERIALSTOCK using client '200'&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Error:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;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)
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;I need to do it because this CDS view is @ClientHandling.algorithm: #SESSION_VARIABLE&lt;/P&gt;
  &lt;P&gt;It returns empty table when client is not specified in select.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 17:31:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/using-client-addition-in-sql-select/qaq-p/822811</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-01-16T17:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using client addition in SQL  select</title>
      <link>https://community.sap.com/t5/technology-q-a/using-client-addition-in-sql-select/qaa-p/822812#M262413</link>
      <description>&lt;P&gt;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.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 18:46:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/using-client-addition-in-sql-select/qaa-p/822812#M262413</guid>
      <dc:creator>pfefferf</dc:creator>
      <dc:date>2019-01-16T18:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using client addition in SQL  select</title>
      <link>https://community.sap.com/t5/technology-q-a/using-client-addition-in-sql-select/qaa-p/822813#M262414</link>
      <description>&lt;P&gt;Unfortunately "where" is not working in case @ClientHandling.algorithm: #SESSION_VARIABLE&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;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?&lt;/P&gt;&lt;P&gt;For example this is very nice movement view: I_GoodsMovementCube that I would like to access directly from database or MS Power BI.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 16:36:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/using-client-addition-in-sql-select/qaa-p/822813#M262414</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-01-17T16:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using client addition in SQL  select</title>
      <link>https://community.sap.com/t5/technology-q-a/using-client-addition-in-sql-select/qaa-p/822814#M262415</link>
      <description>&lt;P&gt;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?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 18:09:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/using-client-addition-in-sql-select/qaa-p/822814#M262415</guid>
      <dc:creator>pfefferf</dc:creator>
      <dc:date>2019-01-17T18:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: Using client addition in SQL  select</title>
      <link>https://community.sap.com/t5/technology-q-a/using-client-addition-in-sql-select/qaa-p/822815#M262416</link>
      <description>&lt;P&gt; &lt;SPAN class="mention-scrubbed"&gt;florian.pfeffer&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;I am using connection from Power BI application but the same problem I have when trying to connected to view from our SQL server.&lt;/P&gt;&lt;P&gt;Example for Power BI:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/267242-pbi1.png" /&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jan 2019 22:00:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/using-client-addition-in-sql-select/qaa-p/822815#M262416</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-01-18T22:00:43Z</dc:date>
    </item>
  </channel>
</rss>

