Alert javascript in PL/SQL procedure

Hello,
On clicking on a button to execute an sql command, If I test a value=0, so I would like to show a message like alert("Impossible to do that !");
Is it possible ?
Here is my very simple PL/SQL procedure :
declare
nbwo number(10);
begin
select count(*) into nbwo from [email protected] where lticketid=:P63_lticketid;
if nbwo > 0 then
update [email protected] set etat=1 where lticketid=:P63_lticketid;
commit;
else
"Show a javascript alert"
end if;
end;
Thanks for help,
Fred

Fred,
If you are rendering a page you can make a plsql process generate html that the browser can display. htp.p(' html here');
declare
nbwo number(10);
begin
select count(*) into nbwo from [email protected] where lticketid=:P63_lticketid;
if nbwo > 0 then
update [email protected] set etat=1 where lticketid=:P63_lticketid;
commit;
else
htp.p(' html here');
end if;
end;
However I can see you having some issues.
1: You need to call a page and have this process run while the page renders. It won't work for a submit process. It is still possible.
2: You need to decide what to do with the page you are rendering. You could render the page as normal and just pop this html code in before the footer.
Probably the best bet is to do this with an ajax call. eg press button, call jscript function, jscript function calls database to do this work, database call returns a success or fail message. Display results to user.
I would recommend the ajax call. It works very well for this type of thing.
Chris

