BIP 11G - Retrieving a cursor from a function defined in a package

We had previously deployed reports in OBIP 10G....
The reports deployed in OBIP 10G used an XDO file to interact with the database and return data in XML format.
This action used to be defined in the ‘sqlStatement’ tag of the XDO file.
<dataQuery>
<sqlStatement name="Q1"> select PK_AP_GEN_REP.AP_GEN_REP('AP_CH_R101',1) FROM DUAL </sqlStatement>
</dataQuery>
For this it would invoke our package called ‘PK_AP_GEN_REP’ and pass the report specific function name ('AP_CH_R101') to it as an input parameter.
This returned a cursor.
Hereafter the resultant cursor from above would get each column mapped with those mentioned in ‘dataStructure’ tags of XDO file to form an XML file.
Currently we are trying the same in OBIP 11G.
We are creating the dataset with SQL query
The problem is that the SQL statement “select PK_AP_GEN_REP.AP_GEN_REP('AP_CH_R101',1) FROM DUAL” is not effective.
Also if the above query is fired it does not retrieve the column names to define the data structure.
Solutions tried:-
1.     Forcefully defining the data-structure in XDM file created for this report. This did not work.
2.     Firing a Before “Event Trigger”. This only works if the function is returning a Boolean and not a cursor.
We tried modifying the function to return a Boolean and to populate the report specific table which could be queried to fetch the records.
We defined Oracle DB Default Package = PK_AP_GEN_REP
We defined the trigger as PK_AP_GEN_REP.AP_GEN_REP('AP_CH_R101',1)
Now creating the dataset with SQL query does not return any data.
It is giving the following error:-
"XML document must have a top level element. Error processing resource 'http://iflmud5im00094:9704/xmlpserver/servlet/xdo'."
However the query fires if Oracle DB Default Package is reset to nothing...But in this case the event trigger did not fire.
If there is a wayout involving any of the above 2 steps or any other way please share the solution
Kindly let me know how I may handle this issue of Retrieving a cursor from a function defined in a package in BIP 11g.

Further regarding this....
Not sure regarding performance issues of using pipelined functions
Just to share with you that instead of what you suggested I have tried out returning a 'table' type object from a PL/SQL function after CAST ing the required query to this Object.
Stretching the discussion forward, is there a way to cast a ref cursor into a plsql table.
This could absolutely fit my requirement...
Thanks in advance

