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

Similar Messages

  • Sum of Elements in Data Template

    Dear Members,
    I am developing a report using Oracle BI Publisher 10.1.3.
    We are on E-Business Suite R12. I am using Data Template to Generate xml.
    Following is my element structure in Data Template:
    <dataTrigger name="afterParameterFormTrigger" source="XX_TEST_PKG.afterpform" />
    <dataStructure>
      <element name="P_REQUEST_ID" dataType="number" value="XX_TEST_PKG.P_REQUEST_ID" />
         <group name="G_PRODUCT" source="Q_MAIN">
           <element name="PROD_ITEM" dataType="varchar2" value="prod_item" />
           <element name="PROD_DESCR" dataType="varchar2" value="prod_descr" />
           <element name="PROD_ORGANIZATION_ID" dataType="number" value="prod_organization_id" />
           <element name="PROD_ITEM_TYPE" dataType="varchar2" value="prod_item_type" />
           <element name="prod_resources" dataType="number" value="prod_resources" />
           <element name="CS_TOTAL_EXT_COST" function="sum" dataType="number" value="G_ING.EXT_COST" />
            <element name="PERIOD_CODE" dataType="varchar2" value="period_code" />
               <group name="G_ING" source="Q_MAIN">
                   <element name="LINE_NO" dataType="number" value="LINE_NO" />              
                   <element name="LINE_TYPE" dataType="number" value="LINE_TYPE" />
                   <element name="ING_ITEM" dataType="varchar2" value="ING_ITEM" />
                   <element name="ING_ITEM_ID" dataType="number" value="ING_ITEM_ID" />
                   <element name="ING_DESCR" dataType="varchar2" value="ING_DESCR" />
                   <element name="ING_ORGANIZATION_ID" dataType="number" value="ING_ORGANIZATION_ID" />
                   <element name="QTY" dataType="number" value="QTY" />
                   <element name="ING_COST" dataType="number" value="ING_COST" />
                   <element name="EXT_COST" dataType="number" value="EXT_COST" />
               </group>
        </group>
    </dataStructure>I want to sum elements by name CS_TOTAL_EXT_COST and prod_resources and put that value under G_PRODUCT.
    I tried the following but it did not work:
    <element name="SUM_TEST" dataType="number" value="XX_TEST_PKG.SUM_TESTING(:CS_TOTAL_EXT_COST,:prod_resources)" /> XX_TEST_PKG.SUM_TESTING is a function which sums the input parameters.
    In report Builder this was very easy. I would have created a formula column and summed up what ever elements i want. I am not sure how do we do this in Data Template?
    Thanks
    Sandeep

    Any Ideas on how to Achieve the Sum of a Summary Column(CS_TOTAL_EXT_COST) and a Column(prod_resources) using data template?
    As i mentioned before in reports builder, this can be achieved by creating a formula column and summing both columns.
    I am not able to understand how do we do this in Data Template?
    I can also sum those elements in MSWord Rtf Template, but are there any other options.
    Thanks
    Sandeep

  • 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

  • Index: 0, Size: 0 error while creating data template in BI Publisher

    Hi
    When i am trying to create the data template for BI Publisher reporting. i am gettinhg the Index: 0, Size: 0
    error. I checked the query that i have used to create template and it is working fine. But not sure why it is not happening while creating the data template. Can anybody help me out please.

    how about pasting the content of your data template here, so that forum members can see what could be the problem.

  • 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

  • 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

  • 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

  • Getting error when try to upload xml file into Data Template

    Hi,
    Getting error when try to upload xml file into Data Template.error:"The uploaded file XXSLARPT.xml is invalid. The file should be in XML-DATA-TEMPLATE format."Plz anybody help me.
    Thanks,
    Prasad.

    Hi,
    Anybody Help Plzzzzzz.
    thx,
    Prasad

  • Error during registering Data Template in Oracle BI Publisher

    Hi,
    While creating report in BI Publisher. I am taking type as "Data Template".
    Below is the error:
    Failed to save data.
    Error occured when creating xml data.
    TypeError
    Object Required
    Thanks,
    Abdul.

    Hi ,
    what abt the other type is it working for you..
    after selecting the report r u not able to see the below format
    <dataTemplate>
    <dataQuery>
    </dataQuery>
    </dataTemplate>
    Thanks,
    Ananth

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

  • Concurrent program XML Data template error.

    Internal Controls Manager: Version : 12.0.0
    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
    XX_EMP module: xx_emp_cP
    Current system time is 10-JAN-2009 08:41:41
    XDO Data Engine Version No: 5.6.3
    Resp: 20420
    Org ID : 101
    Request ID: 814249
    All Parameters: p_DeptNo=10
    Data Template Code: XX_EMP
    Data Template Application Short Name: AMW
    Debug Flag: N
    {p_DeptNo=10}
    Calling XDO Data Engine...
    java.lang.NullPointerException
         at oracle.apps.xdo.oa.util.DataTemplate.getDataTemplate(DataTemplate.java:281)
         at oracle.apps.xdo.oa.util.DataTemplate.<init>(DataTemplate.java:133)
         at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:282)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:157)

    this is XML publisher error.
    Please post the message in XML publisher forum
    --Prjasanna                                                                                                                                                                                       

  • 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

  • Error in viewing data in a data template with multiple data sources

    Hello,
    I have designed a data template with two data sources.One is from DEPARTMENTS table and the other datasource is a xml file.Following is the code for the data template :
    <dataTemplate name="EmployeeListing" dataSourceRef="demo">
    <parameters>
    <parameter name="p_DEPTNO" dataType="character" defaultValue="20"/>
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[SELECT DEPARTMENT_NAME,DEPARTMENT_ID,LOC from DEPARTMENTS]]>
    </sqlStatement>
    <xml name="empxml" expressionPath=".//ROW[DEPARTMENT_NAME =$DEPARTMENT_NAME]">
    <url method="GET" realm="" username="" password="">file:///D:\OraHome_1\xmlp\XMLP\DemoFiles\Employee Salary Report.xml</url>
    </xml>
    /dataQuery>
    </dataTemplate>
    The problem is when i am trying to view the data, only data from SQL Query Q1 is getting displayed and the data from Employee xml is not at all getting displayed.
    Could anyone please let me know what i am missing?
    Thanks
    Nutan
    Edited by: user609971 on Oct 23, 2008 8:06 AM

    This is from Documenation sample....
    Did you see the data structure section, where you say, how you wanted the columns ?
    <?xml version="1.0" encoding="WINDOWS-1252" ?>
    <dataTemplate name="Employee Listing" description="List of Employees" v
    ersion="1.0">
    <parameters>- Defines a single parameter for the Department Number
    - with default of 20:
    <parameter name="p_DEPTNO" dataType="character"
    defaultValue="20"/>
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[SELECT DEPTNO,DNAME,LOC from dept
                      order by deptno]]>
    </sqlStatement>
    <xml name="empxml" expressionPath=".//ROW[DEPTNO=$DEPTNO]"> - Defines name
    - and link to DEPTNO in Q1
    <url method="GET" realm="" username="" password="">
    file:///d:/dttest/employee.xml</url> - Defines url for xml data
    </xml>
    </dataQuery>-
    <dataStructure>- The following section specifies the XML hierarchy
    - for the returning data:
    <group name="G_DEPT" source="Q1"
    <element name="DEPT_NUMBER" value="DEPTNO" />
    <element name="DEPT_NAME" value="DNAME"/>
    - This creates a summary total at the department level based
    - on the salaries at the employee level for each department:      
    <element name="DEPTSAL" value="G_EMP.SALARY"
    function="SUM()"/>
              <element name="LOCATION" value="LOC" />
    <group name="G_EMP" source="empxml">
    <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>

  • Calling Sql Procedure from data template

    Hello,
    I am facing problem to call a stored procedure which inserts data into DB when a report is generated.
    I tried to use data trigger before report, It did not call the procedure nor it gave any error.
    I looked into thread dataTrigger beforeReport doesn't fire
    and used the defaultPackage = "SEQUENCE_NUMBER", I am getting error parameter not declared
    listing all the parameters declared in my XML.
    Below is my data template
    <dataTemplate name="HURDetail" dataSourceRef="BRM_DATA_SOURCE">
         <parameters>
              <parameter name="PARAM_REPORT_TYPE" dataType="character" defaultValue="%"/>
              <parameter name="PARAM_ROAMING_PART_NAME" dataType="character" defaultValue="%"/>
              <parameter name="PARAM_START_DATE" dataType="character"/>
              <parameter name="PARAM_END_DATE" dataType="character"/>
         </parameters>
         <dataQuery>
              <sqlStatement name="Q1">
                   <![CDATA[
    SELECT  
    "EVENT_DLAY_SESS_TLCS_T"."SECONDARY_MSID" as MSID,
    MIN("EVENT_T"."START_T") DFC,
    MAX("EVENT_T"."START_T") DATE_LAST_CALL,
    COUNT ("EVENT_DLAY_SESS_TLCS_T"."SECONDARY_MSID") NC,
    TO_CHAR( SUM("EVENT_BAL_IMPACTS_T"."AMOUNT_ORIG"),'FM000000000.000') SDR,
    "EVENT_DLAY_SESS_TLCS_T"."SVC_CODE" as SVC_CODE,
    "IFW_EXCHANGE_RATE"."TO_CURRENCY" as CURR,
    "IFW_EXCHANGE_RATE"."EXCHANGE_RATE" as EXC_RATE
    FROM
    ((((SERVICE_T "SERVICE_T" INNER JOIN SERVICE_ALIAS_LIST_T "SERVICE_ALIAS_LIST_T" ON
    "SERVICE_T"."POID_ID0" = "SERVICE_ALIAS_LIST_T"."OBJ_ID0")
    INNER JOIN (EVENT_DLAY_SESS_TLCS_T "EVENT_DLAY_SESS_TLCS_T" INNER JOIN EVENT_T "EVENT_T" ON
    "EVENT_DLAY_SESS_TLCS_T"."OBJ_ID0" = "EVENT_T"."POID_ID0") ON
    "SERVICE_T"."POID_ID0" = "EVENT_T"."SERVICE_OBJ_ID0")
    INNER JOIN EVENT_BAL_IMPACTS_T "EVENT_BAL_IMPACTS_T" ON
    "EVENT_T"."POID_ID0" = "EVENT_BAL_IMPACTS_T"."OBJ_ID0")
    INNER JOIN CONFIG_BEID_BALANCES_T "CONFIG_BEID_BALANCES_T" ON
    "EVENT_BAL_IMPACTS_T"."RESOURCE_ID" = "CONFIG_BEID_BALANCES_T"."REC_ID")
    INNER JOIN IFW_EXCHANGE_RATE "IFW_EXCHANGE_RATE" ON
    "CONFIG_BEID_BALANCES_T"."BEID_STR_CODE" = "IFW_EXCHANGE_RATE"."FROM_CURRENCY"
    WHERE (   
    ("EVENT_T"."START_T">=bipext.infstrtotimet(:PARAM_START_DATE,2) AND
    "EVENT_T"."START_T"<=bipext.infstrtotimet(:PARAM_END_DATE,2)-1) AND
    "SERVICE_ALIAS_LIST_T"."NAME" = :PARAM_ROAMING_PART_NAME AND
    "EVENT_T"."SERVICE_OBJ_TYPE" = '/service/settlement/roaming/outcollect' AND
    "EVENT_T"."POID_TYPE" = '/event/delayed/session/telco/gsm/roaming' AND
    "IFW_EXCHANGE_RATE"."TO_CURRENCY" = 'EUR' AND
    bipext.infCheckDates(:PARAM_START_DATE, :PARAM_END_DATE) = 1
         ]]>
         </sqlStatement>
         </dataQuery>
         <dataTrigger name="beforeReport" source="SEQUENCE_NUMBER.Seq_Num_Gen_Proc(:PARAM_START_DATE, :PARAM_END_DATE, :PARAM_ROAMING_PART_NAME, :PARAM_REPORT_TYPE)"/>
         <datastructure>
              <group name="Q1" source="Q1">
                   <element name="MSID" value="MSID"/>
                   <element name="DFC" value="DFC"/>
                   <element name="DATE_LAST_CALL" value="DATE_LAST_CALL"/>
                   <element name="NC" value="NC"/>
                   <element name="DC_HHHMMSS" value="DC_HHHMMSS"/>
                   <element name="SDR" value="SDR"/>
                   <element name="SVC_CODE" value="SVC_CODE"/>
                   <element name="CURR" value="CURR"/>
                   <element name="EXC_RATE" value="EXC_RATE"/>
              </group>
         </datastructure>
    </dataTemplate>
    Please suggest, How to call a stored procedure

    1. Does dataTrigger triggers the procedure only when we execute the report and not when we just view the report ?
    2.If I add defaultPackage="HUR_Seq_NUM" in my template I get the error
    ORA-06550: line 2, column 13:
    PLS-00302: component 'PARAM_REPORT_TYPE' must be declared
    ORA-06550: line 2, column 1:
    PL/SQL: Statement ignored
    ORA-06550: line 3, column 13:
    PLS-00302: component 'PARAM_ROAMING_PART_NAME' must be declared
    ORA-06550: line 3, column 1:
    PL/SQL: Statement ignored
    ORA-06550: line 4, column 13:
    PLS-00302: component 'PARAM_START_DATE' must be declared
    ORA-06550: line 4, column 1:
    PL/SQL: Statement ignored
    ORA-06550: line 5, column 13:
    PLS-00302: component 'PARAM_END_DATE' must be declared
    ORA-06550: line 5, column 1:
    PL/SQL: Statement ignored

  • Data template is invalid. Should be in XML-DATA-TEMPLATE format.

    Hi,
    I am trying to create & upload a Data Template for a Data Definition in XML Publisher. When I try to upload my data template, it shows me the error :-
    " The uploaded file PAFPURUP_TEMPLATE.xml is invalid. The file should be in XML-DATA-TEMPLATE format. "
    Can any please suggest me a possible resolution to this error? Below is my data template content :-
    <?xml version="1.0" encoding="WINDOWS-1252" ?>
    <dataTemplate name="PAFPURUP_TEMPLATE" description="Data template for PAFPURUP" defaultPackage="PA_PAFPURUP_PKG" version="1.0">
    <parameters>
    <parameter name ="count" dataType="character" defaultValue="10"/>
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[SELECT BUDGET_VERSION_ID, VERSION_NAME FROM PA_BUDGET_VERSIONS WHERE ROWNUM <= :count]]>
    </sqlStatement>
    </dataQuery>
    <dataTrigger name="beforeReport" source="PA_PAFPURUP_PKG.beforeReportTrigger"/>
    <dataStructure>
    <group name ="G_BUDGET_VERSIONS" source="Q1">
    <element name="Budget_Version_Id" value="budget_version_id"/>
    <element name="Version_Name" value="version_name"/>
    </group>
    </dataStructure>
    </dataTemplate>
    Many Thanks,
    Niranjan

    Hi Fred,
    Thanks for your response. The issue was actually with the xml format. I had missed '?' at the end of 1st line of the xml.
    Regards,
    Niranjan

Maybe you are looking for