<?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: Can I call a procedure from a SQL Script calculation view in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265842#M3290761</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Patrick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far, I could successfully execute a procedure and could get the result from the result view to another table variable and could use it in CE function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately I haven't been able to use the OUT parameter value yet. Will have to look into the code for details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not very positive about the performance impact of this, as the CE operators and the SQL code in procedure are executed by different engines and there could be high data transfer between the engines which would deteriorate the performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Feb 2013 08:33:06 GMT</pubDate>
    <dc:creator>Ravi_Channe</dc:creator>
    <dc:date>2013-02-18T08:33:06Z</dc:date>
    <item>
      <title>Can I call a procedure from a SQL Script calculation view</title>
      <link>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaq-p/9265839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to have a procedure in a SQL Script calculation view that calls other procedures, does some calculations, and then returns the values in the view output?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ie: &lt;/P&gt;&lt;P&gt;Call procedure 1 and get result&lt;/P&gt;&lt;P&gt;Call procedure 2 and get result&lt;/P&gt;&lt;P&gt;Then add the two results together and output?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I know I can create a CE_JOIN and I have experimented with various CE calculations but my question is whether it's possible to call other external procedures and return results in the view output?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;-Patrick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Feb 2013 18:56:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaq-p/9265839</guid>
      <dc:creator>patrickbachmann</dc:creator>
      <dc:date>2013-02-17T18:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: Can I call a procedure from a SQL Script calculation view</title>
      <link>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265840#M3290759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Patrick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL script calc view is also implemented as a procedure. For each Calc view a corresponding Procedure is created in SYS_BIC schema and a table type is defined for the VAR_OUT structure. The created procedure has READ only access on the data which means any data manipulation commands are not allowed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So now theoretically it should be possible to call another procedure from one procedure and pass on the output. It is an interesting concept and I would like to try it tomorrow (no access to system on Sunday) and confirm you back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Feb 2013 19:21:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265840#M3290759</guid>
      <dc:creator>Ravi_Channe</dc:creator>
      <dc:date>2013-02-17T19:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: Can I call a procedure from a SQL Script calculation view</title>
      <link>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265841#M3290760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes this works. I have used it mainly from reuse perspective of existing available procedures in Scripted Calc View and consume it from different clients. &lt;/P&gt;&lt;P&gt;However as documented &lt;A href="http://help.sap.com/hana/hana_dev_sqlscript_en.pdf" title="http://help.sap.com/hana/hana_dev_sqlscript_en.pdf"&gt;http://help.sap.com/hana/hana_dev_sqlscript_en.pdf&lt;/A&gt; I would first try to exploit underlying engine capability and see if everything is possible using CE operators itself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2013 03:43:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265841#M3290760</guid>
      <dc:creator>sagarjoshi</dc:creator>
      <dc:date>2013-02-18T03:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can I call a procedure from a SQL Script calculation view</title>
      <link>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265842#M3290761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Patrick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far, I could successfully execute a procedure and could get the result from the result view to another table variable and could use it in CE function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately I haven't been able to use the OUT parameter value yet. Will have to look into the code for details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not very positive about the performance impact of this, as the CE operators and the SQL code in procedure are executed by different engines and there could be high data transfer between the engines which would deteriorate the performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2013 08:33:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265842#M3290761</guid>
      <dc:creator>Ravi_Channe</dc:creator>
      <dc:date>2013-02-18T08:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: Can I call a procedure from a SQL Script calculation view</title>
      <link>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265843#M3290762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your feedback guys.&amp;nbsp; I will hopefully tinker some more with this today and update this with my findings in the next day.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2013 14:45:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265843#M3290762</guid>
      <dc:creator>patrickbachmann</dc:creator>
      <dc:date>2013-02-18T14:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: Can I call a procedure from a SQL Script calculation view</title>
      <link>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265844#M3290763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The only restrictions I remember are regarding input parameters (as far as I understand, you cannot stack passing parameters from the outer calc view to the inner proc) and the fact that your inner proc needs to be read only.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2013 17:10:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265844#M3290763</guid>
      <dc:creator>henrique_pinto</dc:creator>
      <dc:date>2013-02-18T17:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: Can I call a procedure from a SQL Script calculation view</title>
      <link>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265845#M3290764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have used passing input parameter from Calc view to called procedure and it worked. I think the problem you are mentioning is about passing parameters if there is nested call to another calc view.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2013 03:39:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265845#M3290764</guid>
      <dc:creator>sagarjoshi</dc:creator>
      <dc:date>2013-02-19T03:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: Can I call a procedure from a SQL Script calculation view</title>
      <link>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265846#M3290765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Might be something that has changed on the latest versions. Functionally speaking, Calc Views are nothing more than Read-only procedures with Result Column view.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2013 13:36:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265846#M3290765</guid>
      <dc:creator>henrique_pinto</dc:creator>
      <dc:date>2013-02-19T13:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can I call a procedure from a SQL Script calculation view</title>
      <link>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265847#M3290766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sagar, is it possible for you to paste an example of the calc view code that you got to work that calls the external proc?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;-Patrick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2013 15:59:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265847#M3290766</guid>
      <dc:creator>patrickbachmann</dc:creator>
      <dc:date>2013-02-19T15:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: Can I call a procedure from a SQL Script calculation view</title>
      <link>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265848#M3290767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PS:&amp;nbsp; I am not seeing any examples in the sqlscript guide that shows an SQL Script type calculation view that uses both these elements;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call MyProcedureName()&lt;/P&gt;&lt;P&gt;and then also&lt;/P&gt;&lt;P&gt;var_out = ResultsFromMyProcedure&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2013 16:02:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265848#M3290767</guid>
      <dc:creator>patrickbachmann</dc:creator>
      <dc:date>2013-02-19T16:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: Can I call a procedure from a SQL Script calculation view</title>
      <link>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265849#M3290768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am calling my procedure as follows and directly binding var_out&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; /********* Begin Procedure Script ************/ &lt;/P&gt;&lt;P&gt; BEGIN &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call "MYSCHEMA"."READ_PROC1" (:IV_MANDT,'E',var_out);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END /********* End Procedure Script ************/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Procedure READ_PROC1 has a OUT table which has same structure as var_out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2013 16:33:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265849#M3290768</guid>
      <dc:creator>sagarjoshi</dc:creator>
      <dc:date>2013-02-19T16:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: Can I call a procedure from a SQL Script calculation view</title>
      <link>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265850#M3290769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent, let me try something similar now.&amp;nbsp; Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2013 16:36:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265850#M3290769</guid>
      <dc:creator>patrickbachmann</dc:creator>
      <dc:date>2013-02-19T16:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: Can I call a procedure from a SQL Script calculation view</title>
      <link>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265851#M3290770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sagar, using your example code I was able to successfully call a procedure from my SQLScript calculation view!&amp;nbsp; Thank you so much for that.&amp;nbsp; Now I was wondering if you can answer this;&amp;nbsp; my procedure is doing a single thing;&amp;nbsp; it's simply doing a count of records based on my input variable called MyMovement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCEDURE:&lt;/P&gt;&lt;P&gt;var_out = select count(*) as MyFirstCount from MyTableA where MoveType = :MyMovement;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VIEW SQL SCRIPT THAT WORKS:&lt;/P&gt;&lt;P&gt;call "_SYS_BIC"."myProcedure" ('122',var_out);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: var_out output table has a single output field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But now let's say I want my procedure to do TWO things.&amp;nbsp; So in my procedure I have a second similar statement that writes to a second output table called 'another_var_out'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var_out = select count(*) as MyFirstCount from MyTableA where MoveType = :MyMovement;&amp;nbsp; &lt;/P&gt;&lt;P&gt;another_var_out = select count(*) as MySecondCount from MyTableB = :MyMovement;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can successfully validate and activate this procedure however I can't figure out the syntax to call it and get the two outputs.&amp;nbsp; ie: I tried this that failed;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call "_SYS_BIC"."myProcedure" ('122',var_out, another_var_out);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: This fails but in my var_out table I have TWO output fields in the var_out table. I am able to put multiple output tables in my procedure but I can't figure out how to create multiple output tables in my view that is calling the procedure NOR can I seem to write the two values to a single var_out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2013 21:08:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265851#M3290770</guid>
      <dc:creator>patrickbachmann</dc:creator>
      <dc:date>2013-02-19T21:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: Can I call a procedure from a SQL Script calculation view</title>
      <link>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265852#M3290771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Guys thanks for all your responses.&amp;nbsp; See my question to Sagar now (above) about having multiple outputs.&amp;nbsp; Should I open a new topic for this since you really solved my first question?&amp;nbsp; Basically I want my procedure to do a few calculations (ie: execute various SQL that perform calculations) and then return several output variables to the CalcView.&amp;nbsp; I have figured out how to write a single SQL statement in a procedure that generates several output fields successfully to var_out but what if I want to do it with a second completely different SQL statement.&amp;nbsp; (ie: a second pass and send the outputs from both statements).&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: I'm waiting for Lars to chime in any minute now asking WHY do I do such things.&amp;nbsp; &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1214/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2013 21:19:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265852#M3290771</guid>
      <dc:creator>patrickbachmann</dc:creator>
      <dc:date>2013-02-19T21:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: Can I call a procedure from a SQL Script calculation view</title>
      <link>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265853#M3290772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I call directly in SQL editor I discovered I can call like this and get TWO result tables.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;call "_SYS_BIC"."myProcedure" ('122',?,?);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;So while this is cool, obviously I think the problem with the Calculation View is it can't possibly display two result tables at the same time.&amp;nbsp; So really what I think I need to do is have the two select statements in the procedure write to the SAME single var_out table (two fields in var_out) but i have yet to figure out how to do that.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;Have you had two separate select statements in a proc write to two fields in var_out table?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;Thanks&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2013 21:56:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265853#M3290772</guid>
      <dc:creator>patrickbachmann</dc:creator>
      <dc:date>2013-02-19T21:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can I call a procedure from a SQL Script calculation view</title>
      <link>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265854#M3290773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does it also work with a dynamic value in the procedure call?&lt;/P&gt;&lt;P&gt;i.e. instead of '122', call it passing an input parameter that you create in the calc view and fill it during data preview.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2013 22:44:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265854#M3290773</guid>
      <dc:creator>henrique_pinto</dc:creator>
      <dc:date>2013-02-19T22:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: Can I call a procedure from a SQL Script calculation view</title>
      <link>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265855#M3290774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Patrick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Taking your sample as sample.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;call "_SYS_BIC"."myProcedure" ('122',var_out, another_var_out);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;I'm guessing the 2 results of myProcedure are of same type. Isn't it?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;If yes you just need to union these two results to fill var_out, like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;call "_SYS_BIC"."myProcedure" ('122',lt_result1, lt_result2);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var_out = CE_UNION_ALL(:lt_result1,:lt_result2);&lt;/P&gt;&lt;P&gt;or with SQL should be:&lt;/P&gt;&lt;P&gt;var_out = select &lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;MyFirstCount&lt;/SPAN&gt; from :lt_result1 UNION ALL select &lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;MyFirstCount&lt;/SPAN&gt; from :lt_result2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In other hand if the output of your procedures are scalar variable, you first need to "transform" it on same table type for varout...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;call "_SYS_BIC"."myProcedure" ('122',lv_var1, lv_var2);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;var_out = select :&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;lv_var1 &lt;/SPAN&gt;as &lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;MyFirstCount&lt;/SPAN&gt; from dummy union all select :&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;lv_var2&lt;/SPAN&gt; as &lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;MyFirstCount &lt;/SPAN&gt;from DUMMY;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry, but as the sample is too generic the answer is also too much generic. I hope you understand what's behind.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;Regards, Fernando Da Rós&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2013 23:54:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265855#M3290774</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-02-19T23:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: Can I call a procedure from a SQL Script calculation view</title>
      <link>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265856#M3290775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually before I started this test I was working with a CE_UNION_ALL just like you recommend.&amp;nbsp; However what I need to do is actually much more complicated than my example suggests.&amp;nbsp; I almost had everything working with CE_UNION however I'm having some divide by zero errors that I was hoping to fix with several passes.&amp;nbsp; I have to do a series of calculations.&amp;nbsp; I will experiment with your second suggestion though.&amp;nbsp; Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2013 13:27:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265856#M3290775</guid>
      <dc:creator>patrickbachmann</dc:creator>
      <dc:date>2013-02-20T13:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Can I call a procedure from a SQL Script calculation view</title>
      <link>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265857#M3290776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Patrick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only difference of these two ways is table return or variable.&lt;/P&gt;&lt;P&gt;And this shouldn't solve your division by zero error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a new thread with some more real sample so we can follow you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Fernando Da Rós&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2013 17:30:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265857#M3290776</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-02-20T17:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Can I call a procedure from a SQL Script calculation view</title>
      <link>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265858#M3290777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Patrick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I'm getting a bit lost as to what the actual question is, but nonethess, here's a bit of feedback. Hopefully it helps a bit!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Some folks' comments above is correct that there's currently not a way to cascade input parameters through from one procedure to another via SQL Script. Depending on use cases, this can be resolved in graphical calcviews, where input parameters do cascade. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) As you noted, CalcViews only return one table output - so how to return multiple sets of data that you can distinguish is a good question. Of the data is roughly of the same structure, you could possibly fudge some fields, UNION ALL, and populate a flag column, which you can then later query against to split out the results. Could also do a join if the data sets are small enough to not kill performance. CE_VERTICAL_UNION is another option, though I have no experience with this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I understood your question correctly above though, about how to access multiple outputs from a stored proc inside of a CalcView, here is what I came up with. In order to make it work, I had to run GRANT EXECUTE ON SCHEMA &amp;lt;MY_SCHEMA&amp;gt; TO _SYS_REPO WITH GRANT OPTION on the schema where the stored proc is. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- Code for stored proc&lt;/P&gt;&lt;P&gt;SET SCHEMA D055884;&lt;/P&gt;&lt;P&gt;DROP TYPE "STAT";&lt;/P&gt;&lt;P&gt;CREATE TYPE "STAT" AS TABLE ("COUNT" INTEGER);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP PROCEDURE "GET_COUNT";&lt;/P&gt;&lt;P&gt;CREATE PROCEDURE "GET_COUNT"(OUT var_out_1 "STAT", OUT var_out_2 "STAT") &lt;/P&gt;&lt;P&gt;READS SQL DATA AS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BEGIN&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -- just some random code to populate two table variables (in this case one row each)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var_out_1 = SELECT COUNT(*) AS "COUNT" FROM M_CS_TABLES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var_out_2 = SELECT COUNT(*) AS "COUNT" FROM M_RS_TABLES;&lt;/P&gt;&lt;P&gt;END;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- Code for my CalcView - output table structure should be obvious&lt;/P&gt;&lt;P&gt;BEGIN &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CALL "D055884"."GET_COUNT"(a, b);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var_out =&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SELECT &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'results from a' AS "MSG",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"COUNT"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FROM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;:a&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;UNION ALL&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SELECT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'results from b' AS "MSG",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"COUNT"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FROM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;:b;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2013 18:43:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/can-i-call-a-procedure-from-a-sql-script-calculation-view/qaa-p/9265858#M3290777</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-02-20T18:43:38Z</dc:date>
    </item>
  </channel>
</rss>

