Call a Graphical Calc view with input Parameters from a Script Based Calc View

Hi All.
I am trying to call a graphical calculation view with input parameters from a script based calculation view as below but getting syntax error:
SESSION_SAMPLE = SELECT SESSION_CREATE_DATE,SHA256,CA_MEASURE
                             FROM "_SYS_BIC"."WILDFIRE/CV_SESSION_SAMPLE"
                             WITH PARAMETERS  ('PLACEHOLDER' = ('$$IP_START_DATE$$',:START_DATE),
                                 'PLACEHOLDER' = ('$$IP_END_DATE$$',:END_DATE));
START_DATE  and END_DATE are input parameters of the script based calculation view.
Can anyone please help me with the correct syntax for accomplishing this?
Thanks,
Goutham

Hi Gautham,
One more option  what i would like you to try is the below option , here i have just changed the order of passing nothing else.
SESSION_SAMPLE = SELECT SESSION_CREATE_DATE,SHA256,CA_MEASURE
                             FROM "_SYS_BIC"."WILDFIRE/CV_SESSION_SAMPLE"
                               ('PLACEHOLDER' = ('$$IP_END_DATE$$','$$END_DATE$$'),
                              'PLACEHOLDER' = ('$$IP_START_DATE$$','$$START_DATE$$'))
Regards,
Vinoth