Similar Messages

  • Call PL/SQL procedure from htmldb_delete_message Javascript

    Hi Guys,
    I am a bit of a novice when it come to JavaScript; I have written a PL/SQL procedure that deletes multiple records based on a primary key:
    PROCEDURE clear_alterations (p_eco IN VARCHAR2)
    IS
    BEGIN
    DELETE FROM xxmel_apex_eco_alterations
    WHERE eco = p_eco;
    END clear_alterations;
    I can run that straight from a normal button, but I want the htmldb_delete_message dialog box to pop up to confirm whether to delete or not. When the user clicks 'OK' I want the record to be deleted and if cancel, do nothing.
    I have managed to get the confirmation box to appear but cant see how to call the PLSQL based on the 'OK' button being pressed.
    Any help would be great,
    Thanks
    Chris

    Hi Cashy,
    By using Ajax you can call that process. Create that process as a application process. If you are using ApEx4.0 you can create that process as page level.
    This stuff you can call on the population of the delete message...check for the id through javascript then call the function.
    Thanks and Regards
    Maheswara

  • How to call javascript function from PL/SQL procedure

    Can anybody advice me how to call javascript function from PL/SQL procedure in APEX?

    Hi,
    I have a requirement to call Javascript function inside a After Submit Process.
    clear requirement below:
    1. User selects set of check boxes [ say user want to save 10 files and ticks 10 checkboxes]
    2. user clicks on "save files" button
    3. Inside a After submit process, in a loop, i want to call a javascript function for each of the file user want to save with the filename as a parameter.
    Hope this clarify U.
    Krishna.

  • Javascript in pl/sql process block

    Hi,
    Can someone please tell me why this code is not working.....
    I have put this in my pl/sql process....
    htp.p('<script language=javascript>');
    htp.p('var r=confirm("This is a duplicate record , do you want to proceed?");');
    htp.p('if (r==true)');
    htp.p('{document.wwv_flow.submit();}');
    htp.p('else{ }');
    htp.p('</script>');
    Please help
    thanks and regards,
    deepa

    What you need, in your case, is the reverse approach
    – calling PL/SQL from JavaScript code – which is
    possible, using AJAX...
    It seems like what you are trying to do is a
    validation process. Pressing the button should fire a
    JavaScript code, which in turn will fire an on-demand
    PL/SQL procedure, and according to the returned
    results will display a confirm dialog boxHi Arie,
    This is exactly what I am struggling to do, but I don't think is working...is there a good example somewhere, with good documentation saying what goes where? I've tried looking at Carl's On-Demand page example and I just can't tell if I'm following it correctly.
    Based on what is entered in P4_PROJECT_NUM, I need to verify that the value isn't already in the database when the user tabs out of the field.
    My javascript for page 4 (in HTML Header):
    function checkCO()
    var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=validate_value',4);
    get.add('ID', $x('P4_PROJECT_NUM').value)
    gReturn = get.get();
    if(gReturn) // if function return true
    alert($x('P4_PROJECT_NUM').value + ' already exists in database.');
    get = null;
    //-->
    </script>
    My onDemand process, from the Application Processes:
    declare
    v_count number;
    cursor cr_check_co is
    select count(*)
    from usd_changeorders
    where chg_ref_num = v('ID');
    begin
    open cr_check_co;
    fetch cr_check_co into v_count;
    close cr_check_co;
    if (nvl(v_count, 0) = 0) then
    return true;
    else
    return false;
    end if;
    end;
    I am calling the javascript from the onBlur event of the field I want verified.
    I am getting an alert, but it is displaying every time, whether the value is valid or not.
    Can you tell me what I am doing wrong?
    Thanks!!
    Janel

  • Passing parameters to pl/sql procedure called in portal

    Hi all,
    I am trying to use a javascript window.open function to create a small popup window that is populated by a pl/sql procedure from inside portal.
    I am trying to pass it a parameter to refine a SQL query running in that procedure, unfortunately I'm not sure of the syntax. The url that I'm trying to open in the new window looks like this:
    http://my.server.com:7777/portal/pls/portal/myschema.mypackage.myprocedure
    If I just run this, it works fine and the popup window opens correctly and displays all results. If I try to pass a parameter, it errors out with a 404 Page Not Found.
    The parameter itself comes from a text field that the user can enter a value into. I am able to get the value of that text field and append it to the url I'm generating, but I can't find the proper syntax.
    I've tried numerous syntax variants, but none of them seem to work. The procedure does have the parameter defined in both the spec and body and properly handles it. Can anyone point me in the right direction?
    Thanks,
    -Mike Markiw

    You said you have a text field where a user enters a value, so I am assuming that you have form...
    you can try following
    <form action="/pls/portal/myschema.mypackage.myprocedure" method="post">
    your text field "inVar"
    your submit button
    </form>
    I am sure your myprocedure has inVar as an input...
    If you just want to pass a value to a procedure you can always do following:
    http://my.server.com:7777/portal/pls/portal/myschema.mypackage.myprocedure?inVar=the value

  • PL/SQL procedure "Not Defined"

    I have created a PL/SQL procedure, compiled it successfully, and am trying to call it from
    an "onmouseover=" construction in the Link Attributes for a report column.
    I have created an application process entry for this procedure in Shared Components/Application Processes.
    When I place the mouse pointer over the column in the report I get an error stating
    the procedure is "Not Defined".
    I am trying to implement this onmouseover event in a manner similar to how it is implemented in the "Aria People, 0.92" packaged application I have downloaded from the Oracle/APEX web site. In the downloaded "Aria People, 0.92" application I have installed the onmouseover="ARIA_DETAIL(this,'#PERSON_ID#")" call works fine (on page 1 of the app).
    Interestingly, if I take the exact same call to the ARIA_DETAIL() procedure and place it in my application I also get a 'Not Defined' error on the ARIA_DETAIL() procedure.
    Clearly I am failing to do what is needed to have a PL/SQL procedure "Defined" for an APEX application. Can some kind soul please tell me what I have failed to do here?
    Thank you in advance.
    Jim Lewis

    Jim,
    Sorry to go to the basics but am I correct about the following?
    1. You created the pl/sql process as an ondemand process.
    2. You added the ARIA_DETAIL javascript function to the page on which your calling it.
    I'm just guessing but it sounds like you missed the second step there. Take a look at the application you got the code from and look at the Page Attributes. You should see some code in the HTML Header. That's what you need to add to your app.
    Dan

  • Creating page items from pl/sql procedure and using them on a page

    I have a page containing 2 select lists (P21_DEPARTMENTS and P21_DATE). Originally I added them as items that were "select list with submits". The problem is that based on the clearance level of the currently logged on user I only wanted the P21_DEPARTMENTS to be a select list if the user was an administrator. If however the user is not an admin then I want the page to have a hidden form field called P21_DEPARTMENTS that stores the user's department and has a label item that has the department name.
    There is also a report region that generates a table based on the department selected from the select list (if the user is an admin) or the value stored in the hidden form field if the user is not.
    My problem is that I cannot have both those items on the same page and use the HTML built-in authentication to determine which item should be rendered because I need to use the same ID for both items so that the stored procedure in my report region doesn't break. HTML does not permit items to share the same ID.
    I tried to circumvent the problem by creating a stored procedure that performs all of the item rendering in the procedure and uses "htp.p()" to output all of my HTML code. This solution would allow me to pass a parameter into the procedure informing me as to whether or not the user is an administrator. If the user is an administrator the procedure would use a conditional statement and render a select list. If not, the hidden form field and label option would be used instead.
    I finally got the stored procedure working perfectly. Now I am encountering the most bizarre thing. Since the "select list with submit" was not working (I used the same code that gets generated when I created other items using htmlDB's GUI) I decided to use a JavaScript function instead that gets triggered by the onChange event. I send along the value that is currently selected in the select list and in the function I set:
    location.href='http://www.myoraclesite.com/pls/htmldb/f?p=111:21:729740000000000000::NO::P21_DEPARTMENTS:1';
    In theory this should work. The problem is that it doesn't. The page reloads and the P21_DEPARTMENTS select list is not pre-selected.
    The only thing I can think of is that when htmlDB generates page items that you've created with it's own admin tool it assigns some internal guid or something as opposed to when someone tries to generate dynamic page items of their own from a pl/sql procedure it's like the application doesn't even know they exist.
    Any help would be GREATLY appreciated.
    My only other solution would be to create a totally separate page (one for admin and another for non-admin). I would really like to avoid this.
    Thanks in advance.

    I would love to be able to generate my menus and
    various other items in my htmlDB applications in much
    the same way I can using ASP, PHP and Cold Fusion.
    Users should have the ability to write server-side
    code wherever they feel like it. The way htmlDB works
    right now I spend more time trying to figure out how
    to create simple effects and generate simple
    interfaces when I need to be building a portal. Ami - it's important to understand that HTML DB is not like other languages. Thus, trying to force concepts which are common in other languages into HTML DB will often result in more work.
    It's definitely worth the time to go over the HTML DB 2-day Developer, which can be found here: http://www.oracle.com/technology/products/database/htmldb/pdf/B14377_01.pdf
    I can build a portal using Classic ASP, C#, PHP or Cold
    Fusion in like 1/10 of the time that it takes me to
    build one using htmlDB. I understand that this is not
    meant for the hard-core programmer but no web
    programming application in today's day and age should
    prevent experts from getting under the hood.And I can build a Portal in HTML DB in 1/10 the time it will take me to do it in any other language. It's like anything else - proficiency comes with practice and work.
    As for getting under the hood, there is plenty of places you can do that with HTML DB. Keep in mind that HTML DB itself is an HTML DB application, so the limits on what you can build with HTML DB are virtually limitless.
    Sorry for the vent there. After spending the last 2
    days trying to figure out how to implement such a
    straightforward thing and now being informed that it
    can't be done kind of bugged me.I understand your frustration, as I've been there before. My rule for beginners is that if you are writing more than a line or two of code in the first week, you're doing something wrong. Stop, take a break, and then use the ample resources (including searching this forum) to help solve your problem. There are plenty of resources available for you to learn about HTML DB on the HTML DB home page: http://otn.oracle.com/htmldb
    Good luck,
    - Scott -

  • Error while pasing arrays to pl/sql procedure

    Hi,
    I am trying to pass an array from java to pl/sql procedure.
    I tried this code:
    CREATE OR REPLACE TYPE HEADER_UPLOAD IS OBJECT
    (VENDOR_NAME VARCHAR2(240) --hr_all_organization_units.name%TYPE
    ,BILL_TO_CUSTOMER_NAME VARCHAR2(240)-- hz_parties.party_name%TYPE
    ,BILL_TO_CUSTOMER_NUMBER VARCHAR2(240) --hz_cust_accounts.account_number%TYPE
    ,BILL_TO_SITE_USE_ID VARCHAR2(240) --hz_cust_site_uses_all.site_use_id%TYPE
    ,RESELLER_NAME VARCHAR2(240) --hz_parties.party_name%TYPE
    ,RESELLER_ADDRESS_1 VARCHAR2(240)--hz_locations.address1%TYPE
    ,RESELLER_ADDRESS_2 VARCHAR2(240)--hz_locations.address2%TYPE
    ,RESELLER_ADDRESS_3 VARCHAR2(240)--hz_locations.address3%TYPE
    ,RESELLER_ADDRESS_4 VARCHAR2(240)--hz_locations.address4%TYPE
    ,RESELLER_COUNTRY VARCHAR2(240)--hz_locations.country%TYPE
    ,RESELLER_STATE VARCHAR2(240) --hz_locations.state%TYPE
    ,RESELLER_CITY VARCHAR2(240)--hz_locations.city%TYPE
    ,RESELLER_POSTAL_CODE VARCHAR2(240)--hz_locations.postal_code%TYPE
    ,FEDERAL_GOVT_END_USER VARCHAR2(240)
    ,END_USER_NAME VARCHAR2(240)--hz_parties.party_name%TYPE
    ,END_USER_ADDRESS_1 VARCHAR2(240)--hz_locations.address1%TYPE
    ,END_USER_ADDRESS_2 VARCHAR2(240)--hz_locations.address2%TYPE
    ,END_USER_ADDRESS_3 VARCHAR2(240)--hz_locations.address3%TYPE
    ,END_USER_ADDRESS_4 VARCHAR2(240)--hz_locations.address4%TYPE
    ,END_USER_COUNTRY VARCHAR2(240)-- hz_locations.country%TYPE
    ,END_USER_STATE VARCHAR2(240) --hz_locations.state%TYPE
    ,END_USER_CITY VARCHAR2(240) --hz_locations.city%TYPE
    ,END_USER_POSTAL_CODE VARCHAR2(240)--hz_locations.postal_code%TYPE
    ,END_USER_CONTACT_NAME VARCHAR2(240)
    ,END_USER_EMAIL VARCHAR2(2000)
    ,SHIP_TO_CUSTOMER_NAME VARCHAR2(240)--ra_customers.customer_name%TYPE
    ,SHIP_TO_ADDRESS_1 VARCHAR2(240) --hz_locations.address1%TYPE
    ,SHIP_TO_ADDRESS_2 VARCHAR2(240) --hz_locations.address2%TYPE
    ,SHIP_TO_ADDRESS_3 VARCHAR2(240) --hz_locations.address3%TYPE
    ,SHIP_TO_ADDRESS_4 VARCHAR2(240) --hz_locations.address4%TYPE
    ,SHIP_TO_COUNTRY VARCHAR2(240) --hz_locations.country%TYPE
    ,SHIP_TO_STATE VARCHAR2(240) --hz_locations.state%TYPE
    ,SHIP_TO_CITY VARCHAR2(240)--hz_locations.city%TYPE
    ,SHIP_TO_POSTAL_CODE VARCHAR2(240)--hz_locations.postal_code%TYPE
    ,SHIP_TO_CONTACT_NAME VARCHAR2(240)
    ,SHIP_TO_CONTACT_PHONE VARCHAR2(50)
    ,SHIPPING_INSTRUCTIONS VARCHAR2(240)--oe_order_headers_all.shipping_instructions%TYPE
    ,SHIPPING_METHOD VARCHAR2(240) --fnd_lookup_values.meaning%TYPE
    ,ALERT_EMAIL VARCHAR2(2000)
    ,LICENSE_EMAIL VARCHAR2(2000)
    ,ORDER_CONTACT_FIRST_NAME VARCHAR2(150)
    ,ORDER_CONTACT_LAST_NAME VARCHAR2(150)
    ,ORDER_CONTACT_PHONE VARCHAR2(50)
    ,ORDER_CONTACT_FAX_NUMBER VARCHAR2(50)
    ,ORDER_CONTACT_EMAIL VARCHAR2(2000)
    ,NOTES VARCHAR2(4000)
    ,CURRENCY_CODE VARCHAR2(240) --fnd_currencies.currency_code%TYPE
    ,SERVICE_RENEWAL_ORDER varchar2(10)
    ,CUSTOMER_PO_NUMBER VARCHAR2(240) --oe_order_headers_all.cust_po_number%TYPE
    ,RESUBMITTED_ORDER VARCHAR2(10)
    ,PREV_CUSTOMER_PO_NUMBER VARCHAR2(240) --oe_order_headers_all.cust_po_number%TYPE
    ,END_USER_PO_NUMBER VARCHAR2(50)
    ,PO_NET_TOTAL NUMBER
    ,FOB VARCHAR2(240) --fnd_lookup_values.meaning%TYPE
    ,FREIGHT_TERMS VARCHAR2(240) --fnd_lookup_values.meaning%TYPE
    ,FREIGHT_ACCOUNT_NUMBER VARCHAR2(200)
    create or replace type header_upload_tab is table of header_upload;
    java code is: this is a java class which first inserts the csv file data into array headerdata
    public static String[] parseCSV(long l)
    throws SQLException, FrameworkException, IOException
    String s = "parseCSV";
    String lResult[] = new String[3];
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "Start");
    OracleConnection oracleconnection = (OracleConnection)TransactionScope.getConnection();
    OraclePreparedStatement oraclepreparedstatement = null;
    OracleResultSet oracleresultset = null;
    BLOB blob = null;
    long l1 = System.currentTimeMillis();
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "Before fetching the File data from FND_LOBS");
    oraclepreparedstatement = (OraclePreparedStatement)oracleconnection.prepareStatement(" SELECT FILE_DATA FROM FND_LOBS WHERE FILE_ID = :1 ");
    oraclepreparedstatement.defineColumnType(1, 2004);
    oraclepreparedstatement.setLong(1, l);
    try
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "Before Executing the query");
    oracleresultset = (OracleResultSet)oraclepreparedstatement.executeQuery();
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "After Executing the query");
    while(oracleresultset.next())
    blob = (BLOB)oracleresultset.getObject(1);
    finally
    if(oracleresultset != null)
    oracleresultset.close();
    if(oraclepreparedstatement != null)
    oraclepreparedstatement.close();
    if(oracleconnection != null)
    TransactionScope.releaseConnection(oracleconnection);
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "Time taken to get the BLOB object(" + (System.currentTimeMillis() - l1) + " milliseconds)");
    l1 = System.currentTimeMillis();
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "Get the stream from the BLOB");
    InputStreamReader inputstreamreader = new InputStreamReader(blob.getBinaryStream());
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "Before creating the csvreader");
    xxbcIbeOrderUploadCSVReader OrderUploadcsvreader = new xxbcIbeOrderUploadCSVReader(inputstreamreader);
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "After creating the csvreader");
    OrderUploadcsvreader.setFieldSeparator(",");
    OrderUploadcsvreader.setHandleEscapes(true);
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "Before getting the headers");
    // Fetch the Header Record
    ArrayList arraylistH = OrderUploadcsvreader.getHeaders();
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "After getting the headers");
    String s1 = (String)arraylistH.get(0);
    if ("HEADER".equals(s1))
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "Parse and Create the Header Record");
    // Fetch the Header Data. This data will be inserted into Staging table, XXBC_IBE_ORDER_HEADER_IFACE
    ArrayList arraylistHData = OrderUploadcsvreader.readRecord();
    String headerData[] = new String[60];
    for(int i = 1; i < arraylistH.size(); i++) {
    headerData[i] = "";
    for(int i = 1; i < arraylistH.size(); i++)
    String h_element = (String)arraylistH.get(i);
    String h_value = (String)arraylistHData.get(i);
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, h_element);
    if ("VENDOR NAME*".equals(h_element)) headerData[1] = h_value;
    if ("BILL TO CUSTOMER*".equals(h_element)) headerData[2] = h_value;
    if ("BILL TO CUSTOMER NUMBER*".equals(h_element)) headerData[3] = h_value;
    if ("BILL TO SITE NUMBER*".equals(h_element)) headerData[4] = h_value;
    if ("RESELLER*".equals(h_element)) headerData[5] = h_value;
    if ("RESELLER ADDRESS LINE 1*".equals(h_element)) headerData[6] = h_value;
    if ("RESELLER ADDRESS LINE 2".equals(h_element)) headerData[7] = h_value;
    if ("RESELLER ADDRESS LINE 3".equals(h_element)) headerData[8] = h_value;
    if ("RESELLER ADDRESS LINE 4".equals(h_element)) headerData[9] = h_value;
    if ("RESELLER COUNTRY*".equals(h_element)) headerData[10] = h_value;
    if ("RESELLER STATE*".equals(h_element)) headerData[11] = h_value;
    if ("RESELLER CITY*".equals(h_element)) headerData[12] = h_value;
    if ("RESELLER POSTAL CODE*".equals(h_element)) headerData[13] = h_value;
    if ("FEDERAL GOVT END USER".equals(h_element)) headerData[14] = h_value;
    if ("END USER*".equals(h_element)) headerData[15] = h_value;
    if ("END USER ADDRESS LINE 1*".equals(h_element)) headerData[16] = h_value;
    if ("END USER ADDRESS LINE 2".equals(h_element)) headerData[17] = h_value;
    if ("END USER ADDRESS LINE 3".equals(h_element)) headerData[18] = h_value;
    if ("END USER ADDRESS LINE 4".equals(h_element)) headerData[19] = h_value;
    if ("END USER COUNTRY*".equals(h_element)) headerData[20] = h_value;
    if ("END USER STATE*".equals(h_element)) headerData[21] = h_value;
    if ("END USER CITY*".equals(h_element)) headerData[22] = h_value;
    if ("END USER POSTAL CODE*".equals(h_element)) headerData[23] = h_value;
    if ("END USER CONTACT**".equals(h_element)) headerData[24] = h_value;
    if ("END USER CONTACT EMAIL**".equals(h_element)) headerData[25] = h_value;
    if ("SHIP TO CUSTOMER*".equals(h_element)) headerData[26] = h_value;
    if ("SHIP TO ADDRESS LINE 1*".equals(h_element)) headerData[27] = h_value;
    if ("SHIP TO ADDRESS LINE 2".equals(h_element)) headerData[28] = h_value;
    if ("SHIP TO ADDRESS LINE 3".equals(h_element)) headerData[29] = h_value;
    if ("SHIP TO ADDRESS LINE 4".equals(h_element)) headerData[30] = h_value;
    if ("SHIP TO COUNTRY*".equals(h_element)) headerData[31] = h_value;
    if ("SHIP TO STATE*".equals(h_element)) headerData[32] = h_value;
    if ("SHIP TO CITY*".equals(h_element)) headerData[33] = h_value;
    if ("SHIP TO POSTAL CODE*".equals(h_element)) headerData[34] = h_value;
    if ("SHIP TO CONTACT**".equals(h_element)) headerData[35] = h_value;
    if ("SHIP TO CONTACT PHONE NUMBER**".equals(h_element)) headerData[36] = h_value;
    if ("SHIPPING INSTRUCTIONS".equals(h_element)) headerData[37] = h_value;
    if ("SHIPPING METHOD*".equals(h_element)) headerData[38] = h_value;
    if ("ALERT EMAIL*".equals(h_element)) headerData[39] = h_value;
    if ("LICENSE EMAIL**".equals(h_element)) headerData[40] = h_value;
    if ("ORDER CONTACT FIRST NAME*".equals(h_element)) headerData[41] = h_value;
    if ("ORDER CONTACT LAST NAME*".equals(h_element)) headerData[42] = h_value;
    if ("ORDER CONTACT PHONE NUMBER*".equals(h_element)) headerData[43] = h_value;
    if ("ORDER CONTACT FAX NUMBER".equals(h_element)) headerData[44] = h_value;
    if ("ORDER CONTACT EMAIL*".equals(h_element)) headerData[45] = h_value;
    if ("NOTES".equals(h_element)) headerData[46] = h_value;
    if ("CURRENCY*".equals(h_element)) headerData[47] = h_value;
    if ("SERVICE RENEWAL ORDER".equals(h_element)) headerData[48] = h_value;
    if ("CUSTOMER PO NUMBER*".equals(h_element)) headerData[49] = h_value;
    if ("RESUBMISSION*".equals(h_element)) headerData[50] = h_value;
    if ("PREVIOUS CUSTOMER PO NUMBER**".equals(h_element)) headerData[51] = h_value;
    if ("END USER PO NUMBER".equals(h_element)) headerData[52] = h_value;
    if ("PO NET TOTAL*".equals(h_element)) headerData[53] = h_value;
    if ("FOB*".equals(h_element)) headerData[54] = h_value;
    if ("FREIGHT TERMS*".equals(h_element)) headerData[55] = h_value;
    if ("FREIGHT ACCOUNT NUMBER".equals(h_element)) headerData[56] = h_value;
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, (String)headerData);
    } // End of processing Header Data
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "Insert the Header Record into Interface Table");
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, (String)headerData[1]);
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, (String)headerData[2]);
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "checkpoint");
    oracleconnection = (OracleConnection)TransactionScope.getConnection();
    oracleconnection.setAutoCommit(true);
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "After getting connection");
    ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor( "HEADER_UPLOAD_TAB", oracleconnection );
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "before new array");
    ARRAY array_to_pass = new ARRAY( descriptor, oracleconnection, headerData );
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "calling procedure");
    OraclePreparedStatement ps =
    (OraclePreparedStatement)oracleconnection.prepareStatement ( "BEGIN insert_data(:1); END;" );
    ps.setARRAY( 1, array_to_pass );
    ps.execute();.......continued
    the above code executes till the message :---IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "before new array");
    after that it gives error as :---Exception=java.sql.SQLException: Fail to convert to internal representation
    Kindly Help....
    Thanks in advance
    Gaurav

    Gaurav,
    Just a guess, but try the following:
    ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor( "SCOTT.HEADER_UPLOAD_TAB", oracleconnection );In other words, prefix the data-type name, HEADER_UPLOAD_TAB, with its schema owner name.
    Good Luck,
    Avi.

  • 403 Forbidden error calling PL/SQL Procedure from URL

    I am getting a 403 Forbidden browser error when calling a PL/SQL procedure from the URL, as in this:
    http://<server.port>/apex/SCHEMA.procedure_name/f?p_param1=394&p_param2=2, etc
    We are upgrading from HTMLDB 2.0 to APEX 4.0.2. I do not believe the upgrade has anything to do with it, c/o the upgraded app works fine in another APE 4.0.2 environment.
    The upgrade is to new machines, new DB and new app server, Oracle Web Tier, Oracle HTTP server deployment.
    The dads.conf entries are fine, all standard:
    Alias /i/ "/apexd01/app/oracle/product/http/Oracle_WT1/ohs/images/"
    Alias /c/ "/apexd01/app/oracle/product/http/Oracle_WT1/ohs/custom_htmldb/"
    <Location /pls/apexd>
    Order deny,allow
    PlsqlDocumentPath docs
    AllowOverride None
    PlsqlDocumentProcedure wwv_flow_file_mgr.process_download
    PlsqlDatabaseConnectString dbserver.us.com:1521:SERVER.US.COM ServiceNameFormat
    PlsqlNLSLanguage AMERICAN_AMERICA.AL32UTF8
    PlsqlAuthenticationMode Basic
    SetHandler pls_handler
    PlsqlDocumentTablename wwv_flow_file_objects$
    PlsqlDatabaseUsername APEX_PUBLIC_USER
    PlsqlDefaultPage apex
    PlsqlDatabasePassword apexpwd
    PlsqlRequestValidationFunction wwv_flow_epg_include_modules.authorize
    Allow from all
    </Location>
    The GRANT EXECUTE ON procedure TO PUBLIC is there.
    A call to the same procedure via a process in an APEX page works fine - the procedure is OK.
    The call from javascript, which sets up the call from the URL, is the one that fails with the 403 Forbidden error.
    The same app works fine in another APEX 4.0.2 environment, so I know it is not the JS; It has to be some configuration setting in this environment.
    I do NOT have access to the app server.
    I have asked that they compare the httpd.conf, and all underlying conf files, to check for differences.
    In order for me to be more specific, and hopefully speed up the troubleshooting process, can anyone suggest what other settings to look at?
    Thank you - Karen

    Hello,
    Good catch, but the difference in URL is in fact the difference in my env to theirs. My typo in not correcting my example to match the dads.conf entry of /pls/apexd. My env uses /apex/. Just saves on my typing.
    As an update, I asked the DBA to double-check, and yes, the www_flow_epg_include_mod_local function IS there.
    www_flow_epg_include_mod_local is an APEX function.
    So now we are trying adding procedures to it. I'll let you know if it works.
    My previous question remains - why would I need to do this in one env, and not another,
    given that the DB GRANTs are there.
    Is there a particular app server setting that wil block execution of PL/SL procedures from the URL?
    My guess is, there is some difference in configuration settings for the app server, somewhere in the httpd.conf chain.
    Since I do not have access to those files, I cannot do a diff myself, as I would have if I the issue was on my machine.
    I am in a situation where I can suggest what to do, but that's it. I agree, it's hard to troubleshoot in this situation.
    I am being asked "what setting do I need to change?" without the benefit of access to what is there,so I am doing the best I can, without diverting from my work for a deep-dive refresher session on httpd.conf settings.
    So, if anyone is aware of some setting that would block execution of a PL/SQL proc from the URL, please let me know,
    and of course, if adding a proc to www_flow_epg_include_mod_local works, I'll be happy. Just still curious.
    Thank you - K

  • Debug PL/SQL procedure

    I have a PL/SQL, HTML, JavaScript procedure that is giving me a HTTP 404 error when I press the 'SUBMIT' button. I have tried to trap it in the procedure but am unable.
    Does anyone know what parameter(s) need to be turned on in the Apache server to debug the PL/SQL procedure? I have heard that turning on this parameter will only affect the database I'm in and is not global.
    It is suppose to show all the variable and whatever else is pertinent.
    Thank you,

    thanks a ton! I'll give this a try. Does the dbs_debug_jdwp.connect_tcp(ip,port) have to be in the called procedure?

  • Notification via PL/SQL procedures

    1. Has anybody done notification via PL/SQL procedures in EM release 2?
    2. How do you setup Critical Alerts to be send to Pager and Warnings to Email?
    Please provide step by step it would help.
    Thanks
    George

    I have created PROCEDURE LOG_CRITICAL_ALERTS ok, but how do I use this new method PL/SQL to send Pager Alert?

  • Unable to capture the parameter values from a PL/SQL procedure

    hi.
    i'm trying to capture the parameter values of a PL/SQL procedure by calling inside a anonymous block but i'm getting a "reference to uninitialized collection error" ORA-06531.
    Please help me regarding.
    i'm using following block for calling the procedure.
    declare
    err_cd varchar2(1000);
    err_txt VARCHAR2(5000);
    no_of_recs number;
    out_sign_tab search_sign_tab_type:=search_sign_tab_type(search_sign_type(NULL,NULL,NULL,NULL,NULL));
    cntr_var number:=0;
    begin
         rt843pq('DWS','3000552485',out_sign_tab,no_of_recs,err_cd,err_txt);
         dbms_output.put_line('The error is ' ||err_cd);
         dbms_output.put_line('The error is ' ||err_txt);
         dbms_output.put_line('The cntr is ' ||cntr_var);
         for incr in 1 .. OUT_SIGN_TAB.count
         loop
         cntr_var := cntr_var + 1 ;
    Dbms_output.put_line(OUT_SIGN_TAB(incr).ref_no||','||OUT_SIGN_TAB(incr).ciref_no||','||OUT_SIGN_TAB(incr).ac_no||','||OUT_SIGN_TAB(incr).txn_type||','||OUT_SIGN_TAB(incr).objid);
    end loop;
    end;
    Error is thrown on "for incr in 1 .. OUT_SIGN_TAB.count" this line
    Following is some related information.
    the 3rd parameter of the procedure is a out parameter. it is a type of a PL/SQL table (SEARCH_SIGN_TAB_TYPE) which is available in database as follows.
    TYPE "SEARCH_SIGN_TAB_TYPE" IS TABLE OF SEARCH_SIGN_TYPE
    TYPE "SEARCH_SIGN_TYPE" AS OBJECT
    (ref_no VARCHAR2(22),
    ciref_no VARCHAR2(352),
    ac_no VARCHAR2(22),
    txn_type VARCHAR2(301),
    objid VARCHAR2(1024))............

    We don't have your rt843pq procedure, but when commenting that line out, everything works:
    SQL> create TYPE "SEARCH_SIGN_TYPE" AS OBJECT
      2  (ref_no VARCHAR2(22),
      3  ciref_no VARCHAR2(352),
      4  ac_no VARCHAR2(22),
      5  txn_type VARCHAR2(301),
      6  objid VARCHAR2(1024))
      7  /
    Type is aangemaakt.
    SQL> create type "SEARCH_SIGN_TAB_TYPE" IS TABLE OF SEARCH_SIGN_TYPE
      2  /
    Type is aangemaakt.
    SQL> declare
      2    err_cd varchar2(1000);
      3    err_txt VARCHAR2(5000);
      4    no_of_recs number;
      5    out_sign_tab search_sign_tab_type:=search_sign_tab_type(search_sign_type(NULL,NULL,NULL,NULL,NULL));
      6    cntr_var number:=0;
      7  begin
      8    -- rt843pq('DWS','3000552485',out_sign_tab,no_of_recs,err_cd,err_txt);
      9    dbms_output.put_line('The error is ' ||err_cd);
    10    dbms_output.put_line('The error is ' ||err_txt);
    11    dbms_output.put_line('The cntr is ' ||cntr_var);
    12    for incr in 1 .. OUT_SIGN_TAB.count
    13    loop
    14      cntr_var := cntr_var + 1 ;
    15      Dbms_output.put_line(OUT_SIGN_TAB(incr).ref_no||','||OUT_SIGN_TAB(incr).ciref_no||','||OUT_SIGN_TAB(incr).ac_no||','||OUT_SIGN
    TAB(incr).txntype||','||OUT_SIGN_TAB(incr).objid);
    16    end loop;
    17  end;
    18  /
    The error is
    The error is
    The cntr is 0
    PL/SQL-procedure is geslaagd.Regards,
    Rob.

  • 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

  • How to call a PL/SQL procedure from Portal

    Env.Info: Windows NT Server 4 (Service Pack 3) / Oracle 8i R3 EE / Oracle Portal 3.0 Production.
    I created a new schema "BISAPPS" and created a user with the same name. Ran provsyns.sql script to grant Portal API access. Created a new package under this new schema and compiled it against the database. After that I registered the schema as a portal provider. There were no errors.
    Now I logged into Portal using the account PORTAL30. Refreshed the portlet repository and the new portlets appeared. I added the new portlet to the page. It is displayed successfully.
    New portlet allows the user to enter a bug-number and lets the user to either view or edit. If the user clicks on the button "Edit", it opens a new window and displays the contents from BugDB application. But if the user clicks on "Show", it should display the output generated by a PL/SQL procedure (Owned by the above New Schema - BISAPPS) in a separate window. But instead it is displaying the following error in the separate window:
    bisapps_pkg.buginfo: PROCEDURE DOESN'T EXIST.
    DAD name: PORTAL30
    PROCEDURE : bisapps_pkg.buginfo
    URL : http://host_name:80/pls/portal30/bisapps_pkg.buginfo
    And list of environment variables ....
    Can anyone help me? How can I call a PL/SQL procedure when the button is clicked? Thanks in advance.

    You must grant EXECUTE privilege on your procedure to the PORTAL30_PUBLIC user. If the error still persists, create a PUBLIC synonym for your procedure.

