How to call pl/sql procedure/function from XML

Hi,
I have a requirement to call pl/sql function/procedure from the RTF template. How can I do this?

Hi,
I have got the same requirement. We need to call the store PL/SQL procedure from the XML template to generate the fixedwidth files. Could you tell me if you are able to call PL/SQL procedure from XML template?
Thanks,
Ram

Similar Messages

  • How to Call PL/SQL Procedure

    Hi
    I am trying to call PL/SQL Procedure in OCI but i didn't get success, Please answer,
    Thank you in advance
    null

    Here is a very short sample. Hope it helps
    char SQLStatemen[] ="BEGIN spFoo (:P_Name);END;";
    /* Initialize everything */
    OCIBindByName (CommandHandler, &OCIBindName, ErrorHandler, (text *) ":P_Name", -1, (dvoid *) Name, strlen(Name) +1, SQLT
    _STR, (dvoid *) 0,(ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT) == OCI_ERROR);
    OCIStmtExecute (ServiceContext, CommandHandler,ErrorHandler, 1, 0, (OCISnapshot *) NULL,(OCISnapshot *) NULL, OC
    I_DEFAULT);
    /* if P_Name is an out parameter, at this point, it has the value it got from the database */
    /* logoff and close everything */

  • How to call PL/SQL procedure from Jdeveloper

    hai
    i am using JDeveloper 10g version 10.1.3. i am working on Web Application[JSF,ADF BC]. i had commit button in one form. when i click that button a PL/SQL procedure can be invoked.( the procedure is to check for primary key)
    how to do this
    thanks in advance
    C.R

    There are already some threads about calling PL/SQL from Java. E.g.: adf bc jsf application and database stored procedure
    Ronald

  • How to call Pl/sql procedure from form ?

    Hi all,
    I need to call a procedure from form after the user has pressed the button to invoke the sql procedure, can anyone please advise me on how to do it ?
    Thanks.
    Lim

    Hi,
    Thanks for your reply.
    yes, I have include in when-button-pressed trigger as
    AIC_PROC_AR_CCID_UPD;
    Below is my procedure :-
    CREATE OR REPLACE PROCEDURE AIC_PROC_AR_CCID_UPD(errbuf out Varchar2,
              retcode out Number ) is
    VAR_BUF VARCHAR2(240);
    Cursor C1 is
    SELECT CONCATENATED_SEGMENTS ACCT,
    SEGMENT5 SEG5
    FROM AIC_GL_COA AGC
    WHERE AGC.CODE_COMBINATION_ID IS NULL;
    Rec1 C1%RowType;
    BEGIN
    FOR Rec1 IN C1 LOOP
         BEGIN
         UPDATE AIC_GL_COA A SET ( DESCRIPTION, CODE_COMBINATION_ID, SEGMENT5 )=
         ( SELECT FFVT.DESCRIPTION, GLA.CODE_COMBINATION_ID, GLA.SEGMENT5
         FROM GL_CODE_COMBINATIONS_KFV GLA,
         FND_FLEX_VALUES_TL FFVT,
         FND_FLEX_VALUES FFV
         WHERE GLA.CONCATENATED_SEGMENTS = REC1.ACCT
         AND FFV.FLEX_VALUE = REC1.SEG5
         AND FFV.FLEX_VALUE_ID = FFVT.FLEX_VALUE_ID
         AND FFV.FLEX_VALUE_SET_ID = 1002673 )
         WHERE A.SEGMENT5 = REC1.SEG5 ;
         EXCEPTION
         WHEN NO_DATA_FOUND THEN
         FND_FILE.PUT_LINE(FND_FILE.OUTPUT, 'NO RECORD UPDATE !!');     
         END;
    END LOOP;
    COMMIT;
    RETURN;
    END;
    However, when I try to compile it, error prompt :-
    Error 306 at line 1, column 1
    wrong number or types of arguments in call to 'AIC_PROC_AR_CCID_UPD'
    Error 0 at line 1, column 1
    statement ignored.
    By the way, my form 6i is running at client site and connection to procedure in unix server. Will this is ok ?
    Thanks
    Rgds
    Lim

  • How to call PL/SQL procedure from PERL

    I have a requirement to create a PERL wrapper for few PL/SQL procedure.
    Can any one tell me how to call the procedures from PERL ?
    Thanks in advance.
    ....srini

    A quick Google search shows:
    http://www.saturn5.com/~jwb/dbi-examples.html#ora_sp

  • How to Call pl/sql procedure from shell script

    Hi,
    I've one procedure which takes the xml file name as input from one of the remote location. Every day users keep one file in that location.
    For eg:
    ACS_RPO00020110316_20110316220956.xml
    ACS_RPO00020110319_20110319220956.xml
    I need to read the latest file in this case. In this case second one is the latest file.
    Can some body please help me how to write script to pass parameter to that procedure that via shell program and execute that.
    Thanks in advance.
    Regards
    Nagendra

    hi
    I executed the below mentioned steps, but I did not get any result:
    I am pasting all the steps which I did
    -bash-3.2$ ls -lrt
    total 316
    -rw-r--r-- 1 oratest dba 4884 Mar 16 03:56 XXGEBIZ_EPO160320110356.xml
    -rw-r--r-- 1 oratest dba 4884 Mar 16 03:57 XXGEBIZ_EPO160320110357.xml
    -rw-r--r-- 1 oratest dba 4884 Mar 16 17:52 GEBIZ_ACS_RPO00020110316_20110316175216.xml
    -rw-r--r-- 1 oratest dba 38 Mar 16 18:18 GEBIZ_ACS_RPO00020110316_20110316181858.NODATA
    -rw-r--r-- 1 oratest dba 63 Mar 16 22:09 GEBIZ_ACS_RPO00020110316_20110316220956.xml
    -rw-r--r-- 1 oratest dba 9716 Mar 16 22:14 GEBIZ_ACS_RPO00020110316_20110316221429.xml
    -rw-r--r-- 1 oratest dba 12988 Mar 17 01:42 GEBIZ_POC_RPO000EPO20110317_20110317014247.xml
    -rw-r--r-- 1 oratest dba 13103 Mar 17 01:53 GEBIZ_POC_RPO000EPO20110317_20110317015356.xml
    -rw-r--r-- 1 oratest dba 38 Mar 17 01:57 GEBIZ_POC_RPO00020110317_20110317015712.NODATA
    -rw-r--r-- 1 oratest dba 38 Mar 17 18:44 GEBIZ_ACS_RPO00020110317_20110317184423.NODATA
    -rw-r--r-- 1 oratest dba 12326 Mar 17 18:46 GEBIZ_ACS_RPO00020110317_20110317184603.xml
    -rw-r--r-- 1 oratest dba 67578 Mar 18 01:32 GEBIZ_POF_RPO000EPO20110318_20110318013232.xml
    -rw-r--r-- 1 oratest dba 14484 Mar 18 20:27 GEBIZ_POF_RPO000EPO20110318_20110318202754.xml
    -rw-r--r-- 1 oratest dba 47653 Mar 19 01:29 GEBIZ_PYS_RPO00020110319_20110319012953.xml
    -rw-r--r-- 1 oratest dba 937 Mar 21 09:34 GEBIZ_SUPP.xml
    -rw-r--r-- 1 oratest dba 947 Mar 21 09:35 GEBIZ_SUPP1.xml
    -rwxrwxrwx 1 oratest dba 121 Mar 21 17:43 test
    -bash-3.2$
    -bash-3.2$ cat > test
    ls -lrt | tail -1
    filelist = $(ls GEBIZ_SUPP*.xml)
    for file in $filelist ; do
    echo "inside loop"
    file = $file
    echo "file name " $file
    done
    XGBZ_SUPP_MAST_XMLTAG_PROC $file
    -bash-3.2$ chmod 777 test
    -bash-3.2$ ./test
    -bash: ./test: Text file busy
    -bash-3.2$
    Initially I listed down all the files, in a sample file I've written the steps. But nothing is executed.
    One thing I want to ask here XGBZ_SUPP_MAST_XMLTAG_PROC is my procedure. I think I need to invoke sqlplus in the so as to execute my pl/sql script.
    Gurus, please let me know how to write them.
    Regards
    Nagendra

  • How to call pl/sql stored procs from AMImpl

    Hi I have worked with the regular procs which has input/output params as primitive types like Number, Varchar2 etc.
    But how to pass values to pl/sql procs which has custom data types like VARCHAR2_TABLE_100, please find the definition below.
    create or replace
    TYPE        "VARCHAR2_TABLE_100" is table of varchar2 ( 100 )
    How to pass values to the input param if type is of above type, any hint or thought is appreciated.
    Thanks.

    I tried using registeroutparameter(10,Types.ARRAY,"VARCHAR2_TABLE_100");
    But I am getting the wrong number of inputs or types exception. I thought it is because of not registering the output variable properly.
    Try with full qualified name ("YOURSCHEMA.VARCHAR2_TABLE_100")
    Also note that indexes in jdbc start from 1(not from 0) and that if you have plsql function first parameter is function return value.
    For example, if you have plsql function: "function some_func(p_param out varchar2_table_100) return somettype;"
    then to register p_param you need something like: stmt.registerOutParameter(2, OracleTypes.ARRAY, "SCHEMA.VARCHAR2_TABLE_100")
    Dario

  • Calling PL/SQL procedures/functions

    Hi all,
    What is the best way to call procedures and functions stored in Oracle database 10g, I am using ADF JSF. and can I call them inside the Appmod and EO's.
    thanks in advance,
    Ahmad Esbita

    Ahmad,
    somehow I get the feeling that we need to better expose our developer guides because nobody seems to find them. The developer guide is accessible from otn.oracle.com/products/jdev and this is the chapter you are looking for
    http://download-uk.oracle.com/docs/html/B25947_01/bcadvgen005.htm#sm0297
    Frank

  • Help!! how to call pl/sql anonymous block from java?

    I know that jdbc can call a pl/sql package or procedure,but if i
    want to call a pl/sql anonymous block, how can i do it? no procedure
    name or package name will be offered.
    Can u give me a sample code? thanks very much

    thanks ,but do u make sure that it can work? i have tried to do like this ,but i can not get it. Or please give me a detail code, thanks very much

  • How to call a servlets specific function from a link?

    hi all ! Im trying to call a function callled A from a link in my JSP. Im not using any buttons. How do I make this work?
    Thanks in advance.

    Hi,
    A solution to call A might include a custom JSP element. Inside the code for the
    element, you can get a reference to whatever object that "does an A", and make a call on the respective method/function/behavior. You need to extend the standard tag handler classes.
    Good luck!

  • Cancel/Break Stored PL/SQL-Procedure/Function from Oracle Forms

    Hello !
    If i call in Oracle Forms a PL/SQL-Programm stored in the dabase is there a way to break/cancel this programm from Oracle Forms ?
    Thanks in advance !
    Thomas

    <p>All I want to say is, you need to "prepare" the PL/SQL code to accept interruption, like dealing with the DBMS_APLICATION_INFO</p>If this code is not present in your PL/SQL code you won't stop it, except killing the session (that is a really dangerous option).
    Francois

  • How to call the built in functions from flex?

    I want to use some of the Built in functions like the twelvesprints.getActivityOwnerId() in flex. From the java example i could make out that we needed to import some classes to do this but was unable to find them for flex.

    You can download the SWC file for Flex Method app here:
    https://sandbox.12sprints.com/FlashMethodLib.swc
    Java samples are located at
    https://streamwork.com/api/Java.zip
    Method exaples are available at:
    https://streamwork.com/api/methods/com.streamwork.hello_world.zip
    https://streamwork.com/api/methods/com.streamwork.constants.zip
    https://streamwork.com/api/methods/com.streamwork.using_arrays.zip
    com.streamwork.testFlash

  • Calling PL/Sql Procedure in Jdeveloper 11g

    Hi All,
    How to call PL/Sql Procedure in Jdeveloper 11G. Here my procedure prints some statements in procedure using "dbms.output.put_line" . Here I want to call that procedure using button (or) ImageLink and print all the statements in pl/sql procedure in Jdeveloper Environment.
    Can anybody help on this .
    Thanks in Advance .
    Edited by: u41411 on Sep 28, 2009 7:18 AM

    Her is what I use to call Oracle DB procedure:
    procCall = "BEGIN " + YOUR_PROC_NAME + "(); END;";
    returned = am.getTransaction().executeCommand(procCall);
    where am is my application Module
    Hope this help.
    Jack

  • How to call a SQL function from an XSL expression

    Hi
    In R12, in Payroll Deposit adivce/Check writer, We need to sort the earnings tag <AC_Earnings> in to two different categories as regular and other earnings. In the DB and form level of element defintiion we have a DFF which differentiates between the two kinds of earnings. But the seeded XML that is gerneated by the check writer does not have this field.
    The seeded template displays all the earnings in one column. How can we achieve this in the template without modifying the seeded XML.
    The one approach i have is to write a function and based on the return value sort the data. For this I need to know :
    1) How to call a SQL function from an XSL expression that is allowed in BI template.
    If anyone ahs faced similar requirements please share your approach.
    Thanks
    Srimathi

    Thank u..
    but i'd seen that link wen i searched in google..
    Is it possible without using any 3rd party JARs and all?
    and more importantly plz tell me what should be preferred way to call a javascript function?
    Do it using addLoadEvent() or Windows.Load etc
    OR
    Call it thru Xsl? (I donno how to do dis)
    Thanks in Advance..
    Edited by: ranjjose on Jun 3, 2008 8:21 AM

  • How to call a sql server stored procedure from oracle

    Hi all,
    Please anybody tell me how to call a sql server stored procedure from oracle.
    I've made an hsodbc connection and i can do insert, update, fetch data in sql server from oracle. But calling SP gives error. when I tried an SP at oracle that has line like
    "dbo"."CreateReceipt"@hsa
    where CreateReceipt is the SP of sql server and hsa is the DSN, it gives the error that "dbo"."CreateReceipt" should be declared.
    my database version is 10g
    Please help me how can i call it... I need to pass some parameters too to the SP
    thanking you

    hi,
    thank you for the response.
    when i call the sp using DBMS_HS_PASSTHROUGH, without parameters it works successfully, but with parameters it gives the following error
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Generic Connectivity Using ODBC][Microsoft][ODBC SQL Server Driver]Invalid parameter number[Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index (SQL State: S1093; SQL Code: 0)
    my code is,
    declare
    c INTEGER;
    nr INTEGER;
    begin
    c := DBMS_HS_PASSTHROUGH.OPEN_CURSOR@hsa;
    DBMS_HS_PASSTHROUGH.PARSE@hsa(c, 'Create_Receipt(?,?)');
    DBMS_HS_PASSTHROUGH.BIND_VARIABLE@hsa(c,1,'abc');
    DBMS_HS_PASSTHROUGH.BIND_VARIABLE@hsa(c,2,'xyz');
    nr:=DBMS_HS_PASSTHROUGH.EXECUTE_NON_QUERY@hsa(c);
    DBMS_HS_PASSTHROUGH.CLOSE_CURSOR@hsa(c);
    end;
    Create_Receipt is the sp which requires two parameters.
    please give me a solution
    thanking you
    sreejith

Maybe you are looking for