Similar Messages

  • Questions on CDS Views with input parameters

    Dear Experts,
    1. Can we call a CDS View (or generated database view) with input parameters inside an AMDP? I am looking for something similar to the feature in HANA where we can consume calculation view with filters inside SQL Script?
    2. I understand we can next CDS Views, but how we can next (call) a CDS View with input parameters inside another CDS View?
    Thanks,
    Giri

    Hi Thomas,
    I get the below error that the CDS View's generated table function cannot take field from AMDP.
    I have a requirement to query the CDS View using 2 timestamps (start & end). So, in AMDP I have used the TIME_STAMP and try to pass it to the CDS View
    View code:
    define view Z_Ngi_Cag_A
    with parameters start_ts:abap.dec( 15, 0 ) , end_ts:abap.dec( 15, 0 )
    as select from table {
    resource_key
    where
    (begtstmp > $parameters.start_ts or endtstmp > $parameters.start_ts )
    and
    (begtstmp < $parameters.end_ts or endtstmp < $parameters.end_ts )
    I am calling using the below AMDP:
    DECLARE iv_start_date TIMESTAMP;
    DECLARE iv_end_date TIMESTAMP;
    SELECT CURRENT_TIMESTAMP INTO iv_start_date from dummy;
    SELECT ADD_DAYS(CURRENT_TIMESTAMP, 30) INTO iv_end_date from dummy;
    et_data =      SELECT * FROM ZMR_H_CA ( start_ts => iv_start_date, end_ts =>  iv_end_date );
    What could be wrong ? Is this not supported?
    Thanks,
    Giri

  • Calculated view with input parameters

    Hello there.
    I've created a calculated view with input parameters, which I am going to call  it  'VIEW_A'.
    This view has been working just fine.
    But now I have to create another calculated view and import the last one(VIEW_A) in a projection.
    But I got a error when trying to see the data content. 
    It says :
    Error: SAP DBTech JDBC: [2048]: column store error: search table error:  [6968] Evaluator: syntax error in expression string;expected TK_ID,parsing '"DT_DOC_MES_ANO" >= [here]and "DT_DOC_MES_ANO" <='
    At the 'Problems' panel it says the all the input parameters are unmapped.
    What Am I doing wrong?  Sorry but I am kind new at SAP world.

    http://scn.sap.com/message/15489475Hello Tiago,
    Could you please let me know if you're able to resolve your issue, I'm getting the similar error when I'm passing alpha numeric values as parameter via my SP.
    Thanks for your help in advance!
    Regards,
    Sathish

  • Error when using Analytic view with Input Parameters

    Hi,
    I am trying to create an info space based on my Analytic view which has input parameters. The infospace is validated and indexed without any issue. However when I ran the view, I get an error (50011) as it is unable to fetch any results. I tried using an infospace based on Calculation view with input parameters and the explorer view works without any issue.
    Has anyone faced similar issues?
    We are using HANA SP 6 rev 67 and BI 4.0 SP 4.
    Also is there a way to enable input prompts for the users when they refresh the BO Explorer view? If not currently available is there any work around ?
    Thanks

    Hello George,
    I don't have any personalization set on the info space. Also I am using mapped Account in BI to connect to HANA. The confusing part is that it is able to validate the infospace with the input parameters and index it. However query does not return any results. I even tried running the same query which explorer sends to HANA in the SQL editor and there too the same results,the query does not return anything. The model does return data when I do a data preview and if accessed from other tools like AAO.
    Also when I use SSO connection to HANA, indexing of the infospace fails. Where can I see the error log?
    Thanks,

  • Error while creating a BO Universe (using IDT) on top of SAP HANA Calculation View with Input Parameters

    Hi All..
          We are trying to create a Universe (using IDT-Version4.0) on top of the HANA Calculation view. The Calculation view has 4 input parameters, So
    in Universe side we have created the respective prompts. For the creation of derived table we have used the following code
    SELECT *
    FROM "_SYS_BIC"."<schema_name>.<CV_Calculation_View_test>"
    'PLACEHOLDER'=('$$IP_A$$','@Prompt(A)'),
    'PLACEHOLDER'=('$$IP_B$$','@Prompt(B)'),
    'PLACEHOLDER'=('$$IP_C$$','@Prompt(C)'),
    'PLACEHOLDER'=('$$IP_D$$','@Prompt(D)')
    While validating the above code we are getting an error.
    I have attached the snapshot of that error for your reference. Please find the attachment and help me in resolving it.
    Thanks in advance.

    Hello George,
    I don't have any personalization set on the info space. Also I am using mapped Account in BI to connect to HANA. The confusing part is that it is able to validate the infospace with the input parameters and index it. However query does not return any results. I even tried running the same query which explorer sends to HANA in the SQL editor and there too the same results,the query does not return anything. The model does return data when I do a data preview and if accessed from other tools like AAO.
    Also when I use SSO connection to HANA, indexing of the infospace fails. Where can I see the error log?
    Thanks,

  • Calculation view with input parameters

    Hello there.
    I got a calculation with that expects 2 input parameters.
    But now I have to created another calculation view that import this calculation view.
    How can I pass these 2 parameters using sqlscript?
      My script so far
      cv1 = CE_CALC_VIEW("_SYS_BIC"."calc_1",["CR"],'"COMPANY"=''7000''');
    I must pass 2 parameters in this  "_SYS_BIC"."calc_1" table

    Hi Tiago,
    as I am aware, you cannot pass input parameters to CE function.
    You can try using regular SQL syntax:
    SELECT "CR" FROM "_SYS_BIC"."calc_1"
    WHERE "COMPANY" = 7000
    (PLACEHOLDER."$$PARAM_1$$" => VALUE_1,
    PLACEHOLDER."$$PARAM_2$$" => VALUE_2)

  • Binding to Odata Service with Input Parameters from HANA

    Hello,
    I'm developing a UI5 application that consumes a SAP HANA OData service to search a database (using fuzzy search). This service receives an Input Parameter, used to query the database.
    So every time the user searches for something I build a new binding path and refresh the model to show the search results in the sap.m.List.
    The Model:
    var hanaModel =  new sap.ui.model.odata.ODataModel("…/services/seed.xsodata");
    this.setModel(hanaModel);
    The search event handler from sap.m.SearchField:
    var listBinding = this.getView().byId("list").getBinding("items");
    listBinding.sPath = "/FoodstuffByNameValuesParameters(P_NAME='" + searchString + "')/Results";
    this.getView().getModel().refresh();
    My question is if this is the correct approach to create the model and bind the list when we have a service with an Input Parameter, or if there is a better way to do it.
    (This approach is actually working).
    Regards,
    Paulo

    i would do
    var       filter = [];
    var selectFilter = new sap.ui.model.Filter("name", sap.ui.model.FilterOperator.Contains, sVal);
          filter.push(selectFilter);
    listBinding .filter(filter);

  • Using calculation view in excel with input parameters

    Hello
    I have a calculation view which receives 2 input parameters for a range of dates, when i create the connecction with Excel i get the error "sql processing error: Hierarchy source query: SQL: column store error: search table error: [34092] search on calculation model requires parameters: Required variable $$MyVariable$$ is not set"
    I would like to know how can i pass the parameteres from excel to my calculation view??
    Thanks

    I doubt this can be achieved with a native Excel connection. Try SAP Advanced Analysis for Office. (I believe it may now just be called Analysis for Office).

  • Calling a Stored Procedure with output parameters from Query Templates

    This is same problem which Shalaka Khandekar logged earlier. This new thread gives the complete description about our problem. Please go through this problem and suggest us a feasible solution.
    We encountered a problem while calling a stored procedure from MII Query Template as follows-
    1. Stored Procedure is defined in a package. Procedure takes the below inputs and outputs.
    a) Input1 - CLOB
    b) Input2 - CLOB
    c) Input3 - CLOB
    d) Output1 - CLOB
    e) Output2 - CLOB
    f) Output3 - Varchar2
    2. There are two ways to get the output back.
    a) Using a Stored Procedure by declaring necessary OUT parameters.
    b) Using a Function which returns a single value.
    3. Consider we are using method 2-a. To call a Stored Procedure with OUT parameters from the Query Template we need to declare variables of
    corresponding types and pass them to the Stored Procedure along with the necessary input parameters.
    4. This method is not a solution to get output because we cannot declare variables of some type(CLOB, Varchar2) in Query Template.
    5. Even though we are successful (step 4) in declaring the OUT variables in Query Template and passed it successfully to the procedure, but our procedure contains outputs which are of type CLOB. It means we are going to get data which is more than VARCHAR2 length which query template cannot return(Limit is 32767
    characters)
    6. So the method 2-a is ruled out.
    7. Now consider method 2-b. Function returns only one value, but we have 3 different OUT values. Assume that we have appended them using a separator. This value is going to be more than 32767 characters which is again a problem with the query template(refer to point 5). So option 2-b is also ruled out.
    Apart from above mentioned methods there is a work around. It is to create a temporary table in the database with above 3 OUT parameters along with a session specific column. We insert the output which we got from the procedure to the temporary table and use it further. As soon the usage of the data is completed we delete the current session specific data. So indirectly we call the table as a Session Table. This solution increases unnecessary load on the database.
    Thanks in Advance.
    Rajesh

    Rajesh,
    please check if this following proposal could serve you.
    Define the Query with mode FixedQueryWithOutput. In the package define a ref cursor as IN OUT parameter. To get your 3 values back, open the cursor in your procedure like "Select val1, val2, val3 from dual". Then the values should get into your query.
    Here is an example how this could be defined.
    Package:
    type return_cur IS ref CURSOR;
    Procedure:
    PROCEDURE myProc(myReturnCur IN OUT return_cur) ...
    OPEN myReturnCur FOR SELECT val1, val2, val3  FROM dual;
    Query:
    DECLARE
      MYRETURNCUR myPackage.return_cur;
    BEGIN
      myPackage.myProc(
        MYRETURNCUR => ?
    END;
    Good luck.
    Michael

  • How to write XSJS Select Query with input parameters

    Hello Experts,
    I am creating a xsjs file and in that file I am trying to write a Select Query based on a Calculation View
    I have tried it the following way:
    var query = 'SELECT TOP 100 \"Name\", \"Address\", \"City\", \"Country\" FROM \"_SYS_BIC\".\"Test.HL/AddressView\"'
        + 'WITH PARAMETERS(\'PLACEHOLDER\' = (\'$$P_Name$$\', \' Akhil \'),'
      + '\'PLACEHOLDER\' = (\'$$P_City$$\', \' Lucknow \'))';
    But it gives me the "Mixed spaces and tabs error".
    How should I write XSJS Select Query with input parameters?
    Regards,
    Rohit

    >But it gives me the "Mixed spaces and tabs error".
    Mixed spaces and tabs has nothing to do with the syntax of the statement. You used both spaces and the tab in the content - which JSLint doesn't like.  Remove the beginning spaces of each line and use only one or the other.
    The actual syntax of your statement doesn't look right.  The problem is that you are escaping the \ when you don't need to if you are using ' instead of " for your string.  You escape with \" in the first line but then escape with \' in the 2nd and 3rd line.  That is going to cause serious parsing problems with the command.

  • How to write a SQL query in SAP B1 2007 B with input parameters?

    How to write a SQL query in SAP B1 2007 B with input parameters, on execution of which will ask for some input value from the user and the values will be selected from a list such as item list?

    The syntax like
    SELECT * FROM OITM T0 WHERE T0.ItemCode = '[%0\]'
    Thanks,
    Gordon

  • Execute javascript with input parameters of a taskflow

    Using JDev 11g PS4
    I have a taskflow that uses some javascript. When the taskflow has been loaded, I need to execute a javascript function that uses 2 input parameters of my taskflow.
    I don't really know how I can execute the javascript with my input parameters.
    As a test, I have added a commandButton in my taskflow that will do the job:
    <af:commandButton id="btnRefresh" text="Open">
                <af:clientAttribute name="long" value="#{pageFlowScope.pLong}"/>
                <af:clientAttribute name="lat" value="#{pageFlowScope.pLat}"/>
                <af:clientListener method="doNavigate" type="click"/>
            </af:commandButton>How do I do the same when the taskflow loads instead of needing to push the button.

    Please find attached sample based on your use-case:
    http://adfsampleapplications.googlecode.com/svn/trunk/JavascriptOnLoadSample.rar
    It invokes a javascript function on pagefragment load by passing the input parameters from the taskflow.
    Thanks,
    Navaneeth

  • Oracle Views with input

    Oracle Version:Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64
    Hi Experts,
    Is it possible to write a view with input and with IN clause in where cluase ....For Example I want to create a view like Below ..
    The below query may be syntactically wrong , but my intension of writing is similary to this. And the query should contain a IN caluse and A union as below...
    create or replace VIEW view_name (col1,col2, P_inputparam VARCHAR2)
    as
    SELECT Col1,Col2
    FROM table_name1
    where any_column11 in (
    &P_inputparam
    UNION
    SELECT Col1,Col2
    FROM table_name2
    where any_column22 in (
    &P_inputparam
              Thanks In advance.
    Edited by: 883279 on May 10, 2013 1:41 AM

    883279 wrote:
    Oracle Version:Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64
    Hi Experts,
    Is it possible to write a view with input and with IN clause in where cluase ....For Example I want to create a view like Below ..
    The below query may be syntactically wrong , but my intension of writing is similary to this. And the query should contain a IN caluse and A union as below...
    create or replace VIEW view_name (col1,col2, P_inputparam VARCHAR2)
    as
    SELECT Col1,Col2
    FROM table_name1
    where any_column11 in (
    &P_inputparam
    UNION
    SELECT Col1,Col2
    FROM table_name2
    where any_column22 in (
    &P_inputparam
              Thanks In advance.
    Not like that... no.
    What you're using as "input" there are SQL*Plus substitution variables. Those values are requested by SQL*Plus before the code is sent to the database and compiled. Code that runs on the database has no way of interacting with a client keyboard or screen, so you cannot get stored code to prompt for user input.
    See: {message:id=10744582}
    It's possible to use SYS_CONTEXT to get a view to pick up a value that has been previously assigned before the view is used, though I rarely find a need to do this myself.

  • SQLPLUS Acitivity in process flow Input parameters to the script

    I have a sqlplus Activity in the process flow. In the script section I have a update statement which has a where clause where I need to pass a date field as input paramter to this script to compare and update the records.
    Is there a way to pass Input Parameters to the script.
    update test
    set last_name = 'TEST'
    where trunc(begin_date) = :begin_date;
    Begin_date is a variable in my process flow which I need to pass to this script.
    Any ideas as to how I can accomplish this.
    Thanks in advance.

    You can Create a procedure of the Update statement with one input paramenter like
    Create Or replace procedure Update_test ( p_begin_date date )
    IS
    update test
    set last_name = 'TEST'
    where trunc(begin_date) = p_begin_date;
    End;Then call this Procedure in the Process Flow and give input parameter from PF variable.
    Cheers
    Nawneet

  • Please help to call oracle procedure with out paramter from shell script

    Hi
    I want to call a process with out parameter from shell script. I am calling process in shell script in below way
    function Process_loads {
    ( echo 'set serveroutput on size 1000000 arraysize 1'
    echo "set pagesize 0 term on verify off feedback off echo off"
    echo "BEGIN"
    echo " dbms_output.put_line('Before Calling The package'); "
    echo " x ( '$1', '$2', '$2', '$4', '$5', '$error_code'); "
    echo " dbms_output.put_line('After Calling The package'); "
    echo "EXCEPTION "
    echo " WHEN OTHERS THEN "
    echo " dbms_output.put_line('BIN_LOAD_ERROR' || SQLERRM); "
    echo " ROLLBACK;"
    echo "END;"
    echo "/" ) | sqlplus -s $USER/$PASSWORD@$SID
    Here $error_code is out paramter. All varaibles passed in process are declared with export command.
    When executing .sh it gives below error
    "sh ERROR at line 3: ORA-06550: line 3, column 99: PLS-00363: expression '' cannot be used as an assignment target ORA-06550: line 3, column 3: PL/SQL: Statement ignored".
    Please help to get rid from this error or please suggest how to call a oracle procedure with out paramter from unix shell script.
    Thanks in advance

    You can try this:
    From sql*plus
    SQL> ed
      1  create or replace procedure my_proc(p_id in int, p_result out int)
      2  as
      3  begin
      4  select 10 * p_id
      5  into p_result
      6  from dual;
      7* end my_proc;
    SQL> /
    Procedure created.
    SQL> set serveroutput on
    SQL> declare
      2  v_r int;
      3  begin
      4  my_proc(10,v_r);
      5  dbms_output.put_line(v_r);
      6  end;
      7  /
    100
    PL/SQL procedure successfully completed.
    from bash:
    testproc.sh:
    #!/bin/bash
    (echo 'set serveroutput on';
    echo 'declare';
    echo 'v_r int;';
    echo 'begin';
    echo 'my_proc(10,v_r);';
    echo 'dbms_output.put_line(v_r);'
    echo 'end;';
    echo '/';) | sqlplus -s u1/u1
    Console:
    oracle@mob-ubuntu:~$ chmod u+x testproc.sh
    oracle@mob-ubuntu:~$ ./testproc.sh
    100
    PL/SQL procedure successfully completed.With kind regards
    Krystian Zieja

Maybe you are looking for

  • Sharing iTunes Library - Can see but cannot play movies

    I have a Mac with iTunes and a connected external hard drive. In my Movies library, I point to movie files on my external hard drive. I have shared my entire iTunes library including my music and movie selections under iTunes Sharing settings. From i

  • Where do i put my order nadobeumber  so i can download my adobe exportPDF

    i log in and there wasn't any place to put the order number in where does it go?

  • How to readjust an amatured point?

    How to readjust an amatured point? I would like to move one of the joints higher up on the shoulder instead of deleting it and start over?  Any ideas thanks.

  • Initializing collections

    I am working with 8.1.5 and have defined a new object (i.e. period_t). I also wanted to make a nested table of the new object (i.e. element_t) which is defined like: create or replace type element_t as TABLE of period_t; However when I try to run a s

  • I guess not every iPad 3 is bad.

    Right after I bought my iPad 3 I checked the online reviews about how hot it gets, the long charging time, bad wi-fi, etc. I panicked a bit, and started testing on my own. 1. Heat: I used 100% brightness watched youtube for quite a while, then run a