Equalent built in procedures from 4.5, 6i to 10g

we are going to convert forms 4.5 ,forms6i into forms10g
what are all the different new built in functions, procedures
for old built in functions,procedure, etc...
for example
Old(forms4.5,forms6i) forms 10g
MENU_NEXT_FIELD This is equalent in 10g is NEXT_ITEM
like wise can any one tell me the different built in
Thank with Regards
Sathian A

If you look at the documentation for the "Forms Migration Assistant" I'm sure it'll all be in there.
Steve

Similar Messages

  • 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 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.

  • Error when calling procedure from form personalization

    Hi every body
    I want to call a procudre using form personalization . I made the procedure and in form personalization i call it as follow:
    built in type : Execute a Procedure
    Argument :
    ='GAZ_EMP_ASSIGN_UPDATE(' || :ASSGT.ORGANIZATION_ID || ', ' || :ASSGT.ASSIGNMENT_ID || ', ' || FND_PROFILE.VALUE('USER_ID') || ', ' || FND_PROFILE.VALUE('DB_SESSION_ID') ||' )'
    but the following error raised when i click on Apply Now button :
    the string (='GAZ_EMP_ASSIGN_UPDATE(' || :ASSGT.ORGANIZATION_ID || ', ' || :ASSGT.ASSIGNMENT_ID || ', ' || FND_PROFILE.VALUE('USER_ID') || ', ' || FND_PROFILE.VALUE('DB_SESSION_ID') ||' )' )
    couldn't be evaluated because of error ORA-06550 :line 1 , column 43
    PLS-00103:encountered the symbol ")" while expecting one of the folowing (- + ...... etc
    can anyone have a solution to this problem because it made me mad .(urgent)
    Or if anyone have another way to call the procedure ??
    Note that i want to pass db_session_id to the procedure from the application so does anyone have a complian about the way of passing this parameter to the procedure ??

    See http://oracle.ittoolbox.com/groups/technical-functional/oracle-apps-l/forms-personalization-execute-a-procedure-1778674

  • APEX_MAIL.SEND() not seen executing MY procedure from TOAD

    Hi,
    I have a procedure that calls APEX_MAIL.SEND and works fine when executed from within the app or in the APEX Workshop window.
    Trying to execute MY procedure from an Oracle job we get an error unknown procedure APEX_MAIL.SEND
    anyone have this problem?

    Hello,
    Why don't you use utl_smtp package if you are wanting to send email from pl/sql?
    If you look at the help for APEX_MAIL its says:
    APEX_MAIL
    You can use the APEX_MAIL package to send an email from an Oracle Application Express application. This package is built on top of the Oracle supplied UTL_SMTP package. Because of this dependence, the UTL_SMTP package must be installed and functioning in order to use APEX_MAIL.
    So APEX_MAIL will only work within a valid apex session and it won't be available to a toad session .
    Cheers,
    Paul.

  • Error while executing a stored procedure from forms6i

    When I execute a STORED PROCEDURE from ORACLE DB 10g this procedure works perfectly fine.
    But when I execute the same from the FORMs 6i I get the following error:
    PDE-PLU022 Don't have access to the stored program unit
    XMLPARSERCOVER in schema CARE.
    where XMLPARSERCOVER is the class and
    CARE is the schema.
    Regards,
    Jignesh S

    I have tried this with both the owner of the schema and the intended user, -from both forms and directly.
    All rights was granted on the stored procedure. Since posting I have found that one of the tables that the procedure might insert into, was not explicitly granted to the intended user, and after rectifying that the error message went away.
    -however, the procedure now silently "finishes" without any evidence that it ever ran, if invoked from the forms application. When invoked from SQL Plus (or JDev, or Toad) it runs as expected.
    I have no public synonym for the procedure, -is that necessary?
    The stored procedure in question is implemented in java, and published as a stored procedure. It does rather heavy lifting, when running, using a view against another server , updating local tables and quite a lot of data validation/cleansing, and logging. All recourses are within the same schema.
    Any ideas?

  • 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.

  • How to call a PL/SQL procedure from a Java class?

    Hi,
    I am new to the E-BusinessSuite and I want to develop a Portal with Java Portlets which display and write data from some E-Business databases (e.g. Customer Relationship Management or Human Resource). These data have been defined in the TCA (Trading Community Architecture) data model. I can access this data with PL/SQL API's. The next problem is how to get the data in the Java class. So, how do you call a PL/SQL procedure from a Java program?
    Can anyone let me know how to solve that problem?
    Thanks in advance,
    Chang Si Chou

    Have a look at this example:
    final ApplicationModule am = panelBinding.getApplicationModule();
    try
         final CallableStatement stmt = ((DBTransaction)am.getTransaction()).
                                                                                         createCallableStatement("{? = call some_pck.some_function(?, ?)}", 10);
         stmt.registerOutParameter(1, OracleTypes.VARCHAR);
         stmt.setInt(2, ((oracle.jbo.domain.Number)key.getAttribute(0)).intValue());
         stmt.setString(3, "Test");
         stmt.execute();
         stmt.close();
         return stmt.getString(1);
    catch (Exception ex)
         panelBinding.reportException(ex);
         return null;
    }Hope This Helps

  • How to call a PL/SQL procedure from a xml Data Template

    We have a requirement in which we need to call a pl/sql package.(dot)procedure from a Data Template of XML Publisher.
    we have registered a Data Template & a RTF Template in the XML Publisher Responsibility in the Oracle 11.5.10 instance(Front End).
    In the Data Query part of the Data Template , we have to get the data from a Custom View.
    This view needs to be populated by a PL/SQL procedure.And this procedure needs to be called from this Data Template only.
    Can anybody suggest the solution.
    Thanks,
    Sachin

    Call the procecure in the After Parameter Form trigger, which can be scripted in the Data Template.
    BTW, there is a specialized XML Publisher forum:
    BI Publisher

  • PL/SQL: Executing a procedure from within another procedure

    Hello, I'm a newbie and I need help on how to execute procedures from within another procedure. The procedure that I call from within the procedure have return values that I want to check.
    I tried: EXECUTE(user_get_forum_info(p_forumid, var_forum_exists, var_forum_access, var_forumname));
    but I get the error message:
    PLS-00103: Encountered the symbol "USER_GET_FORUM_INFO" when expecting one of the following::= . ( @ % ; immediate
    The symbol ":=" was substituted for "USER_GET_FORUM_INFO" to continue.
    And when I tried: EXECUTE(user_get_forum_info(p_forumid, var_forum_exists, var_forum_access, var_forumname));
    I get the error message:
    PLS-00222: no function with name 'USER_GET_FORUM_INFO' exists in this scope
    PL/SQL: Statement ignored
    The procedure USER_GET_FORUM_INFO exists. (don't understand why it says "no FUNCTION with name", it's a procedure I'm executing)
    I'm stuck so thanks for any help...
    Below is all the code. I'm using Oracle 9i on RedHat Linux 7.3.
    ================================================================================
    CREATE OR REPLACE PROCEDURE user_forum_requestsaccess (
    p_forumid IN NUMBER,
    p_requestmessage IN VARCHAR2
    AS
    var_forumid NUMBER;
    var_forum_exists NUMBER;
    var_forum_access NUMBER;
    request_exists NUMBER;
    var_forumname VARCHAR2(30);
    FORUM_DOESNT_EXIST EXCEPTION;
    FORUM_USER_HAS_ACCESS EXCEPTION;
    FORUM_REQUEST_EXIST EXCEPTION;
    BEGIN
    SELECT SIGN(NVL((SELECT request_id FROM forum.vw_all_forum_requests WHERE forum_id = p_forumid AND db_user = user),0)) INTO request_exists FROM DUAL;
    EXECUTE(user_get_forum_info(p_forumid, var_forum_exists, var_forum_access, var_forumname));
    IF var_forum_exists = 0 THEN
    RAISE FORUM_DOESNT_EXIST;
    ELSIF var_forum_access = 1 THEN
    RAISE FORUM_USER_HAS_ACCESS;
    ELSIF request_exists = 1 THEN
    RAISE FORUM_REQUEST_EXIST;
    ELSE
    INSERT INTO tbl_forum_requests VALUES (SEQ_TBL_FORUM_REQ_REQ_ID.NEXTVAL, SYSDATE, p_requestmessage, p_forumid, user);
    INSERT INTO tbl_forum_eventlog VALUES (SEQ_TBL_FORUM_EVNTLOG_EVNT_ID.NEXTVAL,SYSDATE,1,'User ' || user || ' requested access to forum ' || var_forumname || '.', p_forumid,user);
    COMMIT;
    END IF;
    EXCEPTION
    WHEN
    FORUM_DOESNT_EXIST
    THEN RAISE_APPLICATION_ERROR(-20003,'Forum doesnt exist.');
    WHEN
    FORUM_USER_HAS_ACCESS
    THEN RAISE_APPLICATION_ERROR(-20004,'User already have access to this forum.');
    WHEN
    FORUM_REQUEST_EXIST
    THEN RAISE_APPLICATION_ERROR(-20005,'A request to this forum already exist.');
    END;
    GRANT EXECUTE ON user_forum_requestsaccess TO forum_user;
    ================================================================================
    Regards Goran

    you don't have to use execute when you want to execute a procedure (only on sql*plus, you would use it)
    just give the name of the funtion
    create or replace procedure test
    as
    begin
        dbms_output.put_line('this is the procedure test');
    end test;
    create or replace procedure call_test
    as
    begin
        dbms_output.put_line('this is the procedure call_test going to execute the procedure test');
        test;
    end call_test;
    begin
        dbms_output.put_line('this is an anonymous block calling the procedure call_test');
        call_test;
    end;
    /

  • Unable to call a procedure from inside a another procedure

    Dear members
    I am trying to call a procedure from inside an another procedure.Both the procedures are present within the same package.I am trying to call the second procedure just before the end of the first procedure.Both the procedures are compiling fine but the tables are not getting populated inside the second procedure.Also the DBMS_OUTPUT statements present in second procedures are not getting displayed.(I feel the second procedured is not getting called).
    The package specification is as follows:
    CREATE OR REPLACE package ANVESH.conv_api_pkg
    is
        PROCEDURE PROC_CONVERSION_API(FILE_PATH IN VARCHAR2,FILE_NAME IN VARCHAR2) ;
        TYPE cts_order_details IS TABLE OF XXCTS_ORDER_DETAILS_STG%ROWTYPE;
        PROCEDURE proc_conversion_api2(p_orderdetails IN cts_order_details) ;
    end conv_api_pkg;The package body is as follows:
    CREATE OR REPLACE package body ANVESH.conv_api_pkg
    is
    PROCEDURE PROC_CONVERSION_API(FILE_PATH IN VARCHAR2,FILE_NAME IN VARCHAR2)
    IS
        v_file_type utl_file.file_type;
        v_buffer VARCHAR2(1000);
        V_CUSTOMER_NAME VARCHAR2(100);
        V_MANUFACTURER VARCHAR2(100);
        V_PRODUCT_NAME VARCHAR2(100);
        V_QUANTITY NUMBER;
        V_REQ_SHIP_DATE DATE;
        V_REQ_PRICE NUMBER;
        V_LOG_FILE utl_file.file_type;
        V_COUNT_CUST NUMBER;
        V_COUNT_PROD NUMBER;
       L_ORDER_LINES CONV_API_PKG.cts_order_details:=CONV_API_PKG.cts_order_details();
    BEGIN
        DBMS_OUTPUT.PUT_LINE('Inside begin 1');
        v_file_type := UTL_FILE.fopen(FILE_PATH, FILE_NAME, 'r',null);
            DBMS_OUTPUT.PUT_LINE('Inside begin 1.1');
        LOOP
            BEGIN
                        DBMS_OUTPUT.PUT_LINE('Inside begin 2');
                         UTL_FILE.GET_LINE (v_file_type,v_buffer);
                        DBMS_OUTPUT.PUT_LINE('Inside begin 2.1');
                        DBMS_OUTPUT.PUT_LINE('the  buffer is '||v_buffer);
                        DBMS_OUTPUT.PUT_LINE('the length of buffer is '||length(v_buffer));
                         V_CUSTOMER_NAME := trim(substr(v_buffer, 1, 30));
                         DBMS_OUTPUT.PUT_LINE('Customer Name is '||V_CUSTOMER_NAME);
                         V_MANUFACTURER  := trim(substr(v_buffer, 31, 40));
                         DBMS_OUTPUT.PUT_LINE('Manufacturer is '||V_MANUFACTURER);
                         V_PRODUCT_NAME  := trim(substr(v_buffer,  71, 20));
                         DBMS_OUTPUT.PUT_LINE('Product Name is '||V_PRODUCT_NAME);
                         V_QUANTITY      := to_number(trim(substr(v_buffer, 91, 5)));
                         DBMS_OUTPUT.PUT_LINE('Quantity is '||V_QUANTITY);
                         V_REQ_SHIP_DATE     := to_date(trim(substr(v_buffer, 96, 20)), 'DD-MON-YYYY');
                         DBMS_OUTPUT.PUT_LINE('Requested Ship Date is '|| V_REQ_SHIP_DATE);
                        V_REQ_PRICE        :=nvl(substr( trim(v_buffer), 116, length(v_buffer)-116),0);
                        --DBMS_OUTPUT.PUT_LINE('Requested Price is1 '||substr(v_buffer, 116, 5));
                        DBMS_OUTPUT.PUT_LINE('The requested price is  '||V_REQ_PRICE);
                V_LOG_FILE := UTL_FILE.FOPEN(FILE_PATH, 'LOG_FILE.dat', 'A');
                    IF (V_QUANTITY > 0)
                     THEN
                     DBMS_OUTPUT.PUT_LINE('The quantity is '||V_QUANTITY);
                       SELECT COUNT (*)
                       INTO V_COUNT_CUST
                       FROM CONVERSION_CUSTOMERS
                       WHERE CUSTOMER_NAME = V_CUSTOMER_NAME;
                       DBMS_OUTPUT.PUT_LINE('The Customer count is '||V_COUNT_CUST);
                       IF(V_COUNT_CUST > 0)
                       THEN
                           SELECT COUNT(*)
                           INTO V_COUNT_PROD
                           FROM conversion_products
                           WHERE PRODUCT_NAME = V_PRODUCT_NAME;
                           DBMS_OUTPUT.PUT_LINE('The Product count is '||V_COUNT_PROD);
                          IF(V_COUNT_PROD >0)
                           THEN
                                INSERT INTO XXCTS_ORDER_DETAILS_STG VALUES (V_CUSTOMER_NAME, V_PRODUCT_NAME, V_MANUFACTURER, V_QUANTITY, V_REQ_SHIP_DATE, V_REQ_PRICE, 'ACTIVE', 'ORDER TAKEN');  
                           ELSE
                                DBMS_OUTPUT.PUT_LINE('PRODUCT SHOULD BE VALID');
                                UTL_FILE.PUT_LINE(V_LOG_FILE, 'PRODUCT SHOULD BE VALID');                   
                           END IF;
                       ELSE
                          DBMS_OUTPUT.PUT_LINE('CUSTOMER SHOULD BE VALID');
                          UTL_FILE.PUT_LINE(V_LOG_FILE, 'CUSTOMER SHOULD BE VALID');
                       END IF;      
                    ELSE
                        DBMS_OUTPUT.PUT_LINE('QUANTITY SHOULD BE VALID');
                        UTL_FILE.PUT_LINE(V_LOG_FILE, 'QUANTITY SHOULD BE VALID');
                    END IF;
                    EXCEPTION
                    WHEN NO_DATA_FOUND THEN
                        EXIT;
                    END;
        END LOOP;
    SELECT CUSTOMER_NAME, PRODUCT_NAME, MANUFACTURER, QUANTITY, REQUESTED_SHIP_DATE, REQUESTED_PRICE, STATUS,MESSAGE
    BULK COLLECT
    INTO L_ORDER_LINES
    FROM XXCTS_ORDER_DETAILS_STG;
    DBMS_OUTPUT.PUT_LINE('values inserted');
    proc_conversion_api2(p_orderdetails=>L_ORDER_LINES);
    END;
    PROCEDURE proc_conversion_api2(p_orderdetails IN cts_order_details)
      IS
      V_AVL_QUANTITY CONVERSION_PRODUCTS.AVL_QUANTITY%TYPE;
      V_REQ_SHIP_DATE DATE;
      V_LIST_PRICE CONVERSION_PRODUCTS.LIST_PRICE%TYPE;
      V_NET_PRICE CONVERSION_PRODUCTS.LIST_PRICE%TYPE;
      V_NET CONVERSION_PRODUCTS.LIST_PRICE%TYPE;
      V_EXTN_PRICE CONVERSION_PRODUCTS.LIST_PRICE%TYPE;
      V_CUST_DISC CONVERSION_CUSTOMERS.DISCOUNT%TYPE;
      V_CERT_DISC CONVERSION_CERTIFICATION.DISCOUNT%TYPE;
      V_CUST_ID XXCTS_ORDER_DETAILS.CUSTOMER_ID%TYPE;
      V_PROD_ID XXCTS_ORDER_DETAILS.PRODUCT_ID%TYPE;
      V_DISC_PRICE CONVERSION_PRODUCTS.LIST_PRICE%TYPE;
      V_DISC_NAME CONVERSION_CERTIFICATION.CERTIFICATION%TYPE;
      V_TOTAL_DISC_AMT NUMBER;
      V_TOTAL_DISC NUMBER;
      V_LIMIT NUMBER;
    BEGIN
        DBMS_OUTPUT.PUT_LINE('INSIDE API_2 BEGIN 1');
            FOR i IN p_orderdetails.FIRST..p_orderdetails.LAST
            LOOP
                 BEGIN
                DBMS_OUTPUT.PUT_LINE('INSIDE API_2 BEGIN 2');
                SELECT PRODUCT_ID,AVL_QUANTITY,LIST_PRICE
                INTO V_PROD_ID,V_AVL_QUANTITY,V_LIST_PRICE
                FROM CONVERSION_PRODUCTS
                WHERE PRODUCT_NAME=p_orderdetails(i).PRODUCT_NAME;
                DBMS_OUTPUT.PUT_LINE('PRODUCT QUANTITY is '||V_PROD_ID);
                DBMS_OUTPUT.PUT_LINE('AVAILABLE QUANTITY is '||V_AVL_QUANTITY);
                DBMS_OUTPUT.PUT_LINE('LIST PRICE is '||V_LIST_PRICE);
                SELECT CUSTOMER_ID,NVL(DISCOUNT,0)
                INTO V_CUST_ID,V_CUST_DISC
                FROM CONVERSION_CUSTOMERS
                WHERE CUSTOMER_NAME=p_orderdetails(i).CUSTOMER_NAME;
                DBMS_OUTPUT.PUT_LINE('CUSTOMER ID is '||V_CUST_ID);
                DBMS_OUTPUT.PUT_LINE('CUSTOMER DISCOUNT IS '||V_CUST_DISC);
                SELECT A.DISCOUNT,A.CERTIFICATION
                INTO  V_CERT_DISC,V_DISC_NAME
                FROM CONVERSION_CERTIFICATION A,CONVERSION_CUSTOMERS B
                WHERE A.CERTIFICATION=B.CERTIFICATION(+)
                AND B.CUSTOMER_NAME=p_orderdetails(i).CUSTOMER_NAME;
                DBMS_OUTPUT.PUT_LINE('CERTIFICATION DISCOUNT IS '||V_CERT_DISC);
                V_NET:=((V_LIST_PRICE)-(V_LIST_PRICE)*(V_CERT_DISC)/100);
                DBMS_OUTPUT.PUT_LINE('NET PRICE AFTER CERTIFICATION DISCOUNT IS '||V_NET);
                V_NET_PRICE:=((V_NET)-(V_NET)*(V_CUST_DISC)/100);
                DBMS_OUTPUT.PUT_LINE('NET PRICE AFTER COMPLETE DISCOUNT IS '||V_NET_PRICE);
                V_EXTN_PRICE:=(V_NET_PRICE)*(p_orderdetails(i).QUANTITY);
                DBMS_OUTPUT.PUT_LINE('EXTENDED PRICE IS '||V_EXTN_PRICE);
                V_TOTAL_DISC:=((V_CERT_DISC)/100+(V_CUST_DISC)/100);
                DBMS_OUTPUT.PUT_LINE('TOTAL DISCOUNT IS '|| V_TOTAL_DISC);
                V_TOTAL_DISC_AMT:=(V_LIST_PRICE)-(V_NET_PRICE);
                DBMS_OUTPUT.PUT_LINE('TOTAL DISCOUNT PRICE IS '|| V_TOTAL_DISC_AMT);
                SELECT MAX(A.LIMIT)
                INTO V_LIMIT
                FROM CONVERSION_CERTIFICATION A,CONVERSION_CUSTOMERS B
                WHERE A.CERTIFICATION=B.CERTIFICATION(+)
                AND B.CUSTOMER_NAME=p_orderdetails(i).CUSTOMER_NAME;
                IF p_orderdetails(i).QUANTITY<V_AVL_QUANTITY THEN
                INSERT INTO XXCTS_ORDER_DETAILS VALUES(SEQ_HEADER_ID.NEXTVAL,SEQ_LINE_ID.NEXTVAL,V_CUST_ID,V_PROD_ID,p_orderdetails(i).QUANTITY,p_orderdetails(i).REQUESTED_SHIP_DATE,p_orderdetails(i).REQUESTED_PRICE,V_LIST_PRICE,V_TOTAL_DISC,V_NET_PRICE,V_EXTN_PRICE,'QTY HOLD','REQ QNTY LESS THAN AVL QTY',SYSDATE);
                INSERT INTO xxcts_order_discounts VALUES(SEQ_HEADER_ID.NEXTVAL,SEQ_LINE_ID.NEXTVAL,SEQ_DISCOUNT_ID.NEXTVAL,V_DISC_NAME,V_TOTAL_DISC_AMT);
                END IF;
                IF p_orderdetails(i).REQUESTED_SHIP_DATE<SYSDATE THEN
                INSERT INTO XXCTS_ORDER_DETAILS VALUES(SEQ_HEADER_ID.NEXTVAL,SEQ_LINE_ID.NEXTVAL,V_CUST_ID,V_PROD_ID,p_orderdetails(i).QUANTITY,p_orderdetails(i).REQUESTED_SHIP_DATE,p_orderdetails(i).REQUESTED_PRICE,V_LIST_PRICE,V_TOTAL_DISC,V_NET_PRICE,V_EXTN_PRICE,'DATE HOLD','SHIPDATE CANNOT BE LESS THAN CURR DATE',SYSDATE);
                INSERT INTO xxcts_order_discounts VALUES(SEQ_HEADER_ID.NEXTVAL,SEQ_LINE_ID.NEXTVAL,SEQ_DISCOUNT_ID.NEXTVAL,V_DISC_NAME,V_TOTAL_DISC_AMT);
                END IF;
                IF V_NET_PRICE>p_orderdetails(i).REQUESTED_PRICE THEN
                INSERT INTO XXCTS_ORDER_DETAILS VALUES(SEQ_HEADER_ID.NEXTVAL,SEQ_LINE_ID.NEXTVAL,V_CUST_ID,V_PROD_ID,p_orderdetails(i).QUANTITY,p_orderdetails(i).REQUESTED_SHIP_DATE,p_orderdetails(i).REQUESTED_PRICE,V_LIST_PRICE,V_TOTAL_DISC,V_NET_PRICE,V_EXTN_PRICE,'PRICE HOLD','NET PRICE CANNOT BE MORE THAN REQ PRICE',SYSDATE);
                INSERT INTO xxcts_order_discounts VALUES(SEQ_HEADER_ID.NEXTVAL,SEQ_LINE_ID.NEXTVAL,SEQ_DISCOUNT_ID.NEXTVAL,V_DISC_NAME,V_TOTAL_DISC_AMT);
                END IF;
               /* IF V_LIMIT<p_orderdetails(i).REQUESTED_PRICE THEN
                INSERT INTO XXCTS_ORDER_DETAILS VALUES(SEQ_HEADER_ID.NEXTVAL,SEQ_LINE_ID.NEXTVAL,V_CUST_ID,V_PROD_ID,p_orderdetails(i).QUANTITY,p_orderdetails(i).REQUESTED_SHIP_DATE,p_orderdetails(i).REQUESTED_PRICE,V_LIST_PRICE,V_TOTAL_DISC,V_NET_PRICE,V_EXTN_PRICE,'ORDER LIMIT HOLD','PRICE CANNOT EXCEED ORDER LIMIT',SYSDATE);
                INSERT INTO xxcts_order_discounts VALUES(SEQ_HEADER_ID.NEXTVAL,SEQ_LINE_ID.NEXTVAL,SEQ_DISCOUNT_ID.NEXTVAL,V_DISC_NAME,V_TOTAL_DISC_AMT);
                END IF;*/
                EXCEPTION
                WHEN NO_DATA_FOUND THEN
                DBMS_OUTPUT.PUT_LINE(' INSIDE EXCEPTION BLOCK');
                END;
            END LOOP;
    END;
    end conv_api_pkg;
    /the pl/sql block to invoke the the procedure :
    declare
    begin
    PROC_CONVERSION_API('/usr/tmp' ,'Walmart_Orders_062908.dat');
    end;please let me know what is wrong in the program.
    Thanks
    Anvesh

    Hi Walter
    Yes 'Inside begin 1' and 'Inside begin 2' were printed.Please find the the DBMS_OUTPUT statements that were printed.
    Inside begin 1
    Inside begin 1.1
    Inside begin 2
    Inside begin 2.1
    the  buffer is BESTBUY                       SONY ERICSSON                           W580i               25   1-AUG-2008          50
    the length of buffer is 118
    Customer Name is BESTBUY
    Manufacturer is SONY ERICSSON
    Product Name is W580i
    Quantity is 25
    Requested Ship Date is 01-AUG-08
    The requested price is  50
    The quantity is 25
    The Customer count is 1
    The Product count is 0
    PRODUCT SHOULD BE VALID
    Inside begin 2
    Inside begin 2.1
    the  buffer is BESTBUY                       SAMSUNG                                 BLACKJACK           50   15-JUL-2008         150
    the length of buffer is 119
    Customer Name is BESTBUY
    Manufacturer is SAMSUNG
    Product Name is BLACKJACK
    Quantity is 50
    Requested Ship Date is 15-JUL-08
    The requested price is  150
    The quantity is 50
    The Customer count is 1
    The Product count is 1
    Inside begin 2
    Inside begin 2.1
    the  buffer is BESTBUY                       APPLE                                   IPHONE 4GB          50   15-JUL-2008        
    the length of buffer is 116
    Customer Name is BESTBUY
    Manufacturer is APPLE
    Product Name is IPHONE 4GB
    Quantity is 50
    Requested Ship Date is 15-JUL-08
    The requested price is  0
    The quantity is 50
    The Customer count is 1
    The Product count is 1
    Inside begin 2
    Inside begin 2.1
    the  buffer is BESTBUY                       ATT                                     TILT                100  15-JUN-2008        
    the length of buffer is 116
    Customer Name is BESTBUY
    Manufacturer is ATT
    Product Name is TILT
    Quantity is 100
    Requested Ship Date is 15-JUN-08
    The requested price is  0
    The quantity is 100
    The Customer count is 1
    The Product count is 1
    Inside begin 2
    Inside begin 2.1
    the  buffer is BESTBUY                       NOKIA                                   N73                 50   15-JUL-2008         200
    the length of buffer is 118
    Customer Name is BESTBUY
    Manufacturer is NOKIA
    Product Name is N73
    Quantity is 50
    Requested Ship Date is 15-JUL-08
    The requested price is  20
    The quantity is 50
    The Customer count is 1
    The Product count is 0
    PRODUCT SHOULD BE VALID
    Inside begin 2In the first procedure I am trying to read the data from a flat file and store it in a table.Here is the sample data from the flat file.
    BESTBUY                       SONY ERICSSON                           W580i               25   1-AUG-2008          50
    BESTBUY                       SAMSUNG                                 BLACKJACK           50   15-JUL-2008         150
    BESTBUY                       APPLE                                   IPHONE 4GB          50   15-JUL-2008        
    BESTBUY                       ATT                                     TILT                100  15-JUN-2008        
    BESTBUY                       NOKIA                                   N73                 50   15-JUL-2008         200When tried to execute the second procedure independently using the PL/SQL block,the tables in second procedure were populated and the DBMS_Output statements were also displayed.I have made use of the same query in that case
    Thanks
    Anvesh
    Edited by: Anvesh Reddy on Dec 23, 2008 12:40 PM

  • Call a pl/sql stored procedure from a report link

    Hello everyone:
    I have a report with a link in a column, which takes you to another page and passes values to that page, but also need the link, run a stored procedure before going to the other page.
    In the Forum I found cases similar to this, but none of the examples is clear to me how I do this. It seems that the target of the link should be URL, and also I have to call the stored procedure with a javascript function.
    My questions are:
    - Is this the best method to make what I need?
    - How should be the syntax of the link that takes me to another page and run the "stored procedure"
    - How and where I put the function "javascript" to run the "stored procedure"
    BDD: Oracle 11 g
    Apex version 4.1
    Best regards
    Gerard

    Hi,
    Change the link to call an apex.submit process. (javascript).
    Edit:
    I've set up a basic example.
    Region 1 (just so you can see the value getting set):
    select :P27_HIDDEN item_Value
    from dual
    Region 2:
    select rownum id, dbms_random.string('U', 12) sss
    from dual
    connect by level <= 20
    item attributes for ID:
    Target: URL
    URL: javascript:apex.submit({request:'NAVIGATE', set:{'P27_HIDDEN':#ID#}});
    (P27_HIDDEN is just a hidden item i created)
    http://apex.oracle.com/pls/apex/f?p=54920:27
    Edit2:
    In your case, then you can just have a page process based on conditions request = expression1, expression1: NAVIGATE..... then a page branch to go to the desired page, also with the same conditions
    Edit3:
    Im not sure what examples you are referring to , as you didn't supply any links; but you mention calling the stored procedure from javascript, so would likely involve some AJAX, but imo not necessary.

  • Running a SQL Stored Procedure from Power Query with Dynamic Parameters

    Hi,
    I want to execute a stored procedure from Power Query with dynamic parameters.
    In normal process, query will look like below in Power Query. Here the value 'Dileep' is passed as a parameter value to SP.
        Source = Sql.Database("ABC-PC", "SAMPLEDB", [Query="EXEC DBO.spGetData 'Dileep'"]
    Now I want to pass the value dynamically taking from excel sheet. I can get the required excel cell value in a variable but unable to pass it to query.
        Name_Parameter = Excel.CurrentWorkbook(){[Name="Table3"]}[Content],
        Name_Value = Name_Parameter{0}[Value],
    I have tried like below but it is not working.
    Source = Sql.Database("ABC-PC", "SAMPLEDB", [Query="EXEC DBO.spGetData Name_Value"]
    Can anyone please help me with this issue.
    Thanks
    Dileep

    Hi,
    I got it. Below is the correct syntax.
    Source = Sql.Database("ABC-PC", "SAMPLEDB", [Query="EXEC DBO.spGetData '" & Name_Value & "'"]
    Thanks
    Dileep

  • Performance differce calling Procedure from sqlplus and Java

    Hi ,
    I have one procedure which is called from java application and its called only once from java and the entire process is running from procedure itself.Once its called there is no dependency from java to PL/SQL.Its taking long time from java.But if I execute the same procedure from SQL plus then its running in seconds.Also only one session is running in entire database.
    My Oracle version 11g.
    Please guide me if you get some thing based on below session event.
    This is the session status for running from SQL plus
    SID     EVENT                    TOTAL_WAITS          TOTAL_TIMEOUTS     TIME_WAITED     WAIT_CLASS
    2191     SQL*Net message from client     954                              0                    1319633          Idle
    2191     direct path read                    860                              0                    702               User I/O
    2191     db file sequential read               2605                         0                    550               User I/O
    2191     SQL*Net break/reset to client     24                              0                    460               Application
    2191     SQL*Net more data from client     3                              0                    159               Network
    2191     direct path write temp               214                              0                    74               User I/O
    2191     direct path read temp               314                              0                    67               User I/O
    2191     db file scattered read               78                              0                    42               User I/O
    2191     db file parallel read               71                              0                    21               User I/O
    2191     log file sync                         36                              0                    12               Commit
    2191     SQL*Net message to client          955                              0                    0               Network
    2191     Disk file operations I/O          8                              0                    0               User I/O
    2191     events in waitclass Other          15                              7                    0               Other
    This is the session status for running from Java
    SID     EVENT     TOTAL_WAITS     TIME_WAITED     WAIT_CLASS
    1718     SQL*Net message from client     21208     7046039     Idle
    1718     direct path read     2742     2327     User I/O
    1718     log file sync     3748     1121     Commit
    1718     db file sequential read     1533     1082     User I/O
    1718     enq: TX - row lock contention     6     423     Application
    1718     buffer busy waits     1     100     Concurrency
    1718     log buffer space     1     30     Configuration
    1718     direct path write temp     92     21     User I/O
    1718     direct path read temp     138     16     User I/O
    1718     log file switch (private strand flush incomplete)     6     16     Configuration
    1718     SQL*Net message to client     21209     2     Network
    1718     db file scattered read     2     1     User I/O
    1718     SQL*Net more data from client     17     0     Network
    1718     Disk file operations I/O     11     0     User I/O
    1718     SQL*Net more data to client     1     0     Network
    1718     events in waitclass Other     15     0     Other
    Sorry I am not able to paste in proper alignment for my plain text.

    Hi,
    you need to find which SQL is running slower, using some tools as dbms_profiler, dbms_hprof, ASH, extended SQL trace and real-time SQL monitor (caution: some of the tools may require Diagnostic Pack License).
    Then you need to pinpoint difference in the plans and understand its origin -- post plans here if you need help with that (use tags to preserve formatting).
    Best regards,
      Nikolay                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Deploy warnings using a PL/SQL procedure (from a Public Transform Package)

    OWB Version: 10.2
    I am receiving the following warnings when I attempt to deploy a map that contains a reference to a custom pl/sql procedure that is setup in a public transformation package:
    Warning
    ORA-06550: line 115, column 32:
    PLS-00112: end-of-line in quoted identifier
    ORA-06550: line 115, column 9:
    PLS-00103: Encountered the symbol "." when expecting one of the following:
    := . ( @ % ; not null range default character
    I reviewed the OWB generated code and I discovered the OWB is a adding two double quotes in front of any reference to the package name. For example.....
    BEGIN
    COMMIT;
    sql_stmt := 'ALTER SESSION DISABLE PARALLEL DML';
    EXECUTE IMMEDIATE sql_stmt;
    IF NOT ""ZZTEST"."INIT_SF_USER_CLAS_St" THEN
    * note the "" in front of ZZTEST, which is the package name.
    Has anyone else encountered this issue? I can manually correct the generated the code, but it would be overridden every the time the map is deployed. I encounter the same issue if I import a custom pl/sql procedure from the database into OWB using the Metadata Import Wizard and use the imported procedure in a map. However, I can setup an standalone procedure or function as a public transformation and the map deploys successfully. Please advise.
    Regards,
    Matt

    You have to create a job to start your procedure.
    Example :
    * http://psoug.org/reference/OLD/dbms_job.html
    Then create a procedure to start your job, call it from your dashboard and you're done.
    Success
    Nico

Maybe you are looking for