Data Templates by Example - parameter error

Tim, there is an error in the EMPLOYEES.xml data template in your 11/29/06 blog. The Q1 sqlStatement references p_DeptNo but the parameter section defines it as pDeptNo. Of course, the two names should match.
By the way, where can I find documentation on the properties element used in your data template example? I did not find any of these properties described in the current user guides.
Thanks and regards, Rob

The current release 5.6.2 does not supports the properties. These are the part of our comming release 5.6.3 and they are well documented in 5.6.3 User Guide.
Regards
Ashish

Similar Messages

  • Reg: Error in Data Template ( java.sql.SQLException: ORA-00900: invalid SQL

    Hi Experts,
    Good Morning..
    I registered the data template which i created in oracle apps and while i run that, ended in error... Plz help me..
    Step :-1 Used Data Template as below:-
    <?xml version="1.0" encoding="WINDOWS-1252" ?>
    <dataTemplate name="EMP" defaultPackage="" description="Employee Data">
    - <properties>
    <property name="include_parameters" value="true" />
    <property name="include_null_Element" value="true" />
    <property name="xml_tag_case" value="upper" />
    <property name="db_fetch_size" value="500" />
    <property name="scalable_mode" value="off" />
    <property name="include_rowsettag" value="false" />
    <property name="debug_mode" value="off" />
    </properties>
    <parameters/>
    <parameters name="pdeptno" dataType="number" defaultValue=" ">
    </parameters>
    <lexicals />
    - <dataQuery>
    - <sqlStatement name="DEPT" dataSourceRef="">
    - <![CDATA[
              SELECT DEPTNO,DNAME,
              LOC,CURSOR(SELECT  EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,nvl(COMM,0) COMM from EMP ) as EMP
              from dept
              where deptno=pdeptno
              order by deptno]]>
    </sqlStatement>
    </dataQuery>
    </dataTemplate>
    Step -2:-
    Registered in xml publisher administrator
    Step -3:-
    While i am running this getting below error-
    XDO Data Engine Version No: 5.6.3
    Resp: 20419
    Org ID : 204
    Request ID: 5380496
    All Parameters: pdeptno=10
    Data Template Code: EMP_DD
    Data Template Application Short Name: FND
    Debug Flag: N
    {pdeptno=10}
    Calling XDO Data Engine...
    java.sql.SQLException: ORA-00900: invalid SQL statement
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:810)
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1039)
         at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:850)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1134)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3339)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3384)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeDefaultGroup(XMLPGEN.java:392)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:286)
         at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:273)
         at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:215)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:254)
         at oracle.apps.xdo.dataengine.DataProcessor.processDataStructre(DataProcessor.java:390)
         at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.java:355)
         at oracle.apps.xdo.oa.util.DataTemplate.processData(DataTemplate.java:348)
         at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:293)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:157)
    Start of log messages from FND_FILE
    Any mistake i made.. Issue may be silly..plz help me...
    Thanks in advance..
    Happy

    Hi all,,,,
    Thank so much for your valuable response regarding this issue..
    Actually my scenario meet this below example, path for that example:-.
    http://blogs.oracle.com/xmlpublisher/2007/02/data_templates_without_groupin.html
    I am simply executing that data template. but getting this error :-
    XDO Data Engine Version No: 5.6.3
    Resp: 20419
    Org ID : 204
    Request ID: 5380496
    All Parameters: pdeptno=10
    Data Template Code: EMP_DD
    Data Template Application Short Name: FND
    Debug Flag: N
    {pdeptno=10}
    Calling XDO Data Engine...
    java.sql.SQLException: ORA-00900: invalid SQL statement
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:810)
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1039)
         at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:850)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1134)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3339)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3384)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeDefaultGroup(XMLPGEN.java:392)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:286)
         at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:273)
         at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:215)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:254)
         at oracle.apps.xdo.dataengine.DataProcessor.processDataStructre(DataProcessor.java:390)
         at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.java:355)
         at oracle.apps.xdo.oa.util.DataTemplate.processData(DataTemplate.java:348)
         at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:293)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:157)
    Start of log messages from FND_FILE

  • How to use Report Parameter  on Data Template

    Hello All ,
    I 've tried to create a Report using Data template and Report Parameter. I create a report using data template and I also created a parameter (P_company_name).
    Data Template :
    <dataTemplate name="test_Data_template" description="test" dataSourceRef="test">
    <parameters>
    <parameter name="company_name" dataType="character" include_in_output="false" defaultValue= *** HOW TO DEFINE THE REPORT PARAMETER (P_Company_name) HERE ** />
    </parameters>
    <dataQuery><sqlStatement name="Q1"> <![CDATA[SELECT customer_no,Company_name, from customers where acquisition_id = :company_name  ]]>
    </sqlStatement>
    Report Parameter
    Identifier : P_Company_name
    Data Type : String
    Default Value : Test
    Parameter Type : Text
    When the endusers run the Report they will provide the Company name through the report parameter.
    I have tried to use the same approach that I used to pass the Parameter to SqlQuery on data Template but it is not working . XML Publisher cannot define the parameter.
    How can I do that ?
    If you have any suggestion or document I will really appreciate.
    Thanks,
    Robson

    use this <parameter name="P_Company_name" dataType="character" include_in_output="false" defaultValue= 'Test Value' />and in the querySELECT customer_no,Company_name, from customers where acquisition_id = :P_Company_namehttp://download.oracle.com/docs/cd/E12844_01/doc/bip.1013/e12187/T421739T434255.htm
    Just keep the parameter name in datatemplate and the definition same.

  • Date Parameters in Data Templates..

    Mornin all..
    How are you using date parameters in your Data templates..?
    I'm trying to run a Conc Program that has a date parameter. in ORACLE Con Program the value set is setup to retrieve the format dd-MON-yyyy.
    I also have this format specified in the Data Template..
    <parameter name="p_paydate_from" dataType="character" />
    <parameter name="p_paydate_to" dataType="character" /> ..and then again in the SELECT statement..
    <![CDATA[
    SELECT DISTINCT.......
    TO_CHAR(ip.creation_date, 'dd-MON-yyyy') Paid_Date, sfc.faculty_code Faculty, etc..
    FROM
    WHERE
    AND TRUNC(ip.creation_date) BETWEEN NVL(:p_paydate_from, '01-JAN-1999') AND NVL(:p_paydate_to, '31-DEC-2299')...
    ]]>..yet when I run the report it just ignores the data parameter and returns all records..
    I know that if that this was done in ORACLE Reports I'd have to place this in AfterPFormTrigger..
    IF :p_paydate_from is not null then
    :lp_paydate_from := 'and ip.accounting_date >= to_date(:p_paydate_from, ''YYYY/MM/DD HH24:MI:SS'')' ;
      ELSE      :lp_paydate_from := '';
      END IF;
        IF :p_paydate_to is not null then
              :lp_paydate_to := 'and ip.accounting_date <= to_date(:p_paydate_to, ''YYYY/MM/DD HH24:MI:SS'')' ;
      ELSE       :lp_paydate_to := '';
      END IF; Question is - do I have to create a trigger and put it into my data template or am I working the date parameter wrongly..? How do you use date parameters in your Data templates..?
    Many thanks for Looking..
    Steven
    Edited by: JackyWhite on May 14, 2010 12:20 PM

    Thanks for the comments.
    I am able to return records when using the code in the SELECT statement via TOAD.
    I've tried specifying dates in the parameter section but it was just the same error.
    The error message given when I include these date parameters when in run the Conc Program is..
    [051410_022803764][][STATEMENT] 8: p_paydate_from:2010/01/01 00:00:00
    [051410_022803764][][STATEMENT] 9: p_paydate_to:2010/01/21 00:00:00
    --SQLException
    java.sql.SQLException: ORA-01861: literal does not match format string
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)I know what the problem is, I just done know how to fix it. I'll try to explain. In ORACLE reports
    In the Conc Program (running the report) The date can be entered in the format 'DD-MON-YYYY'
    In the Report Oracle sends this date to the report in the format 'YYYY/MM/DD HH24:MI:SS'. To accept this date in the report the easiest method is to.....
    1. Create the date parameter as a varchar(20) instead of a date type
    2. In the After Parameter Trigger convert the date either into a local variable or into a lexical variable (used in the SQL query) by using the code
             to_date(:p_date_parameter_name, '''YYYY/MM/DD HH24:MI:SS'')
         srw.message(10, 'P Date from ' ||:p_date_from);
          if :p_paydate_from is not null then
              :Lp_paydate_from := 'and trunc(...............) >= to_date(:p_paydate_from,''YYYY/MM/DD HH24:MI:SS'')';
           :disp_date_from := to_char(to_date(:p_paydate_from,'YYYY/MM/DD HH24:MI:SS'),'DD-MON-YYYY');
              srw.message(10, 'LP Date from ' ||:lp_paydate_from);
          end if; etc etc etc..      end if;I know that if I can convert it somewhere somehow using that 'to_date(:p_paydate_from,...' thing then I reckon it should work..
    I'm currently trying to figure out (a tad rusty at PLSQL now) how can I create an afterpform trigger to be called in the data template that does the above (basically just to convert the date format)..
    PLease tell me there is an easier way!
    Thanks!
    Steven

  • How to acquire the concurrent request id in data template?

    Hi all,
    I want to know how to acquire the concurrent request from my report data template. I've created a placeholder for my parameter +<parameter name="p_conc_request_id" dataType = "number" defaultValue="0"></parameter>+ and for nothing ... i've got the 0 value.
    I need the concurrent request id in order to detect the user who launched the report. Is there other way on getting the user ??
    Thank you!
    All the best,
    Laurentiu
    Edited by: laurentiu on Jul 8, 2009 5:29 PM

    Hi,
    I read your previous post about this solution but i was not able to retrieve it. Here is step by step what i've done:
    - added the parameter to my data template
    - added the parameter to my concurrent program
    - added the parameter in my pl/sql package
    - i've run my concurrent request and the value returned in my xml is 0 for the concurrent request id parameter
    I don't know where i'am getting wrong ?!?
    Thank you!
    All the best,
    Laurentiu
    Edited by: laurentiu on Jul 8, 2009 6:47 PM

  • Passing menu selections as parameters to Data Template

    Hi,
    Following is my data template where i am passing 3 parameters - product_names(drop down menu, with option of multiple select with All), balance_date and trailing_days:
    <dataTemplate name="ProductTrendDataTemplate" description="Product Trend Report" dataSourceRef="PI reporting DS">
         <properties>
              <property name="include_parameters" value="false"/>
              <property name="include_null_Element" value="false"/>
              <property name="include_rowsettag" value="false"/>
              <property name="scalable_mode" value="off"/>
         </properties>
         <parameters>
              <parameter name="product_names"/>
              <parameter name="balance_date" dataType="date"/>
              <parameter name="trailing_days" dataType="number" defaultValue="30"/>
         </parameters>
         <dataQuery>
              <sqlStatement name="settlementlvl">
                   <![CDATA[     
              select
                to_char(eff_d , 'MM/DD/YYYY') as settlement_date,
                prdt_nm as product_name,
                sum(tt_now_mmda_bal_a) as balance,
                sum(acc_cnt) as account_count,
                to_char(latest_settlement_date, 'MM/DD/YYYY') as latest_run_date
               from
                <tables>
               where
                prdt_nm in (:product_names)
                and eff_d <= nvl(cast(:balance_date as date), (select max(eff_d) from t_frdba_daily_bal_f))
                and eff_d >= nvl(cast(:balance_date as date), (select max(eff_d) from t_frdba_daily_bal_f)) - :trailing_days       
                group by eff_d, prdt_nm, latest_settlement_date
                order by eff_d, prdt_nm
                   ]]>
              </sqlStatement>
         </dataQuery>
         <dataStructure>
              <group name="SETTLE_INFO" source="settlementlvl">
                   <element name="SETTLE_DATE" value="settlement_date"/>
                   <element name="PRODUCT_NAME" value="product_name"/>
                   <element name="BAL" value="balance"/>
                   <element name="ACCNTS" value="account_count"/>
                   <element name="LATEST_SETTLEMENT_DATE" value="latest_run_date"/>
              </group>
         </dataStructure>
    </dataTemplate>
    The parameter definition in the xdo document is as follows:
    <parameters>
    <parameter id="balance_date" dataType="xsd:date">
    <date label="Latest Settlement Date" format="dd-MMM-yy"/>
    </parameter>
    <parameter id="trailing_days" defaultValue="90" dataType="xsd:integer">
    <input label="Trailing Days" size="4"/>
    </parameter>
    <parameter id="product_names" defaultValue="*">
    <select label="Products" valueSet="product_list" multiple="true" all="true" allValue="lov"/>
    </parameter>
    </parameters>
    My problem pertains to the parameter product_names. When I select either All or multiple product_names (that is when I select product X,Y and Z from the front end), the product names are passed in as a single string into the query. As a result of this the query prdt_nm in (:product_names) fails as it trys to find all the product_names with value "'X','Y','Z'" instead of selecting on values 'X', 'Y', 'Z' separately. Thus the query is failing for multiple select. Can anyone suggest as how to handle this condition?
    Please let me know if you need more information on this....
    Thanks,
    Ashwin

    Tim,
    The output from my OC4J terminal with debugger turned on is
    The sql query at run time looked as: prdt_nm in (:product_names)
    Parameter value substituted as:
    [101609_022156559][][STATEMENT] 1: product_names:'X','Y','Z'.
    So I assume that the data template recvd this parameter as an string " 'X','Y','Z' ".
    Just out of curiosity, I tried the same without using data template , just using plain SQL query, the output from the OC4J terminal is as follows:
    In the query the parameter product_names is replace as prdt_nm in (:product_names2905,:product_names2906,:product_names2907) and the values are substituted as
    [101609_022637635][][STATEMENT] 1:X
    [101609_022637635][][STATEMENT] 2:Y
    [101609_022637635][][STATEMENT] 3:Z
    So from this you can see that BI publisher is some how handling the data template's parameter parsing differently from plain sql query.
    Tim, I am not familiar with pre-fetch triggers as I am new to PL/Sql. Is there someway to handle this at the query level instead of writing a PL/SQL function.
    Appreciate your help.
    Ashwin

  • How to handle errors in data templates

    Hi
    What is the recommended way to handle errors for example if one of your SQL statement in a data template returned no data how and where would you be able to create an error message for the user to find and read.
    Thanks,
    Mark

    The closest I have come to doing this is to put conditional statements into the format template. If a value matches an expected (ex. is null) you can return a message (in the report) via the format template (ex. "No Data Found").
    I am not sure this really answers your question as this is in the format template, but I generally view them as a matched pair that work together. I try to stick with data extraction in the data define, and do all my conditional stuff in the format templates.
    Scott

  • Pass request id as parameter to XMLP data template?

    I want to be able to use the request_id of the concurrent job in the sql of a data template.
    I have tried adding a parameter:
    <parameter name="P_CONC_REQUEST_ID" dataType = "number" defaultValue="0" />
    so I can then do:
    <sqlStatement name="Q1" dataSourceRef=""><![CDATA[select 'Hello '||:XX_NAME||' '||to_char(:P_CONC_REQUEST_ID) WELCOME from dual]]></sqlStatement> for example.
    In reports6i this parameter gets populated automatically at runtime. Do I have to do anything extra to get this to work with XDODTEXE?
    thanks for your help
    Graham

    Hi Dave,
    Thanks for your suggestion, that worked a treat.
    cheers
    Graham

  • Data template datatrigger error

    Hi I have a data template that I'm currently getting an datatrigger error with when trying to generate the xml data. I believe I have my dataTrigger coded correctly and am unsure how to resolve this problem. Below is the data template code, plsql code and the actual error. Can somebody please tell me how to fix this error?
    Please help!
    <?xml version="1.0"?>
    <dataTemplate name="XXKNC_WIPDJCR" description="WIP Critical Ratio Report" dataSourceRef="TEST" version="1.0">
    <parameters>
    <parameter name="S_DEPT" dataType="character"/>
    <parameter name="E_DEPT" dataType="character"/>
    <parameter name="P_QTY_IN_QUEUE" dataType="character"/>
    </parameters>
    <dataQuery>
    <sqlStatement name="MAIN_Q1">
    <![CDATA[
    select distinct cr.Dept_Name, cr.Dept_Description,
    case
               when cr.denominator = 0 then 0
               else round(cr.numerator/cr.denominator,2)
    end critical_ratio,
    cr.Sched_Op_Start_Date, cr.Sched_Op_Completion_Date,
    to_char(cr.MPS_SCHEDULED_COMPLETION_DATE,'MM/DD/RRRR') as JOB_COMP_DATE,
    cr.Job_Name, cr.Lot_Number, cr.PART# as ITEM,
    substr(cr.Item_Description,1,50) as Item_Description, cr.Op_Seq as OPER,
    substr(cr.OP_Description,1,30) as OP_Description, cr.Quantity_Scheduled, cr.Quantity_In_Queue,        cr.QUANTITY_COMPLETED
    from
    select distinct a.Dept_Name, a.Dept_Description, a.Job_Name, a.wip_entity_id,       a.MPS_SCHEDULED_COMPLETION_DATE, round(xxknc_critical_ratio_num(a.wip_entity_id),4) as numerator,
    den.denominator, to_char(a.Sched_Op_Start_Date,'MM/DD/RRRR') as Sched_Op_Start_Date,
    to_char(a.Sched_Op_Completion_Date,'MM/DD/RRRR') as Sched_Op_Completion_Date,
    a.PART#, a.Item_Description, a.LOT_NUMBER, a.Quantity_Scheduled,  a.Quantity_In_Queue,
    a.QUANTITY_COMPLETED,  a.Op_Seq, a.OP_Description,
    xxknc.xxknc_qty_in_queue.CF_RowNumFormula as CF_RowNumFormula
    from
        select distinct BD.DEPARTMENT_CODE Dept_Name, BD.DESCRIPTION Dept_Description,
                   WE.WIP_ENTITY_NAME Job_Name, dj.lot_number, dj.MPS_SCHEDULED_COMPLETION_DATE,
                    WO.FIRST_UNIT_START_DATE as Sched_Op_Start_Date,
                  WO.LAST_UNIT_COMPLETION_DATE as Sched_Op_Completion_Date, i.inventory_item AS PART#,
    i.DESCRIPTION Item_Description, WO.OPERATION_SEQ_NUM Op_Seq, WO.DESCRIPTION   OP_Description,
    WO.SCHEDULED_QUANTITY Quantity_Scheduled,  WO.QUANTITY_IN_QUEUE Quantity_In_Queue,
    WO.QUANTITY_COMPLETED, wor.usage_rate_or_amount, wor.applied_resource_units, wo.wip_entity_id
      from apps.WIP_OPERATIONS wo, BOM_DEPARTMENTS BD, wip_operation_resources wor
           ,WIP_DISCRETE_JOBS DJ, WIP_ENTITIES WE, invfg_items i    
      where WO.ORGANIZATION_ID = 82
      and DJ.ORGANIZATION_ID = 82
      AND WE.ORGANIZATION_ID = 82
      AND i.ORGANIZATION_ID = 82
      AND BD.ORGANIZATION_ID = 82
      AND BD.DEPARTMENT_ID = WO.DEPARTMENT_ID
      AND i.inventory_item_id = WE.PRIMARY_ITEM_ID
      AND WO.WIP_ENTITY_ID = WE.WIP_ENTITY_ID
      AND WE.ENTITY_TYPE = 1
      and dj.status_type = 3
      AND wo.wip_entity_id = dj.wip_entity_id
      AND wor.wip_entity_id = wo.wip_entity_id
      AND wor.operation_seq_num = wo.operation_seq_num
      AND wor.uom_code IN ('HR')
      and basis_type in (2)
      and activity_id in (4,1000)
      UNION
        select distinct BD.DEPARTMENT_CODE Dept_Name, BD.DESCRIPTION Dept_Description,
            WE.WIP_ENTITY_NAME Job_Name, dj.lot_number, dj.MPS_SCHEDULED_COMPLETION_DATE,
            WO.FIRST_UNIT_START_DATE as Sched_Op_Start_Date,
            WO.LAST_UNIT_COMPLETION_DATE as Sched_Op_Completion_Date,
            i.inventory_item AS PART#, i.DESCRIPTION Item_Description, WO.OPERATION_SEQ_NUM Op_Seq,
            WO.DESCRIPTION OP_Description, WO.SCHEDULED_QUANTITY Quantity_Scheduled, 
            WO.QUANTITY_IN_QUEUE Quantity_In_Queue, WO.QUANTITY_COMPLETED,
           (wor.usage_rate_or_amount * WO.QUANTITY_COMPLETED) as usage_rate_or_amount,
           wor.applied_resource_units, wo.wip_entity_id
    from apps.WIP_OPERATIONS wo, BOM_DEPARTMENTS BD, wip_operation_resources wor      ,WIP_DISCRETE_JOBS DJ, WIP_ENTITIES WE, invfg_items i
      where WO.ORGANIZATION_ID = 82
      and DJ.ORGANIZATION_ID = 82
      AND WE.ORGANIZATION_ID = 82
      AND i.ORGANIZATION_ID = 82
      AND BD.ORGANIZATION_ID = 82
      AND BD.DEPARTMENT_ID = WO.DEPARTMENT_ID
      AND i.inventory_item_id = WE.PRIMARY_ITEM_ID
      AND WO.WIP_ENTITY_ID = WE.WIP_ENTITY_ID
      AND WE.ENTITY_TYPE = 1
      and dj.status_type = 3
      AND wo.wip_entity_id = dj.wip_entity_id
      AND wor.wip_entity_id = wo.wip_entity_id
      AND wor.operation_seq_num = wo.operation_seq_num
      AND wor.uom_code IN ('HR')
      and basis_type in (1)
      and activity_id in (1)
      UNION
        select distinct BD.DEPARTMENT_CODE Dept_Name, BD.DESCRIPTION Dept_Description,
             WE.WIP_ENTITY_NAME Job_Name, dj.lot_number, dj.MPS_SCHEDULED_COMPLETION_DATE,
             WO.FIRST_UNIT_START_DATE as Sched_Op_Start_Date,
             WO.LAST_UNIT_COMPLETION_DATE as Sched_Op_Completion_Date,
             i.inventory_item AS PART#, i.DESCRIPTION Item_Description, WO.OPERATION_SEQ_NUM Op_Seq,
             WO.DESCRIPTION OP_Description, WO.SCHEDULED_QUANTITY Quantity_Scheduled, 
             WO.QUANTITY_IN_QUEUE Quantity_In_Queue, WO.QUANTITY_COMPLETED,
             (wor.usage_rate_or_amount * 24) as usage_rate_or_amount,
             wor.applied_resource_units, wo.wip_entity_id
      from apps.WIP_OPERATIONS wo,
           BOM_DEPARTMENTS BD, wip_operation_resources wor, WIP_DISCRETE_JOBS DJ, WIP_ENTITIES WE
           ,invfg_items i
      where WO.ORGANIZATION_ID = 82
      and DJ.ORGANIZATION_ID = 82
      AND WE.ORGANIZATION_ID = 82
      AND i.ORGANIZATION_ID = 82
      AND BD.ORGANIZATION_ID = 82
      AND BD.DEPARTMENT_ID = WO.DEPARTMENT_ID
      AND i.inventory_item_id = WE.PRIMARY_ITEM_ID
      AND WO.WIP_ENTITY_ID = WE.WIP_ENTITY_ID
      AND WE.ENTITY_TYPE = 1
      and dj.status_type = 3
      AND wo.wip_entity_id = dj.wip_entity_id
      AND wor.wip_entity_id = wo.wip_entity_id
      AND wor.operation_seq_num = wo.operation_seq_num
      AND wor.uom_code IN ('DAY')
      and basis_type in (2)
      and activity_id in (4,1000)
      UNION
      select distinct BD.DEPARTMENT_CODE Dept_Name, BD.DESCRIPTION Dept_Description,
             WE.WIP_ENTITY_NAME Job_Name, dj.lot_number, dj.MPS_SCHEDULED_COMPLETION_DATE,
             WO.FIRST_UNIT_START_DATE as Sched_Op_Start_Date,
             WO.LAST_UNIT_COMPLETION_DATE as Sched_Op_Completion_Date,
             i.inventory_item AS PART#, i.DESCRIPTION Item_Description, WO.OPERATION_SEQ_NUM Op_Seq,
             WO.DESCRIPTION OP_Description, WO.SCHEDULED_QUANTITY Quantity_Scheduled, 
             WO.QUANTITY_IN_QUEUE Quantity_In_Queue, WO.QUANTITY_COMPLETED,
             ((wor.usage_rate_or_amount * 24) * WO.QUANTITY_COMPLETED) as usage_rate_or_amount,
             wor.applied_resource_units, wo.wip_entity_id
      from apps.WIP_OPERATIONS wo, BOM_DEPARTMENTS BD, wip_operation_resources wor
          ,WIP_DISCRETE_JOBS DJ, WIP_ENTITIES WE, invfg_items i
      where WO.ORGANIZATION_ID = 82
      and DJ.ORGANIZATION_ID = 82
      AND WE.ORGANIZATION_ID = 82
      AND i.ORGANIZATION_ID = 82
      AND BD.ORGANIZATION_ID = 82
      AND BD.DEPARTMENT_ID = WO.DEPARTMENT_ID
      AND i.inventory_item_id = WE.PRIMARY_ITEM_ID
      AND WO.WIP_ENTITY_ID = WE.WIP_ENTITY_ID
      AND WE.ENTITY_TYPE = 1
      and dj.status_type = 3
      AND wo.wip_entity_id = dj.wip_entity_id
      AND wor.wip_entity_id = wo.wip_entity_id
      AND wor.operation_seq_num = wo.operation_seq_num
      AND wor.uom_code IN ('DAY')
      and basis_type in (1)
      and activity_id in (1)
      UNION
      select distinct BD.DEPARTMENT_CODE Dept_Name, BD.DESCRIPTION Dept_Description,  WE.WIP_ENTITY_NAME Job_Name, dj.lot_number, dj.MPS_SCHEDULED_COMPLETION_DATE,
             WO.FIRST_UNIT_START_DATE as Sched_Op_Start_Date,
             WO.LAST_UNIT_COMPLETION_DATE as Sched_Op_Completion_Date,
             i.inventory_item AS PART#, i.DESCRIPTION Item_Description, WO.OPERATION_SEQ_NUM Op_Seq,
             WO.DESCRIPTION OP_Description, WO.SCHEDULED_QUANTITY Quantity_Scheduled, 
             WO.QUANTITY_IN_QUEUE Quantity_In_Queue, WO.QUANTITY_COMPLETED,
             NULL AS usage_rate_or_amount, NULL AS applied_resource_units, wo.wip_entity_id
            from apps.WIP_OPERATIONS wo, BOM_DEPARTMENTS BD, WIP_DISCRETE_JOBS DJ,
                 WIP_ENTITIES WE, invfg_items i    
            where WO.ORGANIZATION_ID = 82
            and DJ.ORGANIZATION_ID = 82
            AND WE.ORGANIZATION_ID = 82
            AND i.ORGANIZATION_ID = 82
            AND BD.ORGANIZATION_ID = 82
            AND BD.DEPARTMENT_ID = WO.DEPARTMENT_ID
            AND i.inventory_item_id = WE.PRIMARY_ITEM_ID
            AND WO.WIP_ENTITY_ID = WE.WIP_ENTITY_ID
            AND WE.ENTITY_TYPE = 1
          and dj.status_type = 3
            AND wo.wip_entity_id = dj.wip_entity_id
            and wo.operation_seq_num between 1 and 10
            and wo.quantity_in_queue > 0
            and wo.operation_seq_num NOT IN (select distinct operation_seq_num from wip_operation_resources
                                         where wip_entity_id = wo.wip_entity_id
                                         and operation_seq_num between 1 and 10)
            order by 1
    ) a,
    ( -- this inline view gets the denominator value
        select b.Job_Name, b.WIP_ENTITY_ID, xxknc_critical_ratio_den (b.wip_entity_id) as denominator
        from
        select a.Job_Name, a.WIP_ENTITY_ID,
               sum(a.usage_rate_or_amount) as usage_rate_or_amount
        from
         select distinct WE.WIP_ENTITY_ID, WE.WIP_ENTITY_NAME Job_Name, wor.usage_rate_or_amount, WO.LAST_UNIT_COMPLETION_DATE
          from apps.WIP_OPERATIONS wo, wip_operation_resources wor, WIP_DISCRETE_JOBS DJ
               ,WIP_ENTITIES WE, invfg_items i
          where WO.ORGANIZATION_ID = 82
          and DJ.ORGANIZATION_ID = 82
          AND WE.ORGANIZATION_ID = 82
          AND i.ORGANIZATION_ID = 82
          AND i.inventory_item_id = WE.PRIMARY_ITEM_ID
          AND WO.WIP_ENTITY_ID = WE.WIP_ENTITY_ID
          AND WE.ENTITY_TYPE = 1
          and dj.status_type = 3
          AND wo.wip_entity_id = dj.wip_entity_id
          AND wor.wip_entity_id = wo.wip_entity_id
          AND wor.operation_seq_num = wo.operation_seq_num
          AND wor.uom_code IN ('HR')
          and basis_type in (2)
          and activity_id in (4,1000)
          UNION
          select distinct WE.WIP_ENTITY_ID, WE.WIP_ENTITY_NAME Job_Name,
                (wor.usage_rate_or_amount * WO.QUANTITY_COMPLETED) as usage_rate_or_amount, WO.LAST_UNIT_COMPLETION_DATE
          from apps.WIP_OPERATIONS wo, wip_operation_resources wor, WIP_DISCRETE_JOBS DJ
               ,WIP_ENTITIES WE, invfg_items i
          where WO.ORGANIZATION_ID = 82
          and DJ.ORGANIZATION_ID = 82
          AND WE.ORGANIZATION_ID = 82
          AND i.ORGANIZATION_ID = 82
          AND i.inventory_item_id = WE.PRIMARY_ITEM_ID
          AND WO.WIP_ENTITY_ID = WE.WIP_ENTITY_ID
          AND WE.ENTITY_TYPE = 1
          and dj.status_type = 3
          AND wo.wip_entity_id = dj.wip_entity_id
          AND wor.wip_entity_id = wo.wip_entity_id
          AND wor.operation_seq_num = wo.operation_seq_num
          AND wor.uom_code IN ('HR')
          and basis_type in (1)
          and activity_id in (1)
          UNION
          select distinct WE.WIP_ENTITY_ID, WE.WIP_ENTITY_NAME Job_Name,
                (wor.usage_rate_or_amount * 24) as usage_rate_or_amount, WO.LAST_UNIT_COMPLETION_DATE
          from apps.WIP_OPERATIONS wo, wip_operation_resources wor, WIP_DISCRETE_JOBS DJ
               ,WIP_ENTITIES WE, invfg_items i
          where WO.ORGANIZATION_ID = 82
          and DJ.ORGANIZATION_ID = 82
          AND WE.ORGANIZATION_ID = 82
          AND i.ORGANIZATION_ID = 82
          AND i.inventory_item_id = WE.PRIMARY_ITEM_ID
          AND WO.WIP_ENTITY_ID = WE.WIP_ENTITY_ID
          AND WE.ENTITY_TYPE = 1
          and dj.status_type = 3
          AND wo.wip_entity_id = dj.wip_entity_id
          AND wor.wip_entity_id = wo.wip_entity_id
          AND wor.operation_seq_num = wo.operation_seq_num
          AND wor.uom_code IN ('DAY')
          and basis_type in (2)
          and activity_id in (4,1000)
          UNION
          select distinct WE.WIP_ENTITY_ID, WE.WIP_ENTITY_NAME Job_Name,
                ((wor.usage_rate_or_amount * 24) * WO.QUANTITY_COMPLETED) as usage_rate_or_amount, WO.LAST_UNIT_COMPLETION_DATE
          from apps.WIP_OPERATIONS wo, wip_operation_resources wor, WIP_DISCRETE_JOBS DJ
              ,WIP_ENTITIES WE, invfg_items i
          where WO.ORGANIZATION_ID = 82
          and DJ.ORGANIZATION_ID = 82
          AND WE.ORGANIZATION_ID = 82
          AND i.ORGANIZATION_ID = 82
          AND i.inventory_item_id = WE.PRIMARY_ITEM_ID
          AND WO.WIP_ENTITY_ID = WE.WIP_ENTITY_ID
          AND WE.ENTITY_TYPE = 1
          and dj.status_type = 3
          AND wo.wip_entity_id = dj.wip_entity_id
          AND wor.wip_entity_id = wo.wip_entity_id
          AND wor.operation_seq_num = wo.operation_seq_num
          AND wor.uom_code IN ('DAY')
          and basis_type in (1)
          and activity_id in (1)
          order by 1
        ) a
        group by a.WIP_ENTITY_ID, a.Job_Name
        ) b
        order by 1
        ) den
    where a.wip_entity_id = den.wip_entity_id
    ORDER BY a.Job_Name
    ) cr
    where upper(cr.Dept_Name) between nvl(upper(:S_DEPT), upper(cr.Dept_Name)) and nvl(upper(:E_DEPT),upper(cr.Dept_Name))
    and &pwhereclause
    order by 1,3,6,8
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataTrigger name="beforeReport" source="xxknc_qty_in_queue.BeforeReportTrigger(:P_QTY_IN_QUEUE)" />
    <dataStructure>
    <group name="G_DEPT_NAME" source="MAIN_Q1">
    <element name="Dept_Name" value="DEPT_NAME" />
    <element name="DEPT_DESCRIPTION" value="DEPT_DESCRIPTION" />
    <element name="LOT_NUMBER" value="LOT_NUMBER" />
    <element name="QUANTITY_SCHEDULED" value="QUANTITY_SCHEDULED" />
    <element name="CRITICAL_RATIO" value="CRITICAL_RATIO" />
    <element name="SCHED_OP_START_DATE" value="SCHED_OP_START_DATE" />
    <element name="SCHED_OP_COMPLETION_DATE" value="SCHED_OP_COMPLETION_DATE" />
    <element name="JOB_COMP_DATE" value="JOB_COMP_DATE" />
    <element name="JOB_NAME" value="JOB_NAME" />
    <element name="ITEM" value="ITEM" />
    <element name="ITEM_DESCRIPTION" value="ITEM_DESCRIPTION" />
    <element name="OPER" value="OPER" />
    <element name="OPER_DESCRIPTION" value="OPER_DESCRIPTION" />
    <element name="QUANTITY_IN_QUEUE" value="QUANTITY_IN_QUEUE" />
    <element name="QUANTITY_COMPLETED" value="QUANTITY_COMPLETED" />
    <element name="CF_ROWNUMFORMULA" value="CF_ROWNUMFORMULA" />
    <element name="S_DEPT" value="S_DEPT" />
    <element name="E_DEPT" value="E_DEPT" />
    <element name="P_QTY_IN_QUEUE" value="P_QTY_IN_QUEUE" />
    </group>
    </dataStructure>
    </dataTemplate>
    create or replace package xxknc_qty_in_queue is
    P_QTY_IN_QUEUE varchar2(100);
    pwhereclause varchar2(1000);
    function BeforeReportTrigger(p_qty_in_queue IN varchar2) return boolean;
    function CF_RowNumFormula return number;
    end xxknc_qty_in_queue;
    create or replace package body xxknc_qty_in_queue as
    function BeforeReportTrigger(p_qty_in_queue IN varchar2) return boolean
    is
    begin
    pwhereclause := 'x';
    if(upper(P_QTY_IN_QUEUE) = 'YES') then
         pwhereclause := 'cr.Quantity_In_Queue > 0';
    elsif (upper(P_QTY_IN_QUEUE) = 'NO') then
         pwhereclause := 'cr.Quantity_In_Queue = 0';
    else
         pwhereclause := '1=1';      
    end if;
    return (TRUE);
    end BeforeReportTrigger;
    function CF_RowNumFormula return Number
    is
    vCount number;
    begin
         vCount := 0;
         vCount:=apps.XXKNC_SHIP_OUTLOOK_REPORT;
         if (mod(vCount,2) = 0) then
              return 1;
    else
    return 0;
    end if;
    end CF_RowNumFormula;
    end xxknc_qty_in_queue;
    Custom Application: Version : UNKNOWN
    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
    XXKNC_WIPDJCR_DEF module: XXKNC_WIP_XML_Data_Template
    Current system time is 20-JUL-2009 08:24:12
    XDO Data Engine Version No: 5.6.3
    Resp: 20420
    Org ID : 81
    Request ID: 3370019
    All Parameters: S_DEPT=ADMIN:E_DEPT=INSP:P_QTY_IN_QUEUE=YES:CP_QTY_IN_QUEUE=YES
    Data Template Code: XXKNC_WIPDJCR_DEF
    Data Template Application Short Name: CUSTOM
    Debug Flag: N
    {E_DEPT=INSP, S_DEPT=ADMIN, CP_QTY_IN_QUEUE=YES, P_QTY_IN_QUEUE=YES}
    Calling XDO Data Engine...
    [072009_082414567][][ERROR] Variable 'pwhereclause' is missing....
    [072009_082414616][][EXCEPTION] java.sql.SQLException: ORA-06550: line 2, column 18:
    PLS-00103: Encountered the symbol "." when expecting one of the following:
    ( - + case mod new not null <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> avg
    count current exists max min prior sql stddev sum variance
    execute forall merge time timestamp interval date
    <a string literal with character set specification>
    <a number> <a single-quoted SQL string> pipe
    <an alternatively-quoted string literal with character set specification>
    <an alternatively-quoted S
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:590)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1973)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1119)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2191)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2064)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2989)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:658)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:736)
         at oracle.apps.xdo.dataengine.DataTemplateParser.getRemoteValue(DataTemplateParser.java:1756)
         at oracle.apps.xdo.dataengine.DataTemplateParser.getSubstituteObject(DataTemplateParser.java:1583)
         at oracle.apps.xdo.dataengine.DataTemplateParser.replaceSubstituteVariables(DataTemplateParser.java:1404)
         at oracle.apps.xdo.dataengine.XMLPGEN.processSQLDataSource(XMLPGEN.java:440)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeData(XMLPGEN.java:429)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:300)
         at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:266)
         at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:205)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:237)
         at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.java:364)
         at oracle.apps.xdo.oa.util.DataTemplate.processData(DataTemplate.java:236)
         at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:293)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:161)
    --SQLException
    java.sql.SQLException: ORA-00920: invalid relational operator
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:590)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1973)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:850)
         at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2599)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2963)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:658)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:584)
         at oracle.apps.xdo.dataengine.XMLPGEN.processSQLDataSource(XMLPGEN.java:515)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeData(XMLPGEN.java:429)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:300)
         at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:266)
         at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:205)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:237)
         at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.java:364)
         at oracle.apps.xdo.oa.util.DataTemplate.processData(DataTemplate.java:236)
         at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:293)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:161)
    Start of log messages from FND_FILE
    End of log messages from FND_FILE
    Executing request completion options...
    Finished executing request completion options.
    Concurrent request completed
    Current system time is 20-JUL-2009 08:24:14
    ---------------------------------------------------------------------------

    Misra, I noticed that I misspelled my pwhereclaus parameter so I went back and corrected it. When I executed the data template I got a new error. Can you tell me what this error means or how to fix this?
    Custom Application: Version : UNKNOWN
    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
    XXKNC_WIPDJCR_DEF module: XXKNC_WIP_XML_Data_Template
    Current system time is 20-JUL-2009 11:40:07
    XDO Data Engine Version No: 5.6.3
    Resp: 20420
    Org ID : 81
    Request ID: 3370253
    All Parameters: S_DEPT=ADMIN:E_DEPT=BIO:P_QTY_IN_QUEUE=YES:CP_QTY_IN_QUEUE=YES
    Data Template Code: XXKNC_WIPDJCR_DEF
    Data Template Application Short Name: CUSTOM
    Debug Flag: N
    {E_DEPT=BIO, S_DEPT=ADMIN, CP_QTY_IN_QUEUE=YES, P_QTY_IN_QUEUE=YES}
    Calling XDO Data Engine...
    java.lang.NullPointerException
         at oracle.apps.xdo.dataengine.DataTemplateParser.getObjectVlaue(DataTemplateParser.java:1695)
         at oracle.apps.xdo.dataengine.DataTemplateParser.replaceSubstituteVariables(DataTemplateParser.java:1414)
         at oracle.apps.xdo.dataengine.XMLPGEN.processSQLDataSource(XMLPGEN.java:440)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeData(XMLPGEN.java:429)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:300)
         at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:266)
         at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:205)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:237)
         at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.java:364)
         at oracle.apps.xdo.oa.util.DataTemplate.processData(DataTemplate.java:236)
         at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:293)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:161)
    Start of log messages from FND_FILE
    End of log messages from FND_FILE
    Executing request completion options...
    Finished executing request completion options.
    Concurrent request completed
    Current system time is 20-JUL-2009 11:40:09
    ---------------------------------------------------------------------------

  • Data template error while viewing DataSet

    Hi,
    I am trying to view DataSet{DS2}.
    The dataset is of type "Data template" {DT1}
    Pl. find below data template xml pasted in the text field
    <dataTemplate name="DT1" description="Application Details" dataSourceRef="dev100">
         <parameters>
              <parameter name="p_apl_id" dataType="number"/>
         </parameters>
         <dataQuery>
              <sqlStatement name="Q1">
                   <![CDATA[
       SELECT apl_id, apl_first_name, apl_last_name from applicants
                         where apl_id < nvl(:p_apl_id,apl_id)
      ]]>
              </sqlStatement>
         </dataQuery>
         <dataStructure>
              <group name="G_APP" source="Q1">
                   <element name="apl_id" value="apl_id"/>
                   <element name="apl_first_name" value="apl_first_name"/>
                   <element name="apl_last_name" value="apl_last_name"/>
              </group>
         </dataStructure>
    </dataTemplate>
    The error I am getting while viewing dataset is as below. Appreciate quick response.
    [110906_042135613][][EXCEPTION] oracle.xml.parser.v2.XMLParseException: Expected name instead of .
    at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:205)
    at oracle.xml.parser.v2.XMLReader.scanNameChars(XMLReader.java:1001)
    at oracle.xml.parser.v2.XMLReader.scanQName(XMLReader.java:1639)
    at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1170)
    at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:301)
    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:227)
    at oracle.apps.xdo.dataengine.DataTemplateParser.<init>(DataTemplateParser.java:142)
    at oracle.apps.xdo.dataengine.XMLPGEN.setDataTemplate(XMLPGEN.java:504)
    at oracle.apps.xdo.dataengine.DataProcessor.setDataTemplate(DataProcessor.java:182)
    at oracle.apps.xdo.servlet.data.bind.AdvancedQueryBoundValue11.callDataProcessor(AdvancedQueryBoundValue11.java:109)
    at oracle.apps.xdo.servlet.data.bind.AdvancedQueryBoundValue11.getValue(AdvancedQueryBoundValue11.java:79)
    at oracle.apps.xdo.servlet.ReportContextImplV11.getReportXMLData(ReportContextImplV11.java:335)
    at oracle.apps.xdo.servlet.XDOProcessor.process(XDOProcessor.java:235)
    at oracle.apps.xdo.servlet.ReportImpl.renderBody(ReportImpl.java:251)
    at oracle.apps.xdo.servlet.ReportImpl.renderReportBody(ReportImpl.java:46)
    at oracle.apps.xdo.servlet.XDOServlet.writeReport(XDOServlet.java:319)
    at oracle.apps.xdo.servlet.XDOServlet.writeReport(XDOServlet.java:223)
    at oracle.apps.xdo.servlet.XDOServlet.doGet(XDOServlet.java:159)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
    at oracle.apps.xdo.servlet.security.SecurityFilter.doFilter(SecurityFilter.java:52)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:629)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
    at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:595)
    [110906_042258194][][EXCEPTION] java.lang.NullPointerException
    at oracle.apps.xdo.dataengine.DataTemplateParser.GetNodeNumChildren(DataTemplateParser.java:326)
    at oracle.apps.xdo.dataengine.DataTemplateParser.templateParser(DataTemplateParser.java:261)
    at oracle.apps.xdo.dataengine.XMLPGEN.setDataTemplate(XMLPGEN.java:511)
    at oracle.apps.xdo.dataengine.DataProcessor.setDataTemplate(DataProcessor.java:182)
    at oracle.apps.xdo.servlet.data.bind.AdvancedQueryBoundValue11.callDataProcessor(AdvancedQueryBoundValue11.java:109)
    at oracle.apps.xdo.servlet.data.bind.AdvancedQueryBoundValue11.getValue(AdvancedQueryBoundValue11.java:79)
    at oracle.apps.xdo.servlet.ReportContextImplV11.getReportXMLData(ReportContextImplV11.java:335)
    at oracle.apps.xdo.servlet.XDOProcessor.process(XDOProcessor.java:235)
    at oracle.apps.xdo.servlet.ReportImpl.renderBody(ReportImpl.java:251)
    at oracle.apps.xdo.servlet.ReportImpl.renderReportBody(ReportImpl.java:46)
    at oracle.apps.xdo.servlet.XDOServlet.writeReport(XDOServlet.java:319)
    at oracle.apps.xdo.servlet.XDOServlet.writeReport(XDOServlet.java:223)
    at oracle.apps.xdo.servlet.XDOServlet.doGet(XDOServlet.java:159)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
    at oracle.apps.xdo.servlet.security.SecurityFilter.doFilter(SecurityFilter.java:52)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:629)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
    at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:595)
    [110906_042258198][][EXCEPTION] java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at com.sun.java.util.collections.ArrayList.RangeCheck(ArrayList.java:492)
    at com.sun.java.util.collections.ArrayList.get(ArrayList.java:306)
    at oracle.apps.xdo.dataengine.DataTemplateParser.getParentDataSource(DataTemplateParser.java:1449)
    at oracle.apps.xdo.dataengine.XMLPGEN.writeDefaultGroup(XMLPGEN.java:298)
    at oracle.apps.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:264)
    at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:251)
    at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:192)
    at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:229)
    at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.java:336)
    at oracle.apps.xdo.servlet.data.bind.AdvancedQueryBoundValue11.callDataProcessor(AdvancedQueryBoundValue11.java:126)
    at oracle.apps.xdo.servlet.data.bind.AdvancedQueryBoundValue11.getValue(AdvancedQueryBoundValue11.java:79)
    at oracle.apps.xdo.servlet.ReportContextImplV11.getReportXMLData(ReportContextImplV11.java:335)
    at oracle.apps.xdo.servlet.XDOProcessor.process(XDOProcessor.java:235)
    at oracle.apps.xdo.servlet.ReportImpl.renderBody(ReportImpl.java:251)
    at oracle.apps.xdo.servlet.ReportImpl.renderReportBody(ReportImpl.java:46)
    at oracle.apps.xdo.servlet.XDOServlet.writeReport(XDOServlet.java:319)
    at oracle.apps.xdo.servlet.XDOServlet.writeReport(XDOServlet.java:223)
    at oracle.apps.xdo.servlet.XDOServlet.doGet(XDOServlet.java:159)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
    at oracle.apps.xdo.servlet.security.SecurityFilter.doFilter(SecurityFilter.java:52)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:629)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
    at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:595)
    Regards,
    Nishi
    Message was edited by:
    user542026

    Hi Tim,
    Thanks for your quick response.
    I copied the text on XML publisher server. {http://server:15101/xmlpserver/servlet/report}
    Navigated to Report > DataModel > Data Template {text area}
    Regards,
    Nishi

  • Unable to debug the Data Template Error in the Log file

    Hi,
    I am unable to debug the log file error message Please can anybody explain me in detail where the error lies and how to solve the error.The log file shows the following message.
    XDO Data Engine ver 1.0
    Resp: 50554
    Org ID : 204
    Request ID: 2865643
    All Parameters: USER_ID=1318:REPORT_TYPE=Report Only:P_SET_OF_BOOKS_ID=1:TRNS_STATUS=Posted:P_APPROVED=Not Approved:PERIOD=Sep-05
    Data Template Code: ILDVAPDN
    Data Template Application Short Name: CLE
    Debug Flag: Y
    {TRNS_STATUS=Posted, REPORT_TYPE=Report Only, PERIOD=Sep-05, USER_ID=1318, P_SET_OF_BOOKS_ID=1, P_APPROVED=Not Approved}
    Calling XDO Data Engine...
    java.lang.NullPointerException
         at oracle.apps.xdo.dataengine.DataTemplateParser.getObjectVlaue(DataTemplateParser.java:1424)
         at oracle.apps.xdo.dataengine.DataTemplateParser.replaceSubstituteVariables(DataTemplateParser.java:1226)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeData(XMLPGEN.java:398)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:281)
         at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:251)
         at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:192)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:222)
         at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.java:334)
         at oracle.apps.xdo.oa.util.DataTemplate.processData(DataTemplate.java:236)
         at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:272)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:148)
    Start of log messages from FND_FILE
    Start of After parameter Report Trigger Execution..
    Gl Set of Books.....P
    Organization NameVision Operations
    Entering TRNS STATUS POSTED****** 648Posted
    end of the trns status..687 Posted
    currency_code 20USD
    P_PRECISION 272
    precision 332
    GL NAME 40Vision Operations (USA)
    Executing the procedure get format ..
    ExecutED the procedure get format and the Result..
    End of Before Report Execution..
    End of log messages from FND_FILE
    Executing request completion options...
    ------------- 1) PUBLISH -------------
    Beginning post-processing of request 2865643 on node AP615CMR at 28-SEP-2006 07:58:26.
    Post-processing of request 2865643 failed at 28-SEP-2006 07:58:38 with the error message:
    One or more post-processing actions failed. Consult the OPP service log for details.
    Finished executing request completion options.
    Concurrent request completed
    Current system time is 28-SEP-2006 07:58:38
    Thanks & Regards
    Suresh Singh

    Generally the DBAs are aware of the OPP service log. They can tell you the cause of the problem.
    Anyway, how did you resolve the issue?

  • 'Order by' in a parameter - in AfterPForm trigger..? in a Data template..?

    Arrrfternoon all.
    As title confusingly asks.. Has anybody put an 'order by' parameter into their data template either by the use of a trigger or by some other way..?
    As one or two have may have guessed by now, I'm a newbie to BIP with no training but am learning fast..
    In ORACLE Reports 6i I'd stick the order by in the select statement, named it in the Conc Program 'token' and have the details that the user can choose from (if...then...else'd..) in the AfterpForm section.
    If the above still applies (and from the example data templates I've seen - it does) then all I do is call the AfterPForm trigger in the data template BUT, where do I write and place the actual PForm trigger (that includes the if orderby = 'empname' ...then..)..?
    thanks for reading..
    Steven

    OK, I've now created my data template that includes a reference to the trigger.
    I've also created my package Header and Body - but the question still remains.. How do I now include the Package Header & Body when the Data Template is being run..? How is it referenced? If I just run this data template in my BIP'd Concurrent Program surely it'll just say 'whats the trigger you've mentioned - where is it..?'
    Basically, I don't how this hangs together at all. Can someone please help me out here?
    Many Thanks for looking..
    Steven

  • Error while validating data  template

    hi ,
    I get the following error while i validate the data template
    failed to save data
    error occured while crating xml data
    nls_error_illegal_value
    NaN
    Nan
    the following is the data template
    <dataTemplate name="dataTemplateName" description="Template description"
    dataSourceRef="val_ds" defaultPackage="employee" version="1.0">
    <parameters>
    <parameter name="department" dataType="character" defaultValue="10"/>
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1"
    select EMPNO,ENAME,JOB from emp WHERE DEPTNO=:department
    </sqlStatement>
    <dataQuery>
    <dataTrigger name="beforeReport" source="employee.beforeReportTrigger"/>
    <datastructure>
    <group name="G_EMPLOYEE" source="Q1">
    <element name="EMPLOYEE_NUMBER" value="EMPNO"/>
    <element name="NAME" value="ENAME"/>
    <element name="SALARY" value="SAL"/>
    </group>
    </dataStructure>
    </dataTemplate>
    can someone checkfor me
    ta
    s

    Hi,
    Try removing the defaultPackage="employee" from the dataTemplate element. I also noticed that there are the following errors in your XML template:
    <sqlStatement name="Q1" is missing the closing ">"
    There are two <dataQuery> tags - the 2nd one should obviously be </dataQuery>
    You are selecting EMPNO,ENAME,JOB but reference EMPNO,ENAME and JOB in your GROUP
    Cheers
    Andy

  • How to set the value of a data template parameter at runtime?

    I went through the document and found one line "A parameter is a variable whose value can be set at runtime.". But there is no further description or example about this feature.
    Can anyone tell how to do or show me a example?
    Thanks in advance

    Hi,
    define in the report-definition a parameter (for example p_deptno). This results in an entry in the xdo-file:
    <parameter id="p_deptno"> ....
    Define the same parameter in the Data Template ....
         <parameters>
    <parameter name="p_deptno" datatype="number"/>
    </parameters>
    and use this parameter in your Query:
    <sqlStatement name="QueryDept">
    <![CDATA[SELECT DEPTNO,DNAME,LOC FROM DEPT WHERE DEPTNO = :p_depnto]]>
    </sqlStatement>
    Regards
    Rainer

  • Date Parameter : Unable to retrieve data thru data template

    I have a data template with a date parameter. I used it in a query to extract records for a specific date. No matter which format I use in the query, the query returns a null although there are records. Please advise. I need this as soon as possible.
    <parameter name="PD" dataType="date" />SELECT to_char(run_date,'DD-MON-YYYY') C_RUN_DATE ,cust_action ACTION,count(1) ACTION_COUNT from CDL hdrlog where
    last_run_status='A' and to_char(run_date,'DD-MON-YYYY') = :PD group by to_char(run_date,'DD-MON-YYYY'),cust_action
    order by c_run_date
    I tried with to_char, to_date etc... nothing works.
    thanks
    J

    See example below for date,note the format we supported as state in the doc.
    If you would like to set as character then change type to character and use to_char around the bind var.
    <?xml version="1.0" encoding="WINDOWS-1252" ?>
    <dataTemplate name="dataTemplateName" description="Template description" version="1.0">
    <parameters>
    <parameter name="p_hiredate" dataType="date">1980-12-17</parameter>
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[SELECT d.DEPTNO,d.DNAME,d.LOC,
                         EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,nvl(COMM,0) from dept d, emp e
                          where hiredate=:p_hiredate]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_DEPT" source="Q1">
    <element name="DEPT_NUMBER" value="DEPTNO" />
    <element name="DEPT_NAME" value="DNAME"/>
    <element name="DEPTSAL" value="G_EMP.SALARY" function="SUM()"/>
    <element name="LOCATION" value="LOC" />
    <group name="G_EMP" source="Q1">
    <element name="EMPLOYEE_NUMBER" value="EMPNO" />
    <element name="NAME" value="ENAME"/>
    <element name="JOB" value="JOB" />
    <element name="MANAGER" value="MGR"/>
    <element name= "HIREDATE" value="HIREDATE"/>
    <element name="SALARY" value="SAL"/>
    </group>     
    </group>
    </dataStructure>
    </dataTemplate>

Maybe you are looking for

  • Document is a not clearing document(erreo f0604)

    Hai when I am checking for display check register (FCHN), I am getting error like  DOCUMENT IS A NOT CLEARING DOCUMENT. pls help to me on this error. Regards Muthu.

  • Clicking on a link opens a broken window that never completes?

    When clicking on some links (for example, a list of links to pages in a newsletter email), a few will open, then I get dead windows. Sometimes the window will have just a title in the top bar and not go any further. More recently, I've been getting t

  • BOE XI3.1 Voyager dimension hierarchies search

    我现在使用的 cube   有一个 product   hierarchies ,分成 4 个 level,最小一层大概包含 50W 行数据,因此在使用中经常用到 member selector, 但是在做 search 的时候非常的慢,我想问一下如何能够提搞search 的效率?因为严重影响用户的使用.

  • CUA Installation issue

    Hi Forum folks, I have the CUA cookbook, and have followed the setup steps detailed in it.  My test CUA system is almost working but I have one error, and a few questions, to which I haven't yet been able to find the answer.  I was wondering if you'd

  • Can i get imovie free bought iphone in feb 2013?

    I got my iphone5 (which is always updated with the newest software) in February 2013 and i really want imovie. My friends all bought it free. i found out that devices purchased after September 2013 were able to buy iwork aand ilife apps for free. One