Cursor like input parameter in function

Hi, All !
I have a question. I want use cursor like input parameter in function. How can I do this? Please give my an example.

in fact i have a loop over a cursor :
LOOP
tmp_var:=0;
FETCH contrat_cursor INTO contrat_rec;
          EXIT WHEN contrat_cursor%NOTFOUND;
treatment1 -- i want to put all this trt1 in a function , and the function , since it depend on contrat_rec, will have a parameter
end loop;
in other context i need this function to make some trt in one row of the table contrat
so i can get this row with select * from contrat where ...
my question, is this ok when i give contrat_cursor%ROWTYPE as parameter to the function
and in the second context, when i get back i row from table contrat , how can i give this row as paramer , in contrat_cursor%ROWTYPE form
i wish it was clear
Regards
Elyes

Similar Messages

  • Ref Cursor as input parameter

    Is it possible to pass a ref cursor from java as an input parameter to a stored procedure, which the procedure can then process?
    (Passing Ref Cursors as output parameters from a stored procedure to a result set works fine.)

    You may want to try passing Arrays to the Stored Procedure. Use Oracle.SQL.ARRAY and then in the stored procedure get the array.

  • Use of input parameter of function module

    Hi,
    we implemented an enhancement of a function module with a new inputparameter.
    Now we would like to do some follow-up to see if our developers are starting to use this new parameter.
    Is there a way to find this out? We can do a program scan on the name of this new parameter, but this does not seem to be enough.
    Thanks for the advice.
    Kris

    Hi Kris,
    as described, you can do a where-used-list and expand the nodes.
    This will not cover any dynamic calls.
    If you want to know the real use of the new parameter, then you can implement a LOG-POINT in the function module, like
    FUNCTION xyz.
    IF NEW_PARAMETER IS SUPPLIED.
      LOG-POINT ID YOUR_LOG_POINT FIELDS sy-uname sy-uzeit sy-cprog NEW_PARAMETER.
    ENDIF.
    You can create, activate and evaluate LOG-POINTS with transaction SAAB. It is extremely helpful for a lot of analyzing purposes as you can switch logging on and off for users and servers on the fly. If you know what you want to know you can leave the log-points in the program code and just deactivate logging.
    Regards,
    Clemens

  • How can I pass Recordsets as input parameter to a Function ?

    Hi Gurus,
    I want to create a function that receive recordsets as input parameter also returns recordsets as output.
    I have a requirement to do stock taking for all order items of one Order number in one single query execution (to avoid row by row basis).
    From the post in the forum I know that a function can return recordsets / query result using REF CURSOR or pipelined table function.
    My question is : how to pass the recordsets as input parameter to that function ?
    (because I could have 75 rows item in one order number)
    Below is the DDL and the query :
    create table stocks (Product char(4), Warehouse char(5), expireddate date, qty_available number)
    insert into stocks values('P001', 'WH001', '01-dec-2006', 30)
    insert into stocks values('P001', 'WH002', '01-dec-2006', 50)
    insert into stocks values('P001', 'WH002', '01-jan-2007', 50 )
    insert into stocks values('P001', 'WH001', '01-Mar-2007', 150)
    insert into stocks values('P002', 'WH003', '01-dec-2006', 25)
    insert into stocks values('P002', 'WH003', '15-Jan-2007', 50)
    insert into stocks values('P002', 'WH003', '01-Mar-2007', 75)
    insert into stocks values('P003', 'WH001', '01-dec-2006', 30)
    insert into stocks values('P003', 'WH002', '15-Jan-2007', 40)
    insert into stocks values('P003', 'WH003', '01-Mar-2007', 50)
    CREATE TABLE Order_Detail (PRODUCT_ORD CHAR(4), QTY_ORD number, Priority_WH CHAR(5) )
    INSERT INTO Order_Detail VALUES ('P001', 75, 'WH003') // previously 'WH002'
    INSERT INTO Order_Detail VALUES ('P002', 45, 'WH002')
    INSERT INTO Order_Detail VALUES ('P003', 55, NULL)
    The query for stock taking :
    select product,warehouse,expireddate, least(qty_available-(sm - qty_ord),qty_available) qty
    from ( select product,warehouse,expireddate,qty_available,qty_ord, sum(qty_available) over(partition by product order by s.product,expireddate,decode(warehouse,priority_wh,0,1),warehouse ) sm
    from stocks s,order_detail o
    where s.product = o.product_ord order by s.product,expireddate,decode(warehouse,priority_wh,0,1) )
    where (sm - qty_ord) < qty_available

    Hi,
    This my requirement :
    I have (simplified)Order_Detail as below :
    CREATE TABLE Order_Detail (PRODUCT_ORD CHAR(4), QTY_ORD number, Priority_WH CHAR(5) )
    INSERT INTO Order_Detail VALUES ('P001', 75, 'WH003') // previously 'WH002'
    INSERT INTO Order_Detail VALUES ('P002', 45, 'WH002')
    INSERT INTO Order_Detail VALUES ('P003', 55, NULL)
    Then I want to do stock taking from my STOCK table (described on my first post on this thread)
    create table stocks (Product char(4), Warehouse char(5), expireddate date, qty_available number)
    The rule is : The stok taking is on First In First Out basis, on expireddate.
    And I want to do it in single query.
    I want to make this a Function / Stored Procedure so that other transaction can also make use of this query.
    That is why I need to pass the 3 rows oy mr Order_Detail above, do the query, and return the result.
    Then INSERT the result into ORDER_DETAIL_PER_EXPIRED_DATE table.
    I hope this clear my requirement, is this possible ?
    Thank you,
    xtanto

  • Pass multiple values as single input parameter into pipelined function

    Hi all,
    My need is to pass multiple values as single input parameter into pipelined function.
    For example - "2" and "3" are values of input parameter "t":
    with data as (
    select 1 as t from dual union all
    select 2 as t from dual union all
    select 3 as t from dual union all
    select 4 as t from dual union all
    select 5 as t from dual
    select * from data where t in (2,3)Is it possible at all?

    Not exactly sure, but usually 'multiple values'+'pipelined function' = some IN-LIST related approach?
    See:
    SQL> create table data as
      2  select 1 as t from dual union all
      3  select 2 as t from dual union all
      4  select 3 as t from dual union all
      5  select 4 as t from dual union all
      6  select 5 as t from dual;
    Table created.
    SQL> --
    SQL> CREATE OR REPLACE FUNCTION in_list (p_in_list  IN  VARCHAR2)
      2  RETURN sys.odcivarchar2list PIPELINED
      3  AS
      4    l_text  VARCHAR2(32767) := p_in_list || ',';
      5    l_idx   NUMBER;
      6  BEGIN
      7    LOOP
      8      l_idx := INSTR(l_text, ',');
      9      EXIT WHEN NVL(l_idx, 0) = 0;
    10      PIPE ROW (TRIM(SUBSTR(l_text, 1, l_idx - 1)));
    11      l_text := SUBSTR(l_text, l_idx + 1);
    12    END LOOP;
    13 
    14    RETURN;
    15  END;
    16  /
    Function created.
    SQL> --
    SQL> select *
      2  from   data
      3  where  t in ( select *
      4                from   table(in_list('1,2'))
      5              );
             T
             1
             2
    2 rows selected.http://www.oracle-base.com/articles/misc/dynamic-in-lists.php
    or
    http://tkyte.blogspot.nl/2006/06/varying-in-lists.html

  • Two resistances value depend on one input parameter(like parameters in Pspice)

    I would like to have resistances in hierarchical block, which's value has to be changed without entering into hierarchical schematics. Or even two/more resistors who's values will depends on single input parameter(like PARAMETERS option in Orcad/Pspice).

    Hello,
    Something very simple which you can use to change capacitance, resistance, and inductance is have a voltage(or current) controlled resistor/inductor/capacitor. Passing a voltage thourgh the blocks will change these variable loads as you wish (you can set it anything like 12.5kohms per Volt for example). You can find these components under Basic-Virtual in the Basic Group. Hope this helps.
    Kind Regards,
    Miguel V
    National Instruments

  • So many Input parameter in stored procedure..how to handle it ?

    Hello,
    I have one stored procedure.in that,there is around *600 input parameter*.now I am writing one by one input parameter and this is looking very time consuming for me.is there any other method to solve it.can we use Ref cursor or any thing else...??if yes,then please explain me with one example....I have no so much idea about ref cursor.
    Thanks

    It would be pretty stupid, in any language, to define a method/procedure/function that has a 600 parameter signature.
    There are a number of ways to address this - correctly. And these have already been suggested:
    - define proper data structures for these parameters
    - use arrays
    As for how to address this in PL/SQL, depends entirely on how the call interface from the client looks like and is capable of.
    For example, if this is from a web page and the call is made via mod_plsql, the flexible 2 parameter call interface should be used. The procedure will have 2 parameters. The caller will pass name-values. The 1st array will contain the names (e.g. 600 names). The 2nd array will contain the values (e.g. 600 values).
    If the caller is a Java for example, then advance user define/custom SQL types can be defined in Oracle, used and populated in Java, and then pass to PL/SQL.
    Let's say the caller is pretty dumb and does not support the object features in the OCI (OCI = the Oracle client driver call interface used by the client).
    In that case you do not want a 600 parameter procedure.. but you still need to get the data into that Oracle server session in order to execute PL/SQL code in that session to crunch that data. A flexible and scalable solution would be to define a GTT - a global temp table (done once off up front in that schema). This allows the client to insert rows in that temp table that can be seen by that session's PL/SQL code only. For performance, the client can create a standard client array for the 600 parameters and call the SQL insert using array binding.
    This results in a single insert call to Oracle. Accompanied with 600 values. Oracle executes that insert 600 times. You know have 600 rows in the GTT and the next client call to Oracle instructs the PL/SQL procedure to process the contents of the GTT.

  • How to log input parameters for Function Modules?

    Hi,
    I need to create a Logging system to trace input parameters for function modules.
    The log functionality could be done by developing a class method or a function module (For example 'write_log'), and calling it within each function module that I want to log. The 'write_log' code should be independent from the interface of the Function Module that I want to log.
    For example, I'd like to write a function/class method that can log both these functions modules:
    Function DummyA
       Input parameters: A1 type char10, A2 type char10.
    Function DummyB
       Input parameters: B1 type char20, B2 type char20, B3 type char20, B4 type Z_MYSTRUCTURE
    Now the questions...
    - Is there a "standard SAP" function that provide this functionality?
    - If not, is there a system variable in which I can access runtime all parameters name, type and value for a particular function module?
    - If not, how can I loop at Input parameters in a way that is independent from the function module interface?
    Thank you in advance for helping!

    check this sample code. here i am capturing only parameters (import) values. you can extend this to capture tables, changin, etc.
    FUNCTION y_test_fm.
    *"*"Local Interface:
    *"  IMPORTING
    *"     REFERENCE(PARAM1) TYPE  CHAR10
    *"     REFERENCE(PARAM2) TYPE  CHAR10
    *"     REFERENCE(PARAM3) TYPE  CHAR10
      DATA: ep TYPE STANDARD TABLE OF rsexp ,
            ip TYPE STANDARD TABLE OF rsimp ,
            tp TYPE STANDARD TABLE OF rstbl ,
            el TYPE STANDARD TABLE OF rsexc ,
            vals TYPE tihttpnvp ,
            wa_vals TYPE ihttpnvp ,
            wa_ip TYPE rsimp .
      FIELD-SYMBOLS: <temp> TYPE ANY .
      CALL FUNCTION 'FUNCTION_IMPORT_INTERFACE'
        EXPORTING
          funcname                 = 'Y_TEST_FM'
    *   INACTIVE_VERSION         = ' '
    *   WITH_ENHANCEMENTS        = 'X'
    *   IGNORE_SWITCHES          = ' '
    * IMPORTING
    *   GLOBAL_FLAG              =
    *   REMOTE_CALL              =
    *   UPDATE_TASK              =
    *   EXCEPTION_CLASSES        =
        TABLES
          exception_list           = el
          export_parameter         = ep
          import_parameter         = ip
    *   CHANGING_PARAMETER       =
          tables_parameter         = tp
    *   P_DOCU                   =
    *   ENHA_EXP_PARAMETER       =
    *   ENHA_IMP_PARAMETER       =
    *   ENHA_CHA_PARAMETER       =
    *   ENHA_TBL_PARAMETER       =
    *   ENHA_DOCU                =
       EXCEPTIONS
         error_message            = 1
         function_not_found       = 2
         invalid_name             = 3
         OTHERS                   = 4
      IF sy-subrc = 0.
        LOOP AT ip INTO wa_ip .
          MOVE: wa_ip-parameter TO wa_vals-name .
          ASSIGN (wa_vals-name) TO <temp> .
          IF <temp> IS ASSIGNED .
            wa_vals-value = <temp> .
          ENDIF .
          APPEND wa_vals TO vals .
        ENDLOOP .
      ENDIF.
    ENDFUNCTION.

  • How Insert the input parameter to database through Java Bean

    Hello To All..
    I want to store the input parameter through Standard Action <jsp:useBean>.
    jsp:useBean call a property IssueData. this property exist in
    SimpleBean which create a connection from DB and insert the data.
    At run time when I click on submit button servlet and server also show that loggging are saved in DB.
    But when I open the table in Access. Its empty.
    Ms-Access have two fields- User, Pass both are text type.
    Please review these code:
    login.html:
    <html>
    <head>
    <title>A simple JSP application</title>
    <script language=javascript>
    function f(k)
    document.forms['frm'].mykey.value=k;
    document.forms['frm'].submit();
    </script>
    <head>
    <body>
    <form method="get" action="tmp" name="frm">
    Name: <input type="text" name="User">
    Password: <input type="password" name="Pass">
    <input type=hidden name="mykey" value="">
    <input type="button" value="Submit" onclick="f('submit.jsp')">
    <input type="button" value="Issue" onclick="f('issue.jsp')">
    </form>
    </body>
    </html>LoginServlet.java:import javax.servlet.*;
    import javax.servlet.http.*;
    public class LoginServlet extends HttpServlet{
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException{
    try
    String User=request.getParameter("User");
    String Pass=request.getParameter("Pass");
    co.SimpleBean st = new co.SimpleBean();
    st.setUser(User);
    st.setPass(Pass);
    request.setAttribute("User",st);
    request.setAttribute("Pass",st);
    RequestDispatcher dispatcher1 =request.getRequestDispatcher("/"+request.getParameter("mykey"));
    dispatcher1.forward(request,response);
    catch(Exception e)
    e.printStackTrace();
    }SimpleBean.java:package co;
    import java.util.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.util.*;
    public class SimpleBean
    private String User="";
    private String Pass="";
    private String s="";
    public SimpleBean(){}
    public String getUser() {
    return User;
    public void setUser(String User) {
    this.User = User;
    public String getPass() {
    return Pass;
    public void setPass(String Pass) {
    this.Pass = Pass;
    public String getissueData() //method that create connection with database
    try
    System.out.println("Printed*************************************************************");
    getUser();
    getPass();
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    System.out.println("Loading....");
    Connection con=DriverManager.getConnection("jdbc:odbc:simple");
    System.out.println("Connected....");
    PreparedStatement st=con.prepareStatement("insert into Table1 values(?,?)");
    System.out.println("~~~~~~~~~~~~~~~~~~~~");
    String User=getUser();
    st.setString(1,User);
    String Pass=getPass();
    st.setString(2,Pass);
    int y= st.executeUpdate();
    System.out.println(y);
    System.out.println("Query Executed");
    con.commit();
    con.close();
    s=  "Your logging is saved in DB ";
    System.out.println("Your logging is saved in DB *****************");
    return this.s;
    catch(Exception e)
    e.printStackTrace();
    return "failed";
    }submit.jsp:
    This is Submit page
    <html><body>
    Hello
    Student Name: <%= ((co.SimpleBean)request.getAttribute("User")).getUser() %>
    <br>
    Password: <%= ((co.SimpleBean)request.getAttribute("Pass")).getPass() %>
    <br>
    <jsp:useBean id="st" class="co.SimpleBean" scope="request"/>
    <jsp:setProperty name="st" property="User" value="request.getParamaeter("Pass")"/>
            <jsp:setProperty name="st" property="Pass" value="request.getParamaeter("Pass")"/>
       <jsp:getProperty name="st" property="issueData"/>
    <% st.getissueData(); %>
    </body></html>web.xml:<web-app>
    <servlet>
    <servlet-name>one</servlet-name>
    <servlet-class>LoginServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>one</servlet-name>
    <url-pattern>/tmp</url-pattern>
    </servlet-mapping>
    <jsp-file>issue.jsp</jsp-file>
    <jsp-file>submit.jsp</jsp-file>
    <url-pattern>*.do</url-pattern>
    <welcome-file-list>
    <welcome-file>Login.html</welcome-file>
    </welcome-file-list>
    </web-app>Please Help me..

    Dear Sir,
    Accordingly your suggestion I check the SimpleBean class putting the constant values in this bean class.That is Sucessfully Inserted constant values in database.
    Like for example..
    myfirstjavabean.java:
    package myfirstjava;
    import java.io.*;
    import java.sql.*;
    public class myfirstjavabean
    private String firstMsg="Hello world";
    private String s="";
    public myfirstjavabean()
    public String getfirstMsg()
    return firstMsg;
    public void setfirstMsg(String firstMsg)
    this.firstMsg=firstMsg;
    public String getissueData() //method that create connection with database
    try
    System.out.println("Printed*************************************************************");
    getfirstMsg();
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    System.out.println("Loading....");
    Connection con=DriverManager.getConnection("jdbc:odbc:sampleMsg");
    System.out.println("Connected....");
    PreparedStatement st=con.prepareStatement("insert into Table1 values(?)");
    System.out.println("~~~~~~~~~~~~~~~~~~~~");
    String Msg=getfirstMsg();
    st.setString(1,Msg);
    int y= st.executeUpdate();
    System.out.println(y);
    System.out.println("Query Executed");
    con.commit();
    con.close();
    s=  "Your logging is saved in DB ";
    System.out.println("Your logging is saved in DB *****************");
    return this.s;
    catch(Exception e)
    e.printStackTrace();
    return "failed";
    }Vij.jsp:
    <html>
    <body>
    <jsp:useBean id="st" class="myfirstjava.myfirstjavabean" scope="request" />
    <jsp:getProperty name="st" property="firstMsg" />
    <jsp:getProperty name="st" property="issueData" />
    </body>
    </html>These above example sucessfully inserted the Hello World message in database.
    But which value I put user input at run time Its not inserted in database.
    Which is my previous problem that is persist.
    Please Help..

  • About mapping-input-parameter operator !

    hi all:
    There is a problem,
    I deploy a mapping,the mapping have a mapping input parameter, the mapping is runing a time every day£¬and
    every day's parameter is different.
    I want to mapping input parameter of the mapping can auto get a value from some soure now.
    and the input parameter of the mapping is a "group by"
    condition at mapping!
    is this possible succed?

    Depending on what the (dynamic) source of you parameter value look like, you can either add it as a Mapping Table operator or create a simple function to use as a Pre-Mapping Process.
    Nikolai Rochik

  • Trying to get the input parameter of a web service fxn based on table value

    Hello--
    I am new to ADF and Jdev 11g (I am a forms developer). I had created a web service from a pl/sql stored db package. I can successfully execute a function with an input parameter from ADF Faces.
    Instead of the input parameter being enterable by the user, I would like it to be based on a selected ADF table column value. How would I correlate the selected row column value as the function input parameter?
    I played with an ADF output text based on the ADF table column with the PartialTriggers value set to the ADF table...which updates the output text based on the column selected. Do I use some sort of partial trigger on the input parameter?
    From a forms point of view, I am looking for the "Copy Value from Item" property :)

    Hi,
    Not sure if this would help you.
    But if your table is bound to a ViewObject, it will be easier to get the current selection.
    Supose your table is bound to iterator1.
    In your backBean code:
    DCBindingContainer dcBindings = (DCBindingContainer)getBindings();
    DCIteratorBinding iterator =dcBindings.findIteratorBinding("iterator1");
    Row row = iterator.getCurrentRow();
    Object selectedValue = row.getAttarbute(<value of the column you are looking for>);
    public BindingContainer getBindings() throws Exception {
    try {
    if (this.bindings == null) {
    FacesContext fc = FacesContext.getCurrentInstance();
    this.bindings =
    (BindingContainer)fc.getApplication().evaluateExpressionGet(fc,
    "#{bindings}",
    BindingContainer.class);
    return this.bindings;
    } catch (Exception ex) {
    displayMessage("Error occurred. Please contact your IT Adminstrator.");
    return this.bindings;
    Let me know if this helps.
    -Makrand

  • Calling PLSQL Procedure with CLOB input parameter from JDBC

    Hi..
    I've got a PLSQL procedure with a CLOB object as input parameter:
    function saveProject (xmldoc CLOB) RETURN varchar IS
    I want to call that procedure from my JDBC Application as...
    String data = "..."
    CallableStatement proc = conn.prepareCall
              ("begin ? := saveProject (?); end;");
    neither
    proc.setCharacterStream(2, new StringReader(data, data.length());
    nor
    proc.setString(2, data);
    will work.
    The Application throws java.sql.Exception: ... PLS-00306 wrong
    number or types of arguments in call 'SAVEPROJECT'
    How can I use set setClob method?
    The Problem is: with Oracles CLOB implementation I can't create
    an Instance, and from the CallableStatement a can't get a
    Locator for a CLOB-Object.
    This CLOB stuff makes me really nuts!
    please somebody help me.. thanks
    Alex

    Hi All,
    You can not make it like that.
    You can not make clob as input parameter.
    Do you want an easy way?
    This is the easy way.
    sample:
    function myFunction(S varchar2(40))
    return integer as
    begin
    insert into TableAAA values(S)
    --TableAAA only contains 1 column of clob type
    end;
    This will work the problem with this is the parameter is in
    varchar2 right? so there will be limited length for it.
    You can do this to call that function:
    nyFunction('My String that will be input into clob field');
    There's another slight difficult way, I understand that you have
    installed Oracle client/server in your system, try to look at
    jdbc folder and try to find demo.zip in that folder, you can
    find several ways of doing thing with jdbc.
    Have a nice day,
    Evan

  • Field or table alias is not allowed as an input of table functions

    Hi,
    I am trying to invoke a user defined table function through a SQL snippet like below.
    SELECT (SELECT * FROM PKG_ORG_ORG_HAS_CHILDREN(org_id)) has_child
    from PA_ORG_OWNER
    where stud_id = 'np1';
    But for some reason it will not accept column name as an IN parameter
    Could not execute 'SELECT (SELECT * FROM PKG_ORG_ORG_HAS_CHILDREN(org_id)) has_child from PA_ORG_OWNER os where ...' in 2 ms 451 µs .
    SAP DBTech JDBC: [7] (at 47): feature not supported: field or table alias is not allowed as an input of table functions: line 1 col 48 (at pos 47)
    In general our product has a LOT of small Oracle PL/SQL functions that are invoked from SQL within application code. This is a huge bottleneck while migrating to HANA. Any best practice anyone can recommend for this issue?
    -Thanks
    nphana

    Hi nphana,
    Instead of using single function, you can create another function and Invoke the function and can use IN parameter.
    Here is the example:
    CREATE FUNCTION RAJ.MY_FUNC (I_VKORG NVARCHAR (4), I_VTWEG NVARCHAR (2), 
                 I_SPART NVARCHAR (2),  I_PARVW NVARCHAR (2), I_PARZA NVARCHAR (3) )
    RETURNS TABLE (KUNNR NVARCHAR (10))
    LANGUAGE SQLSCRIPT AS
    BEGIN
      RETURN
      SELECT "ECC2HANA"."KNVP".KUNNR FROM  "ECC2HANA"."KNVP"
       WHERE "ECC2HANA"."KNVP".VKORG = :I_VKORG
         AND "ECC2HANA"."KNVP".VTWEG = :I_VTWEG
         AND "ECC2HANA"."KNVP".SPART = :I_SPART
         AND "ECC2HANA"."KNVP".PARVW = :I_PARVW
         AND "ECC2HANA"."KNVP".PARZA = :I_PARZA
    END
    SELECT * FROM RAJ.MY_FUNC('7500','10','00','AG','000');
    Result is shown below:
    Now I created another function so that I can use the result set of above function which is used as criteria for some other table.
    I not used any input parameter for second function but can be used if required.
    CREATE FUNCTION RAJ.FUNC_MY_FUNC ( )
    RETURNS TABLE (NAME1 NVARCHAR (35))
    LANGUAGE SQLSCRIPT AS
    BEGIN
    RETURN 
    SELECT "ECC2HANA"."KNA1".NAME1 FROM "ECC2HANA"."KNA1"
      WHERE "ECC2HANA"."KNA1".KUNNR IN (SELECT * FROM RAJ.MY_FUNC('7500','10','00','AG','000'));
    END;
    Result is shown below:
    Similarly you can do for your requirement.
    Regards
    Raj

  • How to get and parse xml input parameter?

    Hi,
    If one transaction input parameter is xml string, like as below.
    <a>
    <b>
        <c>1</c>
        <d>2</d>
    </b>
    <b>
        <c>3</c>
        <d>4</d>
    </b>   
    </a>
    If I would like to get each element (maybe by repeater action), how to do that?
    Thanks!

    Hi,
    You must convert the string into xml with necessary action block. (XML Functions --> String to XML Parser)
    Then you must put a repeater after converter action and you must set Xpath expression for repeater (configuration) like below:
    String_To_XML_Parser_0.Output{/ARef/BRef}
    after repeater you can use values like below:
    Repeater.Output{/BRef/c}
    Repeater.Output{/BRef/d}
    Regards.

  • What is the best way to handle input parameter

    When writing sub-vi's, what is the best way to handle input parameter range checking? On the front panel I can choose to have numeric values coerced to be within range, but this does not affect constants or controls wired to the vi when used as a sub-vi. I can build range checking into the vi, but this can result in a cluttered looking vi. Do you have any suggestions.

    As you discovered, the Range and Coercion properties of controls do not work when used in sub-vis.
    Your best option is to go ahead and build your range checking into your sub-vis. If it�s something you will be doing a lot, just make your range checking a sub-vi and drop it where needed. This will keep the clutter to a minimum. You may end up with more than one range checking VI if you need different functionality, but this will still make less clutter and easier re-use.
    Ed
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.

Maybe you are looking for