Maybe you are looking for

  • My iPod 4th Gen won't restore?

    It's stuck in recovery mode and it won't connect to iTunes when I plug it into my laptop, and when it did, I waited for half an hour for it to update, then it came up with an error. I had to update to a different version and it wouldn't do it actuall

  • Condition Type entered twice per item

    Dear SAP Guru's, I have an issue. In the sales order discount condition types can be entered manually. I want to restrict the condition type to enter once only, system should not allow to enter the same condition type for more than once (per item). C

  • SAP not printing LCR with all WP invoices

    Hi! I have to build a query to identify missing output ZD00(LCR-load confirmation contract) for sales org ca01, billing type ZOF2 invoices of sales document type ZWP. For this I started with a infoset and joined tables vbrk,vbrp,vbak,nast. Here as pe

  • [ASP] Borrar imagen asociada

    Buenos dias, yo uso un backoffice para mis webs hecho en ASP. Para introducir elementos en la base de datos (access) las imagenes las coloco en el servidor con Persits.Upload. Mi problema es que cuando elimino un elemento de la base de datos, por eje

  • N85 warranty and Camera shutter key problem

    Hi, I have had an N85 for around a year now, and I have had some problems with the phone. The phone has been cared for well, and now the shutter button on the camera has broken. I took it to my local repair centre, and was told that it wasnt covered