Similar Messages

  • Calling function defined in one package

    Hi,
    I have a package ABC. In that I have a function xxx(param1,param2,param3)
    I have a 2nd package XYZ. I need to use the above functionxxx in package XYZ and assign it to a vriable. How do i do it
    Please guide me.
    Thanks

    shipment_to_siebel.get_prod_userkeys(r_stage_rec.material_number, r_stage_rec.sales_org, r_stage_rec.distribution_channel);Now show the definition of this code from shipment_to_siebel package body.
    I guess you decided not to take the time to read the FAQ link posted to you.
    Let me tell again
    Your code format gets lost when you post it in the Oracle Forum. So in order to preserve it you need to
    use the {noformat}{noformat} tags.
    The usage of the tag is like this.
    <place your code here>\                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Retrieving cursor from a stored procedure

    Hi,
    Is there any means to retrieve a cursor from a stored procedure using java.sql.* package, without using database specific type code like OracleTypes.CURSOR?
    Regards,
    Shalin.

    Hi,
    I had some across this problem some time ago. Although, there is no direct answer to this solution, there is a "kloog" that you can apply.
    Please note that the signature for registerOutParameter(int parameterIndex, int sqlType), and note that where ever sqlType is mentioned it is an int.
    Now JDBC is an interface and the implementation is given by Oracle. So to register an "out" parameter all you have to do is registerOutParameter(1, OracleTypes.CURSOR). It works!
    Or otherwise try and find out what the int value of CURSOR is and replace. This is because not all databases can support returning a "cursor" type, since ORACLE and few other databases have a concept of "STORED PROCEDURE" and PLSQL is specific to ORACLE.
    I hope this helps!
    Cheers,
    John.

  • BIP 11g event triggers

    Hi,
    I'm setting up a data model in the BIP 11g standalone version. I've created a PL/SQL package with a function that returns boolean. In BIP 11g I can create an event trigger and I can see the function listed in the Available Functions box( just like page 12-2 of the Oracle Fusion Middleware Report Designer's Guide for Oracle Business Intelligence Publisher states). However, the arrow to select the function does not work. Has anyone validated that this works as designed?
    Thanks,
    Sunder

    Hi SIyer,
    I am trying the same issue and tried in Firefox as well but not able to find the functions listed in the BIPDB for the package created, please let me know if i am missing something. Please find below my package spec.
    Please advise.
    Thanks
    RS
    CREATE OR REPLACE PACKAGE xxcc_fa_aplus_pkg AUTHID CURRENT_USER
    AS
    p_period VARCHAR2( 100 );
    p_book VARCHAR2( 100 );
    p_quarter VARCHAR2( 10 );
    p_report NUMBER;
    PROCEDURE xxcc_get_summary(
    p_period VARCHAR2
    ,p_book VARCHAR2
    ,p_quarter VARCHAR2
    PROCEDURE xxcc_get_sdetail(
    p_period VARCHAR2
    ,p_book VARCHAR2
    ,p_quarter VARCHAR2
    PROCEDURE xxcc_get_detail(
    p_period VARCHAR2
    ,p_book VARCHAR2
    ,p_quarter VARCHAR2
    FUNCTION afterpform
    RETURN BOOLEAN;END xxcc_fa_aplus_pkg;
    /

  • How to use the Table Function defined  in package in OWB?

    Hi,
    I defined a table function in a package. I am trying to use that in owb using Table function operator. But I came to know that, owb R1 supports only standalone table functions.
    Is there any other way to use the table function defined in a package. As like we create synonyms for functions, is there any other way to do this.
    I tryed to create synonyms, it is created. But it is showing compilation error. Finally I found that, we can't create synonyms for functions which are defined in packages.
    Any one can explain it, how to resolve this problem.
    Thank you,
    Regards
    Gowtham Sen.

    Hi Marcos,
    Thank you for reply.
    OWB R1 supports stand alone table functions. Here what I mean is, the table fucntion which is not inculded in any package is a stand alone table function.
    for example say sample_tbl_fn is a table function. It is defined as a function.It is a stand alone function. We call this fucntion as "samp_tbl_fn()";
    For exampe say sample_pkg is a package. say a function is defined in a package.
    then we call that function as sample_pkg.functionname(); This is not a stand alone function.
    I hope you understand it.
    owb supports stand alone functions.
    Here I would like to know, is there any other way to use the functions which are defined in package. While I am trying to use those functions (which are defined in package -- giving the name as packagename.functionname) it is throwing an error "Invalid object name."
    Here I would like know, is there any other way to use the table functions which are defined in a package.
    Thank you,
    Regards,
    Gowtham Sen.

  • Passing parameter to Function in select clause BIP 11g

    Hi,
    I am developing a dataset where i ahave to pass Parameter to a function which retrives the cursor in BIP 11g
    below is the SQL:
    select cizcompfn(:P_USER_ID) COMPANY_INFO,
    cizinstfn(:P_REPORT_CD, :P_USER_ID) CURRENCY_INFO,
    sysdate AS PRINT_DATE_TIME_INFO,
    cizlballfn(:P_REPORT_CD, :P_USER_ID) LABEL_INFO,
    cipacsvpfn(:P_USER_ID, to_char(:P_FROM_DT,'yyyy-MM-dd') ,
    to_char(:P_TO_DT, 'yyyy-MM-dd')) RETURN_CODE_INFO, rpt_option_val SERVER
    FROM ci_rpt_option where rpt_opt_flg = 'RPSV'
    I have created the 4 parameters :P_USER_ID, :P_REPORT_CD , :P_FROM_DT and :P_TO_DT
    I am not getting the result generated.
    If develop the dataset in BIP 10g, this working fine.
    Please, let me know what needs to changed so that it works in BIP11g.
    Regards,
    Hemanth

    I am getting the result like this:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <!-- Generated by Oracle BI Publisher 11.1.1.5.0
    -->
    - <DATA_DS>
    <P_TO_DT>2010-01-01T00:00:00.000-05:00</P_TO_DT>
    <P_FROM_DT>2000-01-01T00:00:00.000-05:00</P_FROM_DT>
    <P_REPORT_CD>CI_ACSVPR</P_REPORT_CD>
    <P_USER_ID>CDX</P_USER_ID>
    - <G_1>
    <PRINT_DATE_TIME_INFO>2012-05-11T07:22:57.000-04:00</PRINT_DATE_TIME_INFO>
    <SERVER>http://server-name:port-number</SERVER>
    </G_1>
    </DATA_DS>
    Value for two columns:
    sysdate AS PRINT_DATE_TIME_INFO
    rpt_option_val SERVER
    which are straight forward columns.
    When i pass hardcoded values instaed of parameters I get the XML:
    Below is the SQL:
    select cizcompfn('CDX') COMPANY_INFO, cizinstfn('CI_ACSVPR', 'CDX') CURRENCY_INFO, sysdate AS PRINT_DATE_TIME_INFO,
    cizlballfn('CI_ACSVPR', 'CDX') LABEL_INFO,
    cipacsvpfn('cdx', to_char('05-may-1900') ,to_char( '05-may-2012')) RETURN_CODE_INFO,
    rpt_option_val SERVER from ci_rpt_option where rpt_opt_flg = 'RPSV'
    Edited by: 931007 on May 11, 2012 7:29 AM

  • Retrieve to forms 6i a ref cursor from a store procedure

    hi, i wanna know how to retrieving to forms 6i a ref cursor or a sys_refcursor from a function or a store procedure.
    i`ll be very gradeful if someone send me the code.
    sorry about my english, the spanish is my native languaje.

    I think you can use procedure similar to this one:
    example:
    My sample table:
    SQL> desc small_perf_table1;
    Name                                      Null?    Type
    COL1                                               NUMBER
    COL2                                               VARCHAR2(10)
    COL3                                               VARCHAR2(1)
    Simple data inside:
    SQL> select col1 from small_perf_table1
      2  where rownum < 10;
          COL1
             1
             2
             3
             4
             5
             6
             7
             8
             9
    9 rows selected.
    Create procedure which return variable sys_refcursor type:
    SQL> CREATE OR REPLACE PROCEDURE proc_cursor_test
      2  (v_cursor OUT sys_refcursor)
      3  IS
      4  BEGIN
      5   OPEN v_cursor FOR select col1 from small_perf_table1 where rownum < 10;
      6  END;
      7  /
    Procedure created.
    And here is code you can write inside forms:
    SQL> DECLARE
      2   type t_cursor IS REF CURSOR;
      3   v_cursor t_cursor;
      4   v_col1 NUMBER;
      5  BEGIN
      6   proc_cursor_test(v_cursor);
      7   LOOP
      8     FETCH v_cursor INTO v_col1;
      9     EXIT WHEN v_cursor%NOTFOUND;
    10     -- DBMS_OUTPUT.PUT_LINE(v_col1); This line is only for testing inside SQL*PLUS.
    11   END LOOP;
    12  END;
    13  /
    1
    2
    3
    4
    5
    6
    7
    8
    9
    PL/SQL procedure successfully completed.This is just an example.
    If this example does not resolve your problems then maybe you should ask your question on forms forum.
    Forms
    Peter D.

  • Question about cursors in a function and how to return the results

    Hi all,
    Some tech info:
    I'm using Oracle 11G database and APEX 4.0.2.00.06
    I use three cursors in a function. My function is called in an APEX standard report, like this by example:
    SELECT fnc_exp(tab.arg1, tab,arg2) FROM table_exp tab;
    My question is: how can I return the values calculated from my function to a standard APEX report? Before, this function was used like this by Oracle Forms to fetch the cursors in the right table columns:
    open c_a;
    fetch c_a into :loc.arg1;
    close c_a;
    open c_b;
    fetch c_b into :loc.arg2, :loc.arg3, :loc.arg4, :loc.arg5;
    close c_b;
    Thanks for your advices!
    Maybe my solution is not right, if you have better ideas, please suggest :)
    PS: If you need more details, please ask which you need.

    Hi,
    I don't think you can do exactly like that in APEX.
    Go for a pipelined function if you want the value be returned from the function.

  • Multiple values from a function

    Hi ,
    I have a package spec and body like below and now i wanted to call a function to get the multiple records from the below mentioned record type (temp_cv).
    How can i assign the values into variables from the temp_cv record , after getting the values i have to do further process with these values looking for your valuable help.. Thanks
    create or replace PACKAGE timelabel IS
    type time_rec is RECORD
    (unit number,
    inspec varchar(10),
    status varchar(10));
    type time_cv is REF CURSOR return time_rec;
    function initialrefc(p_status varchar2) return time_cv;
    END;
    create or replace PACKAGE BODY timelabel IS
    function initialrefc(p_status varchar2) return time_cv is
    temp_cv timelabel.time_cv;
    begin
    open temp_cv for select unit,inspec,status
    from timezero where status =p_status;
    return temp_cv;
    end;
    END;

    here is a good example of ref cursor return results
    http://www.oracle-base.com/articles/8i/UsingRefCursorsToReturnRecordsets.php
    http://www.psoug.org/reference/ref_cursors.html

  • How to retrieve 2 values from a table in a LOV

    Hi
    I'm pretty new to APEX. I try to retrieve two values from a table using a LOV. I have a table named DEBIT with then columns SITE, NAME and KEY
    I want to display NAME to the user in a list. When the user select an item from the list, I want to retrieve the data of the SITE and KEY column of this item in order to launch an SQL command based on this two values.
    How to retrieve thes two values whant the user chooses an item from the list ?
    I apologize for my english, being french.
    Regards.
    Christian

    Christian,
    From what I understood about your requirement, you want a 'select list with submit' which displays "NAME" and based on the value selected, you want to get the corresponding values for "SITE" and "KEY" from the table.
    <b>Step 1: Create a select list with submit, say P1_MYSELECT </b><br><br>
    Use something like this in the dynamic list of values for the select list: <br>
    SELECT NAME display_value, NAME return_value
    FROM DEBIT<br><br>
    <b>Step 2: Create a page process of type PL/SQL block. Also create 2 hidden items P1_KEY and P1_SITE. </b><br><br>
    In the PL/sQL, write something like:
    DECLARE
      v_key DEBIT.KEY%TYPE;
      v_site DEBIT.SITE%TYPE;
      CURSOR v_cur_myvals IS
              SELECT KEY, SITE
              FROM DEBIT
              WHERE NAME = :P1_MYSELECT;
    BEGIN
      OPEN v_cur_myvals;
      LOOP
              FETCH v_cur_myvals
              INTO  v_key,v_site;
              EXIT WHEN v_cur_myvals%NOTFOUND;
    :P1_KEY := v_key;   
    :P1_SITE := v_site; 
      END LOOP;
      CLOSE v_cur_myvals;
    END; <br><br>
    Then you can use these values for whatever purpose you need to.
    Hope this helps.

  • How to retrieve multiple data from table and represent it in jsp page

    Hi
    The below JavaScript code is used to add row in the table when I want to add multiple row data into table for single entry no field.
      <html>  function addRow()
                i++;
                var newRow = document.all("tblGrid").insertRow();
                var oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='srno"+i+"' type='text' id='srno"+i+"' size=10>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='itmcd"+i+"' type='text' id='itmcd"+i+"' size='10'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='itmnm"+i+"' type='text' id='itmnm"+i+"' size='15'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='indentqty"+i+"' type='text' id='indentqty"+i+"' size='10'>";
                oCell = newRow.insertCell();
                    oCell.innerHTML = "<input name='uom"+i+"' type='text' id='uom"+i+"' size='10'><input type='hidden' name='mcode"+i+"'id='mcode"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='packqty"+i+"' type='text' id='packqty"+i+"' size='10'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='packuom"+i+"' type='text' id='packuom"+i+"' size='10'><input type='hidden' name='pack"+i+"' id='pack"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='rate"+i+"' type='text' id='rate"+i+"' size='10'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='dor"+i+"' type='text' id='dor"+i+"' size='0' onClick='"+putdate(this.name)+"'>";           
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='bccode"+i+"' type='text' id='bccode"+i+"' size='10'></td><input type='hidden' name='bcc"+i+"' id='bcc"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='cccode"+i+"' type='text' id='cccode"+i+"' size='10'></td><input type='hidden' name='ccc"+i+"' id='ccc"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='remark2"+i+"' type='text' id='remark2"+i+"' size='20'>";           
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input type='button' value='Delete' onclick='removeRow(this);' />";
               // oCell = newRow.insertCell();
               // oCell.innerHTML = "<input type='button' value='Clear' onclick='clearRow(this);' />";
            }<html>  Then this data are send to the next Servlet for adding into two table.
    My header portion data are added into one table which added only one row in table. while footer section data are added into the no of rows in another table dependent on No. of
    Rows added into jsp page.
    Here is an code for that logic.
    <html>
    ArrayList<String> mucode = new ArrayList<String>();
                                ArrayList<Integer> serials = new ArrayList<Integer>();
                                ArrayList<Integer> apxrate = new ArrayList<Integer>();
                                ArrayList<Integer> srname = new ArrayList<Integer>();
                                ArrayList<String> itcode = new ArrayList<String>();
                                ArrayList<String> itname = new ArrayList<String>();
                                ArrayList<Integer> iqnty = new ArrayList<Integer>();
                                ArrayList<String> iuom = new ArrayList<String>();
                                ArrayList<Integer> pqnty = new ArrayList<Integer>();
                                ArrayList<String> puom1 = new ArrayList<String>();
                               ArrayList<Integer> arate = new ArrayList<Integer>();
                                ArrayList<String> rdate = new ArrayList<String>();
                                ArrayList<String> bcs = new ArrayList<String>();
                                ArrayList<String> ccs = new ArrayList<String>();
                                ArrayList<String> remarkss = new ArrayList<String>();
                                //ArrayList<Integer> qtyrecs = new ArrayList<Integer>();
                                //ArrayList<String> dors = new ArrayList<String>();
                                //ArrayList<String> remarks = new ArrayList<String>();
                     String entryn = request.getParameter("entryno");       
                        String rows = request.getParameter("rows");
                        out.println(rows);  
                        //String Entryno = request.getParameter("entryno");
                       // out.println(Entryno);
                      int entryno = 0,reqqty = 0,srno = 0,deprequest = 0,rowcount = 0;
                                if(!Entryno.equals("")){
                                        entryno = Integer.valueOf(Entryno);
                                if(!rows.equals("")){
                                        rowcount = Integer.valueOf(rows);
                               for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("srno"+i)!=null){
                                                serials.add(Integer.valueOf(request.getParameter("srno"+i).trim()));
                                                out.println(serials.size());
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("srno"+i)!=null){
                                                srname.add(Integer.valueOf(request.getParameter("srno"+i).trim()));
                                out.println(srname.get(0));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("itmcd"+i)!=null){
                                                itcode.add(request.getParameter("itmcd"+i).trim());
                                        } //out.println(itcode.get(i));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("itmnm"+i)!=null){
                                                itname.add(request.getParameter("itmnm"+i).trim());
                                        }//out.println(itname.get(i));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("indentqty"+i)!=null){
                                                iqnty.add(Integer.valueOf(request.getParameter("indentqty"+i).trim()));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("uom"+i)!=null){
                                                iuom.add(request.getParameter("uom"+i).trim());
                                        }//out.println(iuom.get(i));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("mcode"+i)!=null){
                                                mucode.add(request.getParameter("mcode"+i).trim());
                               for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("packqty"+i).equals("")){
                                          pqnty.add(0);
                                        }else
                                            pqnty.add(Integer.valueOf(request.getParameter("packqty"+i).trim()));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("pack"+i)!=null){
                                                puom1.add(request.getParameter("pack"+i).trim());
                                       }else
                                        puom1.add("");
                               for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("rate"+i).equals("")){                                     
                                            arate.add(0);
                                        }else
                                        arate.add(Integer.valueOf(request.getParameter("rate"+i).trim()));   
                     /* for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("rate"+i)!=null){
                                                arate.add(Integer.valueOf(request.getParameter("rate"+i).trim()));
                              for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("dor"+i)!=null){
                                                try{
                                                        rdate.add(dashdate.format(slashdate.parse(request.getParameter("dor"+i).trim())));
                                                }catch(ParseException p){p.printStackTrace();}
                                        }else
                                           { rdate.add("");}
                                   for(int i=1;i<=rowcount;i++){
                                 if(request.getParameter("bcc"+i)!=null){
                                                bcs.add(request.getParameter("bcc"+i).trim());
                                        }out.println(bcs.get(0));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("ccc"+i)!=null){
                                                ccs.add(request.getParameter("ccc"+i).trim());
                                        }out.println(ccs.get(0));
                                for(int i=1;i<=rowcount;i++){
                                    out.println("remark2");
                                        if(request.getParameter("remark2"+i)!=null){
                                                remarkss.add(request.getParameter("remark2"+i).trim());
                                        }out.println(remarkss.get(0));
                        ArrayList<String> Idate = new ArrayList<String>();
                        for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("dateindent"+i)!=null){
                                                try{
                                                        Idate.add(dashdate.format(dashdate.parse(request.getParameter("dateindent"+i).trim())));
                                                }catch(ParseException p){p.printStackTrace();}
                    String Rdate = dashdate.format(new java.util.Date());
                     String tdate = dashdate.format(new java.util.Date());    
                     // String Indentdate = dashdate.format(new java.util.Date());
                   //  String ApprovedT1 = dashdate.format(new java.util.Date());
                   //  String ApprovedT2 = dashdate.format(new java.util.Date());
                       // String ApprovedT1=" ";
                        //String ApprovedT2="";*/
                    String ApprovedT1= dashdate.format(new java.util.Date());
                   out.println (ApprovedT1);
                      String ApprovedT2=dashdate.format(new java.util.Date());
                       out.println(ApprovedT2);
                    String Indentdate=(dashdate.format(slashdate.parse(request.getParameter("dateindent").trim())));
                       out.println(Indentdate);
                        String Cocode ="BML001";  
                        out.println(Cocode);
                        String Deptcode = request.getParameter("dept1");
                        out.println(Deptcode);
                        String Empcode = request.getParameter("emp");
                        out.println(Empcode);
                        String Refno =request.getParameter("rtype"); 
                         out.println(Refno);
                        String Divcode = request.getParameter("todiv1");
                        out.println(Divcode);
                        String Usercode = "CIRIUS";    
                         String Whcode = request.getParameter("stor");
                        out.println(Whcode);
                        // String Itemgroupcode = request.getParameter("");
                         String Itemgroupcode ="120000";
                         out.println(Itemgroupcode);
                        String Supplytypecode = request.getParameter("stype");
                        out.println(Supplytypecode);
                        String Delcode = request.getParameter("deliverycode");
                        out.println(Delcode);
                        String Itemclass="WS";
                        out.println(Itemclass);
                        // String Itemclass = request.getParameter("iclass");
                       // out.println(Itemclass);
                        String unitcode = request.getParameter("uni");
                        out.println(unitcode);
                         String Todivcode = request.getParameter("todiv1");
                        out.println(Todivcode);
                        String Appxrate = request.getParameter("rate");
                        out.println(Appxrate);
                        String Srno = request.getParameter("srno");
                        out.println(Srno);                
                    /*    String Indqty = request.getParameter("indentqty");
                      out.println(Indqty);*/
                  String Itemcode = request.getParameter("itmcd");
                       out.println(Itemcode);
                       String Othersp = request.getParameter("remark1");
                        out.println(Othersp);
                        String Reqdt = request.getParameter("dor");
                        out.println(Reqdt);
                        String Munitcode = request.getParameter("mcode");
                        out.println(Munitcode);
                        String Packqty = request.getParameter("packqty");
                        out.println(Packqty);               
                        String Packuom = request.getParameter("pack");
                        out.println(Packuom);
                        String Remark2 = request.getParameter("remark2");
                        out.println(Remark2);
                        String BC = request.getParameter("bcc");
                        out.println(BC);
                        String CC = request.getParameter("ccc");
                        out.println(CC);
                        try{
                            st=connection.createStatement();
                            connection.setAutoCommit(false);
                            String sql="INSERT INTO PTXNINDHDR(COCODE,DEPTCODE,EMPCODE,APPROVEDT1,APPROVEDT2,INDDT,ENTRYNO,REFNO,REMARKS,DIVCODE,USERCODE,WHCODE,ITEMGROUPCODE,SUPTYPECODE,DELCODE,UNITCODE,TODIVCODE,ITEMCLASS)VALUES('"+Cocode+"','"+Deptcode+"','"+Empcode+"','"+ApprovedT1+"','"+ApprovedT2+"','"+Indentdate+"',"+Entryno+",'"+Refno+"','"+Othersp+"','"+Divcode+"','"+Usercode+"','"+Whcode+"','"+Itemgroupcode+"','"+Supplytypecode+"','"+Delcode+"','"+unitcode+"','"+Todivcode+"','"+Itemclass+"')";
                            out.println(sql);
                            st.addBatch(sql);
                            for(int i=0;i<serials.size();i++){
                                out.println("Inside the Statement");
                                String query3="test query for u";
                                out.println(query3);
                               String queryx="Insert into PTXNINDDTL(APXRATE,ENTRYNO,BRKNO,INDQTY,ITEMCODE,OTHERSPFCS,MUNITCODE,PACKQTY,PACKUOM,REMARKS,DIMSUBGRPCODE,DIMCODE,REQDT)VALUES("+arate.get(i)+","+entryno+","+srname.get(i)+","+iqnty.get(i)+","+itcode.get(i)+",'"+Othersp+"','"+mucode.get(i)+"',"+pqnty.get(i)+",'"+puom1.get(i)+"','"+remarkss.get(i)+"','"+bcs.get(i)+"','"+ccs.get(i)+"','"+rdate.get(i)+"')";
                               out.println(queryx);
                                st.addBatch(queryx);
                           int[] result=st.executeBatch();
                           connection.commit();
                           for(int k=0;k<result.length;k++)
                           out.println("rows updated by "+(k+1)+"insert sta:"+result[k]+"");
                        catch(BatchUpdateException bue)
                        out.println("error1;"+bue+"");
                        catch(SQLException sql)
                        out.println("error2;"+sql+"");
                        catch(Exception l)
                        out.println("error3;"+l+"");
    </html>
       Now I looking for to retrieve this footer section data available in multiple rows from footer table and present it in jsp page .
    I am finding difficulties in how to show this multiple row data for dynamic no of rows .i.e. variable no. of rows.
    I have able to show the data in Header portions of page in this ways
    here i am adding the part of code which shows the data from header part of table i.e from Header table
      <html>
    <h2 align="center"><b>Indent Preparation</b></h2>
        <div align="left">
            <table width="849" border="0" cellspacing="3" cellpadding="3" align="center">
                <tr>
                    <td ><div align="left"><b>Indent No.</b></div></td>
                    <td ><label>
                            <input name="indentno" type="text" id="indentno" size="15" value="" /><input type="hidden" name="no" id="no">
                    </label></td>
                    <td ><div align="center"><strong>Indent Date</strong></div></td>
                    <td ><label>
                            <div align="center">
                                <input name="dateindent" type="text" id="dateindent"value="<%=date1%>"/><input type="hidden" name="no" id="no">
                            </div>
                    </label></td>
                    <td> </td>
                    <td><div align="right"><strong>Entry No.</strong></div></td>
                     <%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
            <td><input type="text" value="<%=hdrcode.get(3)%>" size="10"></td>
    <%}else{%>
                   <td><input type="text" name="entryno" id="entryno" value="<%=entryNo%>"/></td>
                             <%}%>
                            <div align="right"></div>
                </tr>
                <tr>
                    <td><b>Division</b></td>
                    <%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
    <td><input type="text" value="<%=hdrdetails.get(9)%>" size="20"</td>
    <td><input type="hidden" name="div1" id="div1" value='<%=hdrcode.get(10)%>'></td>
    <%}else{%>
                   <td><input type="text" name="div" id="div" /></td>
                   <td><input type="hidden" name="div1" id="div1" /> </td>
              <%}%>
                    <td> </td>
                    <td> </td>
                    <td><div align="right"><strong>Unit</strong></div></td>
                   <%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
    <td><input type="text" value="<%=hdrdetails.get(14)%>" size="20"</td>
    <td><input type="hidden" name="uni" id="uni" value='<%=hdrcode.get(12)%>'></td>
    <%}else{%>
                   <td><input type="text" name="unit" id="unit" /></td>
                   <td><input type="hidden" name="uni" id="uni" /> </td>
              <%}%>
                </tr>
                <tr>
    </html>
      Any suggestion on any above works is highly appreciated.
    Thanks and regards
    harshal

    Too much code. It's also not well intented nor formatted. I don't see a question either or it got lost in that heap of unformatted code.
    I will only answer the question in the thread's subject:
    How to retrieve multiple data from table and represent it in jsp pageTo retrieve, make use of HttpServletRequest#getParameterValues() and/or #getParameter().
    To display, make use of JSTL's c:forEach.

  • Reports who work in BIP 10G does not work in BIP 11G

    Hi!
    We are in the middle of going from BIP 10G to BIP 11G (latest patch installed the 9 of february). We have used the Upgrade Assistant to migrate the reports from 10G to 11G, about 80-90% are working directly.
    But, as always are there some problems. There are 2 major problems I am struggling with for the moment. 1 is long running reports who gets "Connection reset by peer" before the report ends and the more problematic which is this:
    [2012-02-27T11:09:50.397+01:00] [bi_server1] [ERROR] [] [oracle.xdo] [tid: 24] [userId: <anonymous>] [ecid: 22bf1318a95b3a18:-528a5dc9:135b0d15f61:-8000-0000000000025a30,0] [APP: bipublisher#11.1.1] XSL error:[[
    <Line 80, Column 151>: XML-23002: (Error) internal xpath error
    @Line 80 ==> <_G><xsl:if test="sum($G1[(./QADATE02 = current-group()/QADATE02)]/QATRQT) = '0'" xdofo:ctx="3">
    [2012-02-27T11:09:50.397+01:00] [bi_server1] [WARNING] [] [oracle.xdo] [tid: 24] [userId: <anonymous>] [ecid: 22bf1318a95b3a18:-528a5dc9:135b0d15f61:-8000-0000000000025a30,0] [APP: bipublisher#11.1.1] oracle.xdo.XDOException: java.lang.reflect.InvocationTargetException[[
         at oracle.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1205)
         at oracle.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:276)
         at oracle.xdo.template.FOProcessor.createFO(FOProcessor.java:1973)
         at oracle.xdo.template.FOProcessor.generate(FOProcessor.java:1117)
         at oracle.xdo.servlet.RTFCoreProcessor.transform(RTFCoreProcessor.java:124)
         at oracle.xdo.servlet.CoreProcessor.process(CoreProcessor.java:372)
         at oracle.xdo.servlet.CoreProcessor.generateDocument(CoreProcessor.java:93)
         at oracle.xdo.servlet.ReportImpl.renderBodyHTTP(ReportImpl.java:1059)
         at oracle.xdo.servlet.ReportImpl.renderReportBodyHTTP(ReportImpl.java:624)
         at oracle.xdo.servlet.XDOServlet.writeReport(XDOServlet.java:477)
         at oracle.xdo.servlet.XDOServlet.writeReport(XDOServlet.java:447)
         at oracle.xdo.servlet.XDOServlet.doGet(XDOServlet.java:267)
         at oracle.xdo.servlet.XDOServlet.doPost(XDOServlet.java:299)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:821)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.xdo.servlet.metadata.track.MostRecentFilter.doFilter(MostRecentFilter.java:65)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.xdo.servlet.security.SecurityFilter.doFilter(SecurityFilter.java:122)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.xdo.servlet.init.InitCheckingFilter.doFilter(InitCheckingFilter.java:64)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.GeneratedMethodAccessor7820.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at oracle.xdo.common.xml.XSLT10gR1.invokeProcessXSL(XSLT10gR1.java:917)
         at oracle.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:609)
         at oracle.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:328)
         at oracle.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:187)
         at oracle.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1181)
         ... 40 more
    Caused by: oracle.xdo11g.xqxp.XQException: XPTY0004
         at oracle.xdo11g.xslt.XSLStylesheet.flushErrors(XSLStylesheet.java:1850)
         at oracle.xdo11g.xslt.XSLStylesheet.execute(XSLStylesheet.java:616)
         at oracle.xdo11g.xslt.XSLStylesheet.execute(XSLStylesheet.java:551)
         at oracle.xdo11g.xslt.XSLProcessor.processXSL(XSLProcessor.java:345)
         at oracle.xdo11g.xslt.XSLProcessor.processXSL(XSLProcessor.java:194)
         at oracle.xdo11g.xslt.XSLProcessor.processXSL(XSLProcessor.java:230)
         at oracle.xdo11g.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:124)
         at sun.reflect.GeneratedMethodAccessor7820.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at oracle.xdo.common.xml.XSLT10gR1.invokeProcessXSL(XSLT10gR1.java:920)
         ... 44 more
    Does anyone have the solution for this type of error, we have about 30-40 reports that is behaving like this in BIP 11G but works fine in BIP 10G.
    Can we do anything general in the BIP 11G or does we need to find the solution for each report and change in the template?
    All ideas are appreciated, thanks,
    Anders B

    Hi!
    Have everyone out there been able to use the upgrade assistant without any problem?
    The UA.bat program says everything is ok but the report actually created in BIP 10G does not work in BIP 11G. We are looking for documentation or "findings" of what the problem can be, in a more general way. We are aware of that we probably have to fix this manually, but we dont know what to fix, and it is not so "fun" to be forced to re create all this templates and reports. The datamodell seems for the most of the time works, so we get a working xml source but the creation of the report thru the template dont work.
    Best regards,
    Anders

  • How to move cursor from one textfield to another textfield byusing enterkey

    hii all,
    I have a problem in java script.
    To move cursor from one textbox to another text box ,I have take the length of the textboxes of the first column.I used onkeyDown event .
    in the function ,firest i checked the condition like
    for(i=0;i<form1.box.length;i++) //box is the name of the textboxes
    if(event.keyCode==13)
    form1.box[i+1].focus();
    return false;
    by using this the cursor is moving from first text box to secon textbox and stops.
    if i use event.returnValue=false; instead of return false ,then the cursor automatically going to the laxt textbox of the column.
    my problem is how i can focus the cursor from one textbox to another textbox one after the other till the end.
    if any one has solution please help me.
    also if we can do in another way also,please help me.
    thanx.>

    try the following code :
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE> New Document </TITLE>
    <META NAME="Generator" CONTENT="EditPlus">
    <META NAME="Author" CONTENT="">
    <META NAME="Keywords" CONTENT="">
    <META NAME="Description" CONTENT="">
    </HEAD>
    <SCRIPT language="Javascript">
    function fnTest(str)     {     
              if(event.keyCode==13)          {
                   if(str == 4)     {
                        formHeader.box[0].focus();
                   else     {
                        formHeader.box[parseInt(str)+1].focus();
                   return false;
    </SCRIPT>
    <BODY>
    <FORM name="formHeader">
    <CENTER>
    <INPUT TYPE="TEXT" name="box" value="" onKeyDown="javascript:fnTest('0');">
    <br>
    <INPUT TYPE="TEXT" name="box" value="" onKeyDown="javascript:fnTest('1');">
    <br>
    <INPUT TYPE="TEXT" name="box" value="" onKeyDown="javascript:fnTest('2');">
    <br>
    <INPUT TYPE="TEXT" name="box" value="" onKeyDown="javascript:fnTest('3');">
    <br>
    <INPUT TYPE="TEXT" name="box" value="" onKeyDown="javascript:fnTest('4');">
    </CENTER>
    </FORM>
    </BODY>
    </HTML>
    ----------------------------------------------

  • Need help for focusing the cursor from one textbox to another textbox

    hii all,
    I have a problem in java script.
    Note:The textboxes are generated dynamically.it is not having fixed length.(the number of textboxes generated may be 3,2,4....etc.it is not fixed.
    To move cursor from one textbox to another text box ,I have taken the length of the textboxes of the first column.I used onkeyDown event .
    in the function ,first i checked the condition like
    for(i=0;i<form1.box.length;i++) //box is the name of the textboxes
    if(event.keyCode==13)
    form1.box[i+1].focus();
    return false;
    by using this the cursor is moving from first text box to second textbox and stops.
    if i use event.returnValue=false; instead of return false ,then the cursor automatically going to the laxt textbox of the column.
    my problem is how i can focus the cursor from one textbox to another textbox one after the other till the end.
    if any one has solution please help me.
    also if we can do in another way also,please help me.
    thanx.>

    thanx .u helped me so much.
    i have to check another condition. see the code below
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE> New Document </TITLE>
    <META NAME="Generator" CONTENT="EditPlus">
    <META NAME="Author" CONTENT="">
    <META NAME="Keywords" CONTENT="">
    <META NAME="Description" CONTENT="">
    </HEAD>
    <SCRIPT language="Javascript">
    function fnTest(str) {
    if(event.keyCode==13) {
    if(str == 4) {
    formHeader.box[0].focus();
    else {
    formHeader.box[parseInt(str)+1].focus();
    return false;
    </SCRIPT>
    <BODY>
    <FORM name="formHeader">
    <CENTER>
    <INPUT TYPE="TEXT" name="box" value="" onKeyDown="javascript:fnTest('0');">
    <br>
    <INPUT TYPE="TEXT" name="box" value="" onKeyDown="javascript:fnTest('1');">
    <br>
    <INPUT TYPE="TEXT" name="box" value="0" disabled="false" onKeyDown="javascript:fnTest('2');">
    <br>
    <INPUT TYPE="TEXT" name="box" value="" onKeyDown="javascript:fnTest('3');">
    <br>
    <INPUT TYPE="TEXT" name="box" value="" onKeyDown="javascript:fnTest('4');">
    </CENTER>
    </FORM>
    </BODY>
    </HTML>
    suppose if some of the fields are disabled,then the focus must skip to the next one.i have written disabled for box2.if the cursor focuses in box1,then the cursor should move to box3 escaping box2.
    if u know plz tell me.

  • How do I retrieve call history from my iPhone 4S? It only seems to log for about a month and I need an earlier date?

    How do I retrieve call history from my iPhone 4S? It only seems to log for about a month and I need an earlier date?

    If you have backup of your files, you can get your call history back as long as you sync iPhone with iTunes frequently.
    OK, the first thing you are required to do is close the function of "prevent iPhone from syncing automatically." in iTunes, avoiding to sync iPhone again.
    Now, connect your iPhone to pc and open iTunes.
    iTunes> preferences> devices
    All the backup data in iTunes will be displayed.
    Then,click the File menu and select Devices > Restore from Back up
    your iPhone will restart and you can find them back.
    This method only can find back the latest history, to get back the old, you should turn to a third party program for help.

Maybe you are looking for