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

Similar Messages

  • Handling Null element in Data Template

    Hi experts ,
    I am facing an issue, include_null_Element is not working properly. Find the sample code below and please help me out with your suggestion. Since my data template file is big i pasting less amount
    Data template file:-
    <?xml version="1.0" encoding="UTF-8" ?>
    <dataTemplate name="sample" defaultPackage="sample" version="1.0">
    <properties>
    <property name="xml_tag_case" value="lower " />
    <property name="scalable_mode" value="off" />
    <property name="debug_mode" value="on" />
    <property name="db_fetch_size" value="20" />
    <property name="include_parameters" value="true"/>
    <property name="include_null_Element" value="TRUE"/>
    <property name="include_rowsettag" value="true"/>
    </properties>
    <dataStructure>
    <*group name="G_c_fnd_precision" dataType="varchar2" source="Q_currency_precision">*
    *<element name="c_fnd_precision" dataType="number" value="C_FND_PRECISION"/>*
    *<element name="c_fnd_currency_code" dataType="varchar2" value="C_FND_CURRENCY_CODE"/>*
    *<group name="G_one_requestor_name" dataType="varchar2" source="Q_one_requestor">*
    *<element name="one_requestor_name" dataType="varchar2" value="ONE_REQUESTOR_NAME"/>*
    *</group>*
    *<group name="G_cancel_release_date" dataType="varchar2" source="Q_cancel_release">*
    *<element name="cancel_release_date" dataType="date" value="CANCEL_RELEASE_DATE"/>*
    </group>
    </group>
    </dataStructure>
    </dataTemplate>
    output (GETTING):-
    <LIST_G_C_FND_PRECISION>
         <G_C_FND_PRECISION>
              <C_FND_PRECISION>2</C_FND_PRECISION>
              <C_FND_CURRENCY_CODE>USD</C_FND_CURRENCY_CODE>
              <LIST_G_ONE_REQUESTOR_NAME>
                        <G_ONE_REQUESTOR_NAME>
                        <ONE_REQUESTOR_NAME>Green, Mr. Terry</ONE_REQUESTOR_NAME>
                        </G_ONE_REQUESTOR_NAME>
              </LIST_G_ONE_REQUESTOR_NAME>
         </G_C_FND_PRECISION>
    </LIST_G_C_FND_PRECISION>
    OUTPUT (TO BE GET) :-
    <LIST_G_C_FND_PRECISION>
         <G_C_FND_PRECISION>
              <C_FND_PRECISION>2</C_FND_PRECISION>
              <C_FND_CURRENCY_CODE>USD</C_FND_CURRENCY_CODE>
              <LIST_G_ONE_REQUESTOR_NAME>
                        <G_ONE_REQUESTOR_NAME>
                        <ONE_REQUESTOR_NAME>Green, Mr. Terry</ONE_REQUESTOR_NAME>
                        </G_ONE_REQUESTOR_NAME>
              </LIST_G_ONE_REQUESTOR_NAME>
    <LIST_G_CANCEL_RELEASE_DATE>
    </LIST_G_CANCEL_RELEASE_DATE>
         </G_C_FND_PRECISION>
    </LIST_G_C_FND_PRECISION>
    Need ur suggestion where i am making mistake. Thanks in Advance
    --Santhosh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi Raj,
    Already i tried by changing case for all property which i defined, but not making any sense.. :(
    Thanks in advance
    --Santhosh                                                                                                                                                                                                                                                                                                   

  • XML Data template. Using the SUM() function

    Hi there,
    I have a data template where I want to create a summary column based on the child group.
    *<group name="G_RO_ESTIMATES" source="Q_RO_ESTIMATES">
    <element name="ESTIMATE_TOTAL" value="G_RO_ESTIMATE_LINES.CHARGE" function="SUM()" />
    <group name="G_RO_ESTIMATE_LINES" source="Q_RO_ESTIMATE_LINES">
    <element name="CHARGE" value="CHARGE" />
    </group>
    </group>*
    ESTIMATE_TOTAL returns 0
    even though the value of the CHARGE column is 760.
    I got the SUM() function to work on another group further down in my data template but for some reason this will not work.
    Does anyone have a clue on what's wrong?
    Thank you in advance.
    BR Kenneth

    give the name of the element diff as CHARGE_TEST
    *<group name="G_RO_ESTIMATES" source="Q_RO_ESTIMATES">
    <element name="ESTIMATE_TOTAL_TEST" value="G_RO_ESTIMATE_LINES_GRP.CHARGE_TEST" function="SUM()" />
    <group name="G_RO_ESTIMATE_LINES_GRP" source="Q_RO_ESTIMATE_LINES">
    <element name="CHARGE_TEST" value="CHARGE" />
    </group>
    </group>*
    sometimes the name get overlapped which results in zero.. keep the names unique
    (i guess , i already logged a bug for this sometime back)

  • Does BI Data Template allows calling of a package insite group element

    Hi
    Is it possible to call a package inside the group element tag.
    When i try to call a package outside the group element it works out, but when I try to call it inside the group element it doesnt return any result.
    Am currently using BI Publisher version of 5.6.3 in Oracle Applications 12.1.3
    Regards
    Anoop

    Thanks for your detailed answer!!
    I am trying to call a package just to understand how it works .This package just inserts a row in "suppliers" table.I ma calling this package through 'beforeReprot' trigger and querying the table after that.
    I have written a package "test_pack" :
    create or replace
    package test_pack as
    function test_insert_fun return boolean;
    end test_pack;
    create or replace
    package body test_pack as
    function test_insert_fun return boolean is
    begin
    insert into suppliers values (1,'p1','p2');
    return (TRUE);
    end;
    end test_pack;
    Data Template :
    <dataTemplate name="test" dataSourceRef="demo" defaultpackage="test_pack">
         <dataQuery>
              <sqlStatement name="Q1">
                   <![CDATA[SELECT * from suppliers]]>
              </sqlStatement>
         </dataQuery>
         <dataTrigger name="beforeReport" source="test_pack.test_insert_fun()"/>
    </dataTemplate>
    However after this , when I try to view data , I amnot seeing any output.When i go nad check the suppliers table in db, i dont see any values.
    I believe this package should be executed everytime i view the data.
    Please advice!!

  • Is it possible to use an XML Data Template to create a report in APEX?

    Hi,
    I have created an XML Data Template in BI Publisher passing one parameter and running two queries, then created an RTF Document Template to present the data.
    I can create a nice report in BI Publisher using the two elements. I have used RTF Document Templates to publish reports in APEX but the data comes from a Report region running a single query.
    I would like to run a report based in this kind of XML Data Template, in order to use several children queries related to a parent query. Is it possible to do it in APEX, or you have to use BI Publisher?
    Francisco
    ===========================
    Below is a simple data template definition:
    <dataTemplate name="cotizacion_template" description="Prueba de data template para cotizaciones" dataSourceRef="dbxprts">
         <parameters>
              <parameter name="p_id_cotizacion" dataType="character" defaultValue="1009" include_in_output="true"/>
         </parameters>
         <dataQuery>
              <sqlStatement name="header_query">
                   <![CDATA[select id_cotizacion, fecha_cotizacion, id_clipro from f_cotizaciones where id_cotizacion = :p_id_cotizacion]]>
              </sqlStatement>
              <sqlStatement name="detail_query">
                   <![CDATA[select id_cotizacion as id_cot_child, id_detalle_cotizacion, partida, cantidad, id_producto from f_detalle_cotizaciones where id_cotizacion = :id_cotizacion]]>
              </sqlStatement>
         </dataQuery>
         <dataStructure>
              <group name="F_COTIZACIONES" source="header_query">
                   <element name="ID_COTIZACION" value="ID_COTIZACION"/>
                   <element name="ID_CLIPRO" value="ID_CLIPRO"/>
                   <element name="SUMA_CANTIDAD" value="F_DETALLE_COTIZACIONES.CANTIDAD" function="SUM()"/>
                   <group name="F_DETALLE_COTIZACIONES" source="detail_query">
                        <element name="PARTIDA" value="PARTIDA"/>
                        <element name="CANTIDAD" value="CANTIDAD"/>
                        <element name="ID_PRODUCTO" value="ID_PRODUCTO"/>
                   </group>
              </group>
         </dataStructure>
    </dataTemplate>

    Hi,
    I have the similar question. I used data templates in BI Publisher but now I want to use the same data template in Apex to print some reports.
    I tried to some examples but these were only using report queries. I also tried with the Web Service but this didn't work for me either maybe because I didn't
    used it in the right way. When I used the WS I received the binary of the report so the WS worked it was just the how and where to use it that didn't work for me.
    Now this older entry is BUMPED maybe we find a solution for our problem this way.
    regards,
    Steven

  • Data Template Creating

    Hi Guys ,
    I have created a data template and it worls fine but when i attach a RTF template in oralce apps to it it errors out .. am i missing something ...?
    What are the steps i need to follow in order to register a Data Template with just Data Template Definition i used the follwoing xml file .
    <?xml version="1.0" encoding="WINDOWS-1252" ?>
    <dataTemplate name="EmpData" description="Employee Details" Version="1.0">
    <parameters>
    <parameter name="p_DeptNo" dataType="character" />
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[
    SELECT d.DEPTNO,d.DNAME,d.LOC,EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,
    nvl(COMM,0)
    FROM scott.dept d, scott.emp e
    WHERE d.deptno=e.deptno
    AND d.deptno = nvl(:p_DeptNo,d.deptno)
    ]]>
    </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>
    Thanks
    Tom .....

    This is the error i get
    oracle.apps.xdo.XDOException: Error creating lock file
    at oracle.apps.xdo.oa.util.FontCacheManager.getFontFromDB(FontCacheManager.java:320)
    at oracle.apps.xdo.oa.util.FontCacheManager.getFontFilePath(FontCacheManager.java:198)
    at oracle.apps.xdo.oa.util.FontHelper.createFontProperties(FontHelper.java:431)
    at oracle.apps.xdo.oa.util.ConfigHelper.getFontProperties(ConfigHelper.java:166)
    at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:5768)
    at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3438)
    at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3527)
    at oracle.apps.xdo.oa.template.server.TemplatesAMImpl.processTemplate(TemplatesAMImpl.java:2130)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:190)
    at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:153)
    Thanks
    Tom...

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

  • 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

  • Parameters in Data Templates

    Hey gurus!
    I am using 10.1.3.3.3 and am having a problem with parameters. If I just use a sql query for my data model and create a parameter, it works fine. I am having a problem when I use a data template in my data model and try and use a parameter.
    The beginning of my data template is this:
    <dataTemplate dataSourceRef="oltpdev" name="mdd_rmv_stuff" defaultPackage="mdd_rmv_stuff">
    <properties>
    <property name="xml_tag_case" value="upper"/>
    </properties>
    <parameters>
    <parameter name="p_manager_product_id" dataType="integer"/>
    </parameters>
    <lexicals>
    </lexicals>
    <dataQuery>
    <sqlStatement name="Q_MAIN">
    select mp.manager_product_id mp_id,
    mp.manager_product_name,
    mp.manager_roof_id
    from manager_product mp
    where mp.manager_product_id=:p_manager_product_id
    </sqlStatement>
    You can see where I am trying to use the parameter. I get this error when I try to view the report:
    ====================================================================
    Error
    The report cannot be rendered because of an error, please contact the administrator.
    Error Detail
    ORA-06550: line 2, column 1:
    PLS-00201: identifier 'MDD_RMV_STUFF.P_MANAGER_PRODUCT_ID' must be declared
    ORA-06550: line 2, column 1:
    PL/SQL: Statement ignored
    ====================================================================
    Any help would be appreciated!!!
    Kris Henning
    www.piocon.com

    If you don't own any data triggers and you don't need to push parameters to PL/SQL then don't define defaultPackage attribute, parameters will bind to the Queries and we will not push to PL/SQL
    <?xml version="1.0" encoding="WINDOWS-1252" ?>
    *<dataTemplate name="dataTemplateName" description="Template description" version="1.0">*
    <parameters>
    <parameter name="p_DEPTNO" dataType="Number" defaultValue="20"/>
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[SELECT DEPTNO DEPTNO1,DNAME,LOC from dept
                         order by deptno]]>
    </sqlStatement>
    <sqlStatement name="Q2">
    <![CDATA[SELECT  EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,nvl(COMM,0) COMM
                         from EMP
                         WHERE DEPTNO = :DEPTNO1 ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_DEPT" source="Q1">
    <element name="DEPT_NUMBER" value="DEPTNO1" />
    <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="Q2">
    <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>

  • 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

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

  • Need to Achieve Grand Total in the Data Template

    Hi Team
    As per the requirements i need to achieve the grand total form the various level of Total. To achieve the Total i have used the SUM function and it works fine. Could you please suggest me how can i achieve the Grand Total. For your reference i am attaching the data template here that i am using.
    <group name="G_ITEM" dataType="varchar2" source="Q_ITEMQuery" groupFilter="">
                        <element name="ITEM_ID" dataType="varchar2" value="item_id" function=""/>
                        <element name="DESCRIPTION" dataType="varchar2" value="description" function=""/>
                        <element name="DIVISION" dataType="varchar2" value="division" function=""/>
                        <element name="UNITS_APPTD" dataType="varchar2" value="apptd_unit_qty" function=""/>
                        <element name="UNITS_RCVD" dataType="varchar2" value="unit_rcvd" function=""/>
                        <element name="WEIGHT_APPTD" dataType="varchar2" value="apptd_weight" function=""/>
                        <element name="WEIGHT_RCVD" dataType="varchar2" value="receipt_weight" function=""/>
                        <element name="SUM_UNITS_APPTD" value="G_ITEM.UNITS_APPTD" function="SUM()"/>
                        <element name="SUM_UNITS_RCVD" value="G_ITEM.UNITS_RCVD" function="SUM()"/>
                        <element name="SUM_WEIGHT_APPTD" value="G_ITEM.WEIGHT_APPTD" function="SUM()"/>
                        <element name="SUM_WEIGHT_RCVD" value="G_ITEM.WEIGHT_RCVD" function="SUM()"/>
                        <group name="G_TROUBLE" dataType="varchar2" source="Q_TROUBLEQuery" groupFilter="">
                             <element name="T_CODE" dataType="varchar2" value="trouble_code" function=""/>
                        </group>
                   </group>
                   <group name="G_DEPOSIT" dataType="varchar2" source="Q_DEPOSITQuery" groupFilter="">
                        <element name="ITEM_ID1" dataType="varchar2" value="ITEM_ID1" function=""/>
                        <element name="DESCRIPTION1" dataType="varchar2" value="DESCRIPTION1" function=""/>
                        <element name="UNIT_QTY1" dataType="varchar2" value="Unit_Qty1" function=""/>
                        <element name="SUM_UNIT_QTY1" value="G_DEPOSIT.UNIT_QTY1" function="SUM()"/>
                   </group>
                   <group name="G_TRANSPORT" dataType="varchar2" source="Q_TRANSPORTQuery" groupFilter="">
                        <element name="ITEM_ID2" dataType="varchar2" value="ITEM_ID2" function=""/>
                        <element name="DESCRIPTION2" dataType="varchar2" value="DESCRIPTION2" function=""/>
                        <element name="UNIT_QTY2" dataType="varchar2" value="Unit_Qty2" function=""/>
                        <element name="SUM_UNIT_QTY2" value="G_TRANSPORT.UNIT_QTY2" function="SUM()"/>
                   </group>
    I need SUM_UNITS_APPTD, SUM_UNIT_QTY1 and SUM_UNIT_QTY2 of 3 different group to be added to generate the Grand Total. PLEASE ADVISE
    Regards
    Srikant

    Hi Domnic
    Thanks for the reply.
    I am not much aware of the XDO. Could you please let me know can i pass the field name in place of 2 and 3 as in your example.
    For example if i have field A and B and i need to add it then should it be
    <?xdofx:A+B?> in RTF.
    Else please give me the complete syntax.
    Thanks in advance for your reply.
    Regards
    Srikant

  • Linking two queries in Data Template

    All,
    Hoping to get a little help here. I have a basic data template and inside of it there are 2 queries. I would like to use a field from Query 1 and use it in Query 2. I have used the Bind Variable and Data Links (both work but I am getting what looks like a cartizian product). Query 1 is not a Parent-child relationship to Query 2, I simply just want to use the value of the field from Query 1 in Query 2.
    Example:
    Query 1 returns:
    5 rows of 'A'
    10 rows of 'B'
    Query 2:
    Using 'A' it returns 2 values
    Using 'B' it returns 5 values
    I want to use the value 'A' and 'B' from Query 1 in Query 2.
    Everytime I use a data link or bind variable it would return 10 rows for 'A' and 50 rows for 'B' in Query 2.
    I am not sure if there is a way to fix the queries themselves or if it would be something in the grouping logic that would handle this. When using the Bind Variables I noticed the second query(Q2) has to be inside 'G_SEQ' in order to return any data. I would prefer not to post the
    queries due to sensitive data restrictions.
    Here is the data structure I am currently using.
    <dataStructure>
    <group name="G_SEQ" source="Q1">
    <element name="MATERIAL_TYPE" value="MATERIAL_TYPE"/>
    <element name="GROUP_TYPE" value="GROUP_TYPE"/>
    <element name="COL1" value="COL1" />
    <element name="COL2" value="COL2" />
    <element name="COL3" value="COL3" />
    <element name="COL4" value="COL4" />
    <element name="COL5" value="COL5" />
    <element name="COL6" value="COL6" />
    <element name="CF_ISSUE_TO_LINE_TOTAL" value="D_COL1" function="SUM()"/>
    <element name="CP_ISS_TO_LN_TOT_LESS_10" value="D_COL1" function="SUM()"/>
    <group name="G_1" source="Q1">
    <element name="D_COL1" value="D_COL1"/>
    <element name="P_COL1" value="P_COL1"/>
    <element name="YR_PER_COL1" value="YR_PER_COL1"/>
    <element name="P_PER_COL1" value="P_PER_COL1"/>
    <element name="D_COL2" value="D_COL2"/>
    <element name="P_COL2" value="P_COL2"/>
    <element name="YR_PER_COL2" value="YR_PER_COL2"/>
    <element name="P_PER_COL2" value="P_PER_COL2"/>
    <element name="D_COL3" value="D_COL3"/>
    <element name="P_COL3" value="P_COL3"/>
    <element name="YR_PER_COL3" value="YR_PER_COL3"/>
    <element name="P_PER_COL3" value="P_PER_COL3"/>
    <element name="D_COL4" value="D_COL4"/>
    <element name="P_COL4" value="P_COL4"/>
    <element name="YR_PER_COL4" value="YR_PER_COL4"/>
    <element name="P_PER_COL4" value="P_PER_COL4"/>
    <element name="D_COL5" value="D_COL5"/>
    <element name="P_COL5" value="P_COL5"/>
    <element name="YR_PER_COL5" value="YR_PER_COL5"/>
    <element name="P_PER_COL5" value="P_PER_COL5"/>
    <element name="D_COL6" value="D_COL6"/>
    <element name="P_COL6" value="P_COL6"/>
    <element name="YR_PER_COL6" value="YR_PER_COL6"/>
    <element name="P_PER_COL6" value="P_PER_COL6"/>
    </group>
    <group name="G_SUPPLIER" source="Q2">
    <element name="supplier" value="supplier"/>
    <element name="grade" value="grade"/>
    <element name="bdft" value="bdft"/>
    <element name="part" value="part"/>
    <element name="trans_source" value="trans_source"/>
    </group>
    </group>
    </dataStructure>
    Thanks,
    Jason

    Steven thanks again for your response.
    You are correct that it will give me the correct data, though, the issue still lies in connecting the data. For example in my original question:
    Example:
    Query 1 returns:
    5 rows of 'A'
    10 rows of 'B'
    Query 2:
    Using 'A' it returns 2 values
    Using 'B' it returns 5 values
    I want to be able to display the results like this:
    Results for Query 1(A)
    Results from Query 2(A)
    Results from Query 1(B)
    Results from Query 2(B)
    or in terms of the data above
    5 rows of 'A'
    Using 'A' return the 2 values(or rows)
    10 rows of 'B'
    Using 'B' return the 5 values(or rows)
    I believe in the case you pointed out it would do the following because the first query returned 'A' and 'B':
    Results for Query 1(A)
    Results from Query 2(A)
    Results from Query 2(B)
    Results from Query 1(B)
    Results from Query 2(A)
    Results from Query 2(B)
    or in terms of the data above
    5 rows of 'A'
    Using 'A' return the 2 values(or rows)
    Using 'B' return the 5 values(or rows)
    10 rows of 'B'
    Using 'A' return the 2 values(or rows)
    Using 'B' return the 5 values(or rows)
    Thanks again for your help, it is much appreciated!
    Jason

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

  • Data Template Issue

    Hi,
    I am just starting off with Data templates, and am facing some strange issues.
    I am trying to extract all the employees for all the departments and print the department level salary and Grand Total (total salary of all the departments).
    The DT that i am using is :
    <dataTemplate name="Emp" defaultPackage="" description="Employees: Sample Data Template">
    <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="on"/>
    </properties>
    <parameters/>
    <lexicals/>
    <dataQuery>
    <sqlStatement name="Q1" dataSourceRef=""><![CDATA[SELECT DEPTNO,
                             DNAME,
                             LOC
                        from scott.dept
                        order by DEPTNO]]>
    </sqlStatement>
    <sqlStatement name="Q2" dataSourceRef=""><![CDATA[SELECT EMPNO,
                             ENAME,
                             SAL,
                             nvl(COMM,0) COMM,
                             DEPTNO
                        from scott.emp
                        where DEPTNO = :DEPTNO]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_DEPT" source="Q1" groupFilter="">
    <element name="DEPTNO" value="DEPTNO" function=""/>
    <element name="DNAME" value="DNAME" function=""/>
    <element name="DEPTSAL" value="G_EMP.SAL" function="SUM()"/>
    <group name="G_EMP" source="Q2" groupFilter="">
    <element name ="EMPNO" value="EMPNO" function=""/>
    <element name ="ENAME" value="ENAME" function=""/>
    <element name ="SAL" value="SAL" function=""/>
         <element name ="COMM" value="COMM" function=""/>
    </group>
    </group>
    </dataStructure>
    </dataTemplate>
    When I run this from the Concurrent Program, It gets the correct data for Department 10, But for Depts 20,30 and 40, it again prints the same employee record as that of dept 10.
    I am not sure where i am going wrong.
    Thanks,
    Ashish

    Hi,
    Combining into 1 query will not always be feasible. The example in question is very elementary. However, real life problems would be very complex and would require different queries to be joined.
    From the user guide:
    "XML Publisher tests have shown that using bind variables is more efficient than using the link tag."
    I even tried with <link> (from another example on the XML Publisher blog (http://blogs.oracle.com/xmlpublisher/2007/02/16#a147) but it gives me more errors:
    <sqlStatement name="Q1">
    <![CDATA[
        SELECT DEPTNO,DNAME,LOC from scott.dept
        order by deptno ]]>
    </sqlStatement>
    <sqlStatement name="Q2">
    <![CDATA[
         SELECT  DEPTNO, EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,nvl(COMM,0) COMM
         from scott.EMP ]]>
    </sqlStatement>
    <link name="DEPTEMP_LINK" parentQuery="Q1" parentColumn="DEPTNO" childQuery="Q2" childColumn="DEPTNO"/>
    I get the following runtime error:
    Calling XDO Data Engine...
    [032707_122656442][][EXCEPTION] 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:589)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1972)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:850)
         at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2591)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2950)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:656)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:582)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeData(XMLPGEN.java:456)
         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:161)
    Looks like I am better off NOT selecting the DEPTNO column from the child query!
    Ashish

Maybe you are looking for

  • "Documents" folder is empty, all files and folders disappeared.

    Hello there. I was trying to install a software, and since it couldn't work, I was advised to remove different files. Since then, seems all my files and folders from "Documents" have all disappeared. They're not in the trash, they're not anywhere. I'

  • How to get the sidecar xmp extension removed

    I open a file in ACR (and/or) PSCS4, and then do some work on the file, and for whatever reason, don't like what I did and want to start over.However,,even though I click 'cancel' or 'do not save', if I go back and try to open my original file again

  • Reading rule sets from an XML file

    Hi all, How can I read rule sets from an XML file? I have been given some rules in XML format and using those I have to query some content. I am using WLP4.0 Also how can I code rules in java? Thanks in advance.

  • My serial number wont work when reinstalling the software.

    I recently reinstalled Ai CS3 and my serial number is not working. Anyone have an idea as to why?

  • CSS with single SSL module.. balance option needed?

    Hi all, Quick question. If you have a CSS 11503 with one SSL offload module installed.. is there any point in using the "application ssl" and "advanced-balance ssl" options in the content rule? I can't find any info that tells me for sure but I'm gue