Calling a procedure from Calculation View with Debug function

Is it possible to call a debuggable hana procedure in a calculation view?
I just saw the video  HANA Academy - HANA Native Development Workshop: SQL Script Editor - YouTube for HANA Native Development workshop and got the debug functionality to work for a file Procedure.
But I am unable to call this procedure from a Calculation View.
Below is the code I am using for the SQLScript Calculation View. Can someone tell me if this is correct?
/********* Begin Procedure Script ************/
BEGIN
call "_SYS_BIC"."test-package.RF.SalesOrders.procedures/get_sls_ordtype"(SalesDocNo => '0070004105', SalesDocTypes => ?) ;
var_out = CE_PROJECTION(:SalesDocTypes, ["SALESDOCNO" , "SALESDOCTYPE", "ORDVALUE"] );
END /********* End Procedure Script ************/

Hello,
Just provide the out parameter in the call:
Declare
  amount   number; -- OUT number argument populated by the procedure
Begin
  -- call the X procedure --
  x( amount ) ;
End;Francois

Similar Messages

  • Calling a procedure from Oracle Forms with OUT parameter

    HI,
    Can anyone tell me in detail how to call a procedure with OUT parameters from Oracle Forms 6i ?
    Thanks in advance.

    Hello,
    Just provide the out parameter in the call:
    Declare
      amount   number; -- OUT number argument populated by the procedure
    Begin
      -- call the X procedure --
      x( amount ) ;
    End;Francois

  • How to Rap a Stored Procedure in Calculation View

    Please suggest/guide with step by step how to rap a stored procedure in calculation view, which latter I can use to call from odata service.
    I have one input parameter PRDID
    Table: Product
    PRDID
    PRDTYPE
    PRDCAT
    QTY
    PRICE
    MMT1
    OP
    BOOKS
    1
    12
    MMT2
    OP
    BAG
    2
    32
    MMT3
    OP
    PEN
    3
    12
    MMT4
    OP
    NOTEPAD
    6
    12
    MMT5
    OP
    MOUSE
    6
    36
    MMT6
    OP
    HANDBAG
    1
    22
    CREATE PROCEDURE <yourschema>."Product" (INOUT prd VARCHAR(10)) LANGUAGE SQLSCRIPT AS
    BEGIN
    select "PRDID", "PRDTYPE","PRDCAT","PRICE"
       from <yourschema>."Product"
       where "PRDID" = :prd;
    END;
    Thanks

    Hi Deere,
    Check this post, we already discussed the same.
    http://scn.sap.com/thread/3528968
    Step 1 : Create a calculation view in script mode.
    Step 2 : Create your output structure(as same as the procedure output structure)
    Step 3 : Call the procedure inside the script .
    Step 4: Map the fields to the output variable.
    Step 5: Map the input variables to the procedure input(if needed)
    Exposing :
    Step 5 :  In the xsodata file, you can consume as usual .
    Sreehari

  • Hierarchy on HANA Calculation View with Optional Input Parameters Fails

    Hi,
    Has anyone succeeded in building a hierarchy on top of a calculation view with optional input parameters, where an input parameter is not filled?
    The original requirement came from the wish to create a parent child hierarchy on a calculation view that was copied into the customer space from a HANA Live Financial Statement query view, but I have found the following when creating a simple level hierarchy on a calculation view that consumes one table. The Calculation View has one Input Parameter where the 'mandatory' box is unchecked.
    Calculation view reads ECC table FAGLFLEXT
    Simple level based hierarchy on fields PRCTR, RACCT and SEGMENT
    Input parameter is used as a filter for PRCTR with logic ("EMPTY" = '$$P_PROFITCTR$$' or "PRCTR" = '$$P_PROFITCTR$$')
    When I run the view I see the following behaviour in HANA Studio and Analysis for Excel
    Before building the hierarchy I could run the view with or without the Input Parameter
    After building the hierarchy I can run the view with the Input Parameter filled, but it fails when the Input Parameter is not filled.
    Error message is "error: search table error:  [2426] missing placeholder; missing value for mandatory parameter P_PROFITCTR"
    P_PROFITCTR is not a mandatory parameter, but the selection for the hierarchy view thinks it should be. I don't find any notes around this issue, so I don't think it's version related, however the version I have used for this test is 1.00.70.
    It's a shame we can't currently build the hierarchy as the parent child relationship is provided in HANA Live view NewGLFinancialStatementQuery.
    Thanks,
    Ken

    Hi Ken,
    We have been facing similar issue. We have even tried to set default value and as optional parameter. View still fails to create hierarchy (we are not using HANA live). As mentioned on page 97 of HANA modelling guide input parameter is mandatory from engine point of view. Hierarchy is generated as column view during the initial activation of calculation view and therefore expect a value by caller.
    This seems to be a product error. Some one from HANA development team should explain this issue in detail. I would expect someone like Thomas Jung reply to us.
    At the moment, we cant use input parameter for date prompt which gives us calendar popup feature for date selection. Hierarchies just don't work with input parameter. We are missing something.
    Regards
    Angad

  • Calling Stored Procedure from Oracle DataBase using Sender JDBC (JDBC-JMS)

    Hi All,
    We have requirement to move the data from Database to Queue (Interface Flow: JDBC -> JMS).
    Database is Oracle.
    *Based on Event, data will be triggered into two tables: XX & YY. This event occurs twice daily.
    Take one field: 'aa' in XX and compare it with the field: 'pp' in YY.
    If both are equal, then
         if the field: 'qq' in YY table equals to "Add" then take the data from the view table: 'Add_View'.
         else  if the field: 'qq' in YY table equals to "Modify"  then take the data from the view table: 'Modify_View'.
    Finally, We need to archive the selected data from the respective view table.*
    From each table, data will come differently, means with different field names.
    I thought of call Stored Procedure from Sender JDBC Adapter for the above requirement.
    But I heard that, we cannot call stored procedure in Oracle through Sender JDBC as it returns Cursor instead of ResultSet.
    Is there any way other than Stored Procedure?
    How to handle Data Types as data is coming from two different tables?
    Can we create one data type for two tables?
    Is BPM required for this to collect data from two different tables?
    Can somebody guide me on how to handle this?
    Waiting eagerly for help which will be rewarded.
    Thanks and Regards,
    Jyothirmayi.

    Hi Gopal,
    Thank you for your reply.
    >Is there any way other than Stored Procedure?
    Can you try configuring sender adapter to poll the data in intervals. You can configure Automatic TIme planning (ATP) in the sender jdbc channel.
    I need to select the data from different tables based on some conditions. Let me simplify that.
    Suppose Table1 contains 'n' no of rows. For each row, I need to test two conditions where only one condition will be satisfied. If 1st condition is satisfied, then data needs to be taken from Table2 else data needs to be taken from Table3.
    How can we meet this by configuring sender adapter with ATP?
    ================================================================================================
    >How to handle Data Types as data is coming from two different tables?
    If you use join query in the select statement field of the channel then whatever you need select fields will be returned. This might be fields of two tables. your datatype fields are combination of two diff table.
    we need to take data only from one table at a time. It is not join of two tables.
    ================================================================================================
    Thanks,
    Jyothirmayi.

  • Urgent! Call stored procedure from jdbc vs. call from sqlplus?

    Hello I met a strange problem when using JDBC (to Oracle). I have a stored procedure mypack.myproc, which updates a table (only one row and one column in the table). I found that when I called the procedure directly from sql*plus, like:
    ==========
    BEGIN
    mypack.myproc;
    END;
    ==========
    the value is 2, which is correct.
    However, if I call the procedure from with in java via jdbc, the value become 591 (which is ridiculous), the jdbc call looks like:
    ================
    cstmt = con.prepareCall("{call mypack.myproc}");
    cstmt.executeUpdate();
    con.commit();
    ================
    This is really wield, Any idea?
    Thanks

    Hey buddy, it's you again. Just let you know that you are right. The problem is caused by mis-match between jdbc date and oracle date (that procedure is used to do some date calculation). My co-worker suggested me to add this statement in the procedure, and it did solved problem:
    ================
    DBMS_SESSION.SET_NLS( 'NLS_DATE_FORMAT', '''DD-MON-RRRR''' );
    ================

  • Error while calling a procedure from ESB

    Hi,
    I am calling a procedure from ESB using DB adapter. and in the routing rules i am mapping the i/p values for schema to procedure input variables using mappings(transformation) but the values are going as null to the procedure call.
    Please help me out.
    The exception follows...
    An unhandled exception has been thrown in the ESB system. The exception reported is: "org.collaxa.thirdparty.apache.wsif.WSIFException: esb:///ESB_Projects/ESB-Issues_issue3/db3.wsdl [ db3_ptt::db3(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'db3' failed due to: Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the SYSTEM.INSERT_ISSUE_PROC API. Cause: java.sql.SQLException: ORA-01400: cannot insert NULL into ("SYSTEM"."ISSUES"."ISSUE_NAME")
    ORA-06512: at "SYSTEM.INSERT_ISSUE_PROC", line 16
    ORA-06512: at line 1
    [Caused by: ORA-01400: cannot insert NULL into ("SYSTEM"."ISSUES"."ISSUE_NAME")
    ORA-06512: at "SYSTEM.INSERT_ISSUE_PROC", line 16                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    This is likely being caused by a problem that we've seen a number of times. You'll have namespace issues and problems with NULLs if your JDev is 10.1.3.1 and SOA is 10.1.3.3 (or vice-versa). You MUST synchronize JDev 10.1.3.3 (or higher) with SOA 10.1.3.3 (or higher). It doesn't matter if you mix 10.1.3.3 and 10.1.3.4. You just need to get away from 10.1.3.1.

  • Error when calling a procedure from my apex application

    Hello.
    I want to create a small APEX application that can configure asynchronous change data capture (distributed hotlog) on certain tables.
    Basically, what the application should do is to simply create change tables. Everything else is set up as prerequisite.
    My problem is that when I run the following script from schema apex_cdd (using sqldeveloper) , it works; but if I run it from my apex application by calling it when pressing a button as a pl/sql process, it doen't work.
    BEGIN
    apex_cdc.enable_table_capture
         (     i_owner => 'staging_cdcpub',
              i_change_table_name     => 'g_changeTable',
              i_change_set_name     => 'Source_changeSet',
              i_change_source          => 'orcl01_cs',
              i_source_schema          => 'My_src',
              i_source_table          => 'G',
              i_column_type_list     => 'STARTDATE DATE,STATUS CHAR(1),NAME VARCHAR2(10),ENDDATE DATE,DESCRIPTION VARCHAR2(255),ID NUMBER(8,0),VALUE NUMBER(10,2)'
    END;
    If I look in the trace file, i see that the error is:
    CDCdebug:in ChangeTable.java enableDisabledTriggers: ORA-06550: line 1, column 8:
    PLS-00201: identifier 'SYS.DBMS_CDC_SYS_IPUBLISH' must be declared
    ORA-06550: line 1, column 8:
    PL/SQL: Statement ignored
    oracle.jdbc.driver.OracleSQLException: ORA-06550: line 1, column 8:
    PLS-00201: identifier 'SYS.DBMS_CDC_SYS_IPUBLISH' must be declared
    ORA-06550: line 1, column 8:
    PL/SQL: Statement ignored
    Other remarks:
    - My procedure calls: sys.DBMS_CDC_PUBLISH.CREATE_CHANGE_TABLE.
    - I gave the same rights that I gave for apex_cdc schema to flows_030200 and APEX_PUBLIC_USER schemas (just to see if it works), but it doens't.
    Is APEX calling the procedure from another schema ?
    Does anyone has an idea why this procedure crashes if called from APEX application, but works ok if called from the same schema APEX application runs on, but using SQLDeveloper ?
    Any thoughts are appreciated.
    Radian

    The procedure apex_cdc.enable_table_capture i created myself with no authid mentioned explicitly, so it uses definer rights, by default.
    BUt this procedure is simply a wrapper for sys.dbms_cdc_publish.create_change_table.
    When I look on the security model for this sys.dbms_cdc_publish, i see it runs under invoker rights. (http://www.psoug.org/reference/dbms_cdc_publish.html).
    The code is like this:
    CREATE OR REPLACE PROCEDURE enable_table_capture
              i_owner               IN VARCHAR2,
              i_change_table_name     IN VARCHAR2,
              i_change_set_name     IN VARCHAR2,
              i_change_source          IN VARCHAR2,
              i_source_schema          IN VARCHAR2,
              i_source_table          IN VARCHAR2,
              i_column_type_list     IN VARCHAR2
         IS
         BEGIN
              EXECUTE IMMEDIATE 'alter session set REMOTE_DEPENDENCIES_MODE=SIGNATURE';
              EXECUTE IMMEDIATE 'begin add_log@orcl01(i_tableName => ''G''); end;';
    sys.DBMS_CDC_PUBLISH.CREATE_CHANGE_TABLE(
    owner => i_owner,
    change_table_name => i_change_table_name,
    change_set_name => i_change_set_name,
    source_schema => i_source_schema,
    source_table => i_source_table,
    column_type_list => i_column_type_list,
    capture_values => 'both',
    rs_id => 'y',
    row_id => 'n',
    user_id => 'n',
    timestamp => 'y',
    object_id => 'n',
    source_colmap => 'n',
    target_colmap => 'y',
    options_string => NULL);
    END enable_table_capture;

  • Calling a procedure from Javascript

    Hello
    I have created a procedure with two input paprameters.
    I have gratted access to public ... and all works well
    I would now like to call this from a Javascript where I supply the input paameters. The procedure has a redirect to another URL so there is no output
    Currently I used "window.location" with the prodcedure URL ... I must beable to call the produced directly?
    Thanks for taking the time to look at this request
    Regards
    Pete

    Pete,
    Have a look at this thread:
    How to call stored procedure from javascript? (about Google Suggest, AJAX)
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen
    http://sourceforge.net/projects/plrecur
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • Calling a procedure from an OAF page through a button in the screen

    problem: calling a procedure from an OAF page through a button in the screen

    CREATE OR REPLACE procedure APPS.xx_delete_dept_prc(p_id in number)
    as
    begin
    delete from xx_training_dept_tbl where td_dept_id=p_id;
    commit;
    end;
    2.     create image button for delete
    3.     set the following property to this button:
    action type : fire action
    event :DeleteDept
    parameter :
    name: DEptIdParam value: ${oa.XxTrainingDeptVO1.TdDeptId}
    4.     create Co and writing the following code on process form request
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    String actionInscreen=pageContext.getParameter(EVENT_PARAM);
    if ("deleteDept".equals(actionInscreen))
    String deptidparam=pageContext.getParameter("DeptIdParam");
    Serializable [] s={deptidparam};
    Class [] c={deptidparam.getClass()};
    OAApplicationModule am=pageContext.getApplicationModule(webBean);
    am.invokeMethod("deleteDept",s,c);
    throw new OAException("delete completed",OAException.INFORMATION);
    5.     create AM and writing the following code
    public void deleteDept(String deptid) {
    XxTrainingDeptVOImpl deptview= getXxTrainingDeptVO1();
    deptview.deleteDept(deptid); }
    6.create VO and writing the following code in view object class
    public void deleteDept(String deptid
    System.out.println("Dept ID =" +deptid);
    String s = "call xx_delete_dept_prc(:1)"; // :1 is the number of parameter to pass it to procedure
    CallableStatement cs =trx.createCallableStatement(s,1); // 1 number of record to fetch but delete always delete 1 row
    try
    cs.setString(1,deptid); // the name of the first parameter
    cs.execute();
    cs.close();
    catch (SQLException e)
    e.printStackTrace();
    }

  • Calling a Procedure from a Button? (REVISITED)

    Hi All,
    I once asked a question Re: Calling a Procedure from a Button? & that problem was resolved when i was working on the online ApEx.
    On my application, requirements have changed a bit: I have one form based on two tables. One table contributes two fields (name & surname) to the form while the remaining fields are contributed by another table to make a total of 17 fields on the form.
    My process is in such a way that a user enters an id number & clicks Search button, if the apllicant exists then both name & surname corresponding with the id number will be retrieved from the database. If the applicant does not exist then an error message will be displayed inline with the id number field. Here's the PL/SQL anonymous block to that:
    DECLARE
    vNAME APPLICANTS.name%TYPE;
    vSURNAME APPLICANTS.surname%TYPE;
    BEGIN
    SELECT count(*)
    INTO :P2_COUNT
    FROM applicants
    WHERE id_number = :P2_ID_NUMBER;
    IF :P2_COUNT > 0 THEN
    SELECT name,surname
    INTO vNAME, vSURNAME
    FROM applicants
    WHERE id_number = :P2_ID_NUMBER;
    :P2_NAME := vNAME;
    :P2_SURNAME := vSURNAME;
    ELSE
    apex_application.g_print_success_message := '<span style="color:red">Applicant does not exist.</span>';
    END IF;
    EXCEPTION WHEN NO_DATA_FOUND THEN
    apex_application.g_print_success_message := '<span style="color:red">Exception Caught.</span>';
    END;The PL/SQL block works except for error displaying part (but that's a problem for another day).
    NB: On my application, there’s already Automated Row Fetch & Automatic Row Processing (DML) processes for one table. Furthermore, there is also a javascript for verifying the validity of an id number. As a result, I decided to include Automated Row Fetch & Automatic Row Processing (DML) processes for the other table. When I click a Search button the javascript is activated even though I did not specify a URL target for the button - because this is a simple button among region items – it does not have Optional Url Redirect section.
    I'm not sure what I'm doing wrong here - any help is appreciated.
    Regards
    Kamo

    Hi Dan,
    Sorry for causing confusion with my post - it's just that I was asking the same question (with different constraints) as I had asked before so I didn't feel like going to details was necessary because in my post I included a link to the previous thread. Interestingly, I was working on apex.oracle.com when I posted the original thread - the only problem came to be when I started to move the solution to my application on my machine.
    Anyway, thanks for the response!
    Regards
    Kamo

  • Curious thing while calling a procedure from Java !...

    Hi !. My name is Agustin and my doubt would be the following one... I am working for a e-business comp and they asked me to call a procedure from java... The code is the following one:
    CallableStatement cs = null;
    System.out.println("Fecha Nro. 1: " + paramFechaDesde);
    System.out.println("Fecha Nro. 2: " + paramFechaHasta);
    try
    cs = getDBTransaction().createCallableStatement("{call paq_w_ListadoSiniestralidadART. p_sinsiniest(?,?,?,?) }",0);
    cs.registerOutParameter(4,OracleTypes.VARCHAR);
    cs.setInt(1,paramContrato.intValue());
    cs.setString(2,paramFechaDesde);
    cs.setString(3,paramFechaHasta);
    cs.setString(4,paramNombreArchivo);
    cs.executeQuery();
    String nomArchivo = cs.getString(4);
    System.out.println("### " + nomArchivo +" ###");
    catch(SQLException e)
    The weird thing is that, I was expecting a big big exception but the only thing I got is
    ### Error ###
    The String I am expecting is a file's name !; so I am a little bit confused...
    Also I didn't know where to post so If it's in the wrong category... I apologize !... If anyone need more details, I'll be checking out... The account I am working on is an Insurance company, who is the one who provide access to the DB and the procedures... So I can't check what's inside...

    Please provide your Java and OS versions, the JDBC jar file and the Oracle DB version being used when you post.
    >
    I was expecting a big big exception
    >
    Then why do you have an empty exception block? That just makes it disappear so you won't see one if it happens.
    And your code has
    cs.registerOutParameter(4,OracleTypes.VARCHAR);
    cs.setString(4,paramNombreArchivo);You use 'registerOutParameter' for an OUT parameter and the 'setXXX' methods for other parameters.
    Remove the 'setSTring' for the OUT parameter.
    Then as malcollmmc already said
    >
    Sounds like the PL/SQL is returning "Error" as the 4th parameter of the call
    >
    The actual value returned by PL/SQL is strictly determined by the PL/SQL code and Java and JDBC are not involved.
    Fix the code problems, retest, and folllowup with whoever wrote the code if it still returns ERROR.

  • How to use @jws:sql call Stored Procedure from Workshop

    Is there anyone know how to use @jws tag call Sybase stored procedure within
    Workshop,
    Thanks,

    Anurag,
    Do you know is there any plan to add this feature in future release? and
    when?
    Thanks,
    David
    "Anurag Pareek" <[email protected]> wrote in message
    news:[email protected]..
    David,
    In the current release, we do not support calling stored procedures from a
    database control. You will have to write JDBC code in the JWS file to call
    stored procedures.
    Regards,
    Anurag
    Workshop Support
    "David Yuan" <[email protected]> wrote in message
    news:[email protected]..
    Anurag,
    I know how to use DB connection pool and create a db control with it. In
    fact, we have created a Web Service with the db control using plain SQL
    in
    @jws:sql. However, my question here is how to use @jws tag in Weblogic
    Workshop to create a Web Services based on Sybase stored procedure orany
    Stored Proc not plain SQL.
    Thanks,
    David
    "Anurag Pareek" <[email protected]> wrote in message
    news:[email protected]..
    David,
    You can use a database control to obtain a connection from any JDBC
    Connection Pool configured in the config.xml file. The JDBC Connectionpool
    could be connecting to any database, the database control is
    independent
    of
    that.
    Regards,
    Anurag
    Workshop Support
    "David Yuan" <[email protected]> wrote in message
    news:[email protected]..
    Is there anyone know how to use @jws tag call Sybase stored
    procedure
    within
    Workshop,
    Thanks,

  • 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

  • Can't call a procedure from a PLSQL Library inside forms 10g

    Hello,
    I build a plsql library using forms builder, then I compile it and add to FORMS_PATH.
    I try to use a procedure from that lib so i attached the library to form (without path), then in then WHEN-BUTTON-PRESSED event I call one procedure from that library and i get this message :
    error 201 at line 6 , column 2
    identifier 'LIST_ADD_ALL' must be declared
    ---- MY CODE compiled ok with out errors i've got pll and plx
    declare
         START_LIST_ID ITEM := FIND_ITEM('LIST16');
         END_LIST_ID ITEM := FIND_ITEM('ITEM18');
    begin
         LIST_ADD_ALL(START_LIST_ID, END_LIST_ID);
    end ;
    I dont know if to put some kind of public declaration.
    can anyone help me please.

    In that case, use a batch file to start Form Builder to control your environment settings. The batch file ( e.g. FormsBuilder.bat ) should look roughly like this:
    set oracle_home=C:\Oracle\Dev10g
    set forms=%oracle_home%\forms
    set nls_lang=AMERICAN_AMERICA.WE8MSWIN1252
    set tns_admin=c:\oracle\admin
    set ca_uprefs=c:\data\oracle\10g\uprefs
    set path=%oracle_home%\bin;%path%
    set forms_path=c:\data
    set oratemp=c:\temp
    start frmbld.exe

Maybe you are looking for