<?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: Getting the SQL Script behind a Graphical Calculation View in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/getting-the-sql-script-behind-a-graphical-calculation-view/qaa-p/11362526#M4215243</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rehan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure why you need the SQL from the CV and then modify..But you can find the SQL Script for the Calc View when its created,by right clicking the &lt;SPAN style="font-size: 13.3333330154419px;"&gt; CV in your _SYS_BIC schema&lt;/SPAN&gt;--&amp;gt; Open Definition --&amp;gt; Create Statement tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Avinash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Sep 2015 06:36:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2015-09-30T06:36:50Z</dc:date>
    <item>
      <title>Getting the SQL Script behind a Graphical Calculation View</title>
      <link>https://community.sap.com/t5/technology-q-a/getting-the-sql-script-behind-a-graphical-calculation-view/qaq-p/11362521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to see the SQL script that is generated when I run my graphical calculation. By this I do not mean the select statement that extracts data from the view, but the statement that gets data from the database itself which includes the names of tables used inside the calculation view. Does anyone know of a way to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 13:21:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/getting-the-sql-script-behind-a-graphical-calculation-view/qaq-p/11362521</guid>
      <dc:creator>rehanshaikh</dc:creator>
      <dc:date>2015-09-25T13:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the SQL Script behind a Graphical Calculation View</title>
      <link>https://community.sap.com/t5/technology-q-a/getting-the-sql-script-behind-a-graphical-calculation-view/qaa-p/11362522#M4215239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rehan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can get the information about tables used in the CV from explain plan or the visualize plan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Avinash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Sep 2015 08:19:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/getting-the-sql-script-behind-a-graphical-calculation-view/qaa-p/11362522#M4215239</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-09-29T08:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the SQL Script behind a Graphical Calculation View</title>
      <link>https://community.sap.com/t5/technology-q-a/getting-the-sql-script-behind-a-graphical-calculation-view/qaa-p/11362523#M4215240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can review&amp;nbsp; activated&amp;nbsp; information views ( analytic and calculation views ) via the context menu in SAP HANA studio.&lt;/P&gt;&lt;P&gt;E.g. for calculation views right click on them and select&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/799903" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then you get this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/799994" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A similar visualisation exists for analytical views (Open Join Viewer).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2015 00:03:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/getting-the-sql-script-behind-a-graphical-calculation-view/qaa-p/11362523#M4215240</guid>
      <dc:creator>lbreddemann</dc:creator>
      <dc:date>2015-09-30T00:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the SQL Script behind a Graphical Calculation View</title>
      <link>https://community.sap.com/t5/technology-q-a/getting-the-sql-script-behind-a-graphical-calculation-view/qaa-p/11362524#M4215241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your replies. What I need is an SQL statement that contains not only table names but also join information, such that I can delete the view but still be able to run the SQL and get the same results. Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT TBL1.COL1, TBL2.COL1, TBL2.COL2&lt;/P&gt;&lt;P&gt;FROM TBL1, TBL2&lt;/P&gt;&lt;P&gt;WHERE TBL1.COL1 = TBL2.COL1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of:&lt;/P&gt;&lt;P&gt;SELECT COL1, COL2&lt;/P&gt;&lt;P&gt;FROM CALVIEW&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rehan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2015 06:17:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/getting-the-sql-script-behind-a-graphical-calculation-view/qaa-p/11362524#M4215241</guid>
      <dc:creator>rehanshaikh</dc:creator>
      <dc:date>2015-09-30T06:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the SQL Script behind a Graphical Calculation View</title>
      <link>https://community.sap.com/t5/technology-q-a/getting-the-sql-script-behind-a-graphical-calculation-view/qaa-p/11362525#M4215242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Avinash, this was definitely helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2015 06:18:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/getting-the-sql-script-behind-a-graphical-calculation-view/qaa-p/11362525#M4215242</guid>
      <dc:creator>rehanshaikh</dc:creator>
      <dc:date>2015-09-30T06:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the SQL Script behind a Graphical Calculation View</title>
      <link>https://community.sap.com/t5/technology-q-a/getting-the-sql-script-behind-a-graphical-calculation-view/qaa-p/11362526#M4215243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rehan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure why you need the SQL from the CV and then modify..But you can find the SQL Script for the Calc View when its created,by right clicking the &lt;SPAN style="font-size: 13.3333330154419px;"&gt; CV in your _SYS_BIC schema&lt;/SPAN&gt;--&amp;gt; Open Definition --&amp;gt; Create Statement tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Avinash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2015 06:36:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/getting-the-sql-script-behind-a-graphical-calculation-view/qaa-p/11362526#M4215243</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-09-30T06:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the SQL Script behind a Graphical Calculation View</title>
      <link>https://community.sap.com/t5/technology-q-a/getting-the-sql-script-behind-a-graphical-calculation-view/qaa-p/11362527#M4215244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nope. The views are not defined as SQL and can not (in every case) be rewritten as SQL.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2015 06:38:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/getting-the-sql-script-behind-a-graphical-calculation-view/qaa-p/11362527#M4215244</guid>
      <dc:creator>lbreddemann</dc:creator>
      <dc:date>2015-09-30T06:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the SQL Script behind a Graphical Calculation View</title>
      <link>https://community.sap.com/t5/technology-q-a/getting-the-sql-script-behind-a-graphical-calculation-view/qaa-p/11362528#M4215245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rehan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get the JOIN conditions applied in a view, you can use the system view CS_JOIN_CONDITIONS.&lt;/P&gt;&lt;P&gt;It will also tell you the type of JOIN applied along with the tables/columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a sample query:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT VIEW_NAME, TABLE_NAME1, COLUMN_NAME1,TABLE_NAME2, COLUMN_NAME2, JOIN_TYPE &lt;/P&gt;&lt;P&gt;FROM CS_JOIN_CONDITIONS&lt;/P&gt;&lt;P&gt;WHERE VIEW_NAME = 'YOUR_VIEW_NAME'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Varun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2015 07:27:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/getting-the-sql-script-behind-a-graphical-calculation-view/qaa-p/11362528#M4215245</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-09-30T07:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the SQL Script behind a Graphical Calculation View</title>
      <link>https://community.sap.com/t5/technology-q-a/getting-the-sql-script-behind-a-graphical-calculation-view/qaa-p/11362529#M4215246</link>
      <description>&lt;P&gt;Hi You got answer for your question? If yes please provide, I have same requirement.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 13:24:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/getting-the-sql-script-behind-a-graphical-calculation-view/qaa-p/11362529#M4215246</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-12-05T13:24:51Z</dc:date>
    </item>
  </channel>
</rss>

