Before Report Trigger Not Firing

Hi Trying to Fire before report trigger in this piece of code, Calling in on XML Publisher 5.6.3 and running on XDODTEXE
The function its calling is a boolean... Can anyone see a problem with the xml calling the function....
<?xml version = '1.0' encoding = 'UTF-8'?>
<dataTemplate name="EXPENSES" defaultpackage="OO_HR_OO_GENERAL" version="1.0">
<parameters>
<parameter name="P_VACANCY_ID" dataType = "number" defaultValue=""></parameter>
</parameters>
<dataQuery>
<sqlStatement name="Q1">
<![CDATA[SELECT
PPD.SEGMENT16 UPN
,(SELECT meaning
FROM fnd_lookup_values
WHERE lookup_type = 'NR_REORG_NAME'
AND lookup_code = pos.attribute21) RE_ORG_NAME
,pv.name VACANCY_NAME
,HR_GENERAL.DECODE_JOB(PV.JOB_ID) JOB_NAME
,HR_GENERAL.DECODE_ORGANIZATION(PV.ORGANIZATION_ID) DEPT
,PANEL_MEMBERS.PANEL_MEMBER
,PANEL_MEMBERS.PANEL_START_TIME
,PANEL_MEMBERS.PANEL_START_DATE
,PANEL_MEMBERS.INTERVIEW_LOC
from hr_all_positions_f POS,
per_position_definitions PPD,
PER_ALL_VACANCIES PV,
(SELECT prec2.attribute4 PANEL_MEMBER
,prec2.attribute2 PANEL_START_TIME
,to_char(fnd_date.canonical_to_date(prec2.attribute1),'DD-MON-YYYY') PANEL_START_DATE
,hr_general.decode_location(prec2.attribute3) INTERVIEW_LOC
,PREC1.VACANCY_ID
FROM
PER_RECRUITMENT_ACTIVITY_FOR PREC1,
per_recruitment_activities PREC2
WHERE PREC1.RECRUITMENT_ACTIVITY_ID = PREC2.RECRUITMENT_ACTIVITY_ID
and sysdate between prec2.date_start and nvl(sysdate,prec2.date_end)
and prec2.date_start = (select max(prec3.date_start)
from per_recruitment_activities prec3,
PER_RECRUITMENT_ACTIVITY_FOR prec4
where prec3.RECRUITMENT_ACTIVITY_ID = prec4.RECRUITMENT_ACTIVITY_ID
and prec3.attribute4 is not null
and PREC4.VACANCY_ID = PREC1.VACANCY_ID)) PANEL_MEMBERS
where sysdate between pos.effective_start_date and pos.effective_end_date
and pos.status = 'VALID'
and ppd.position_definition_id = pos.position_definition_id
and pv.position_id = pos.position_id
and pv.vacancy_id = panel_members.vacancy_id(+)
AND PV.VACANCY_ID = :P_VACANCY_ID]]>
</sqlStatement>
<sqlStatement name="Q2">
<![CDATA[SELECT pos.name position_name
,PPD.SEGMENT16 UPN
,PPD.SEGMENT17 FUNCTION
,PPD.SEGMENT18 ROUTE
,PPD.SEGMENT19 DELIVERY_UNIT
,(select FVT.DESCRIPTION
from fnd_flex_value_SETS fvs,
     fnd_flex_values fv,
     fnd_flex_values_tl fvt
WHERE fvs.flex_value_set_name = 'NR_Safety_Critical_Indicator'
AND fv.flex_value_set_id = fvs.flex_value_set_id
and fv.flex_value_id = fvt.flex_value_id
AND fvt.LANGUAGE = USERENV ('LANG')
and fv.flex_value = POS.ATTRIBUTE2) SAFETY_INDICATOR
,pv.name vacancy_name
,PV.VACANCY_ID
,HR_GENERAL.DECODE_GRADE(PV.GRADE_ID) VACANCY_GRADE
,HR_GENERAL.DECODE_JOB(PV.JOB_ID) Job_name
,APL.LAST_NAME
,APL.FIRST_NAME
,APL.EMP_APL_NUMBER
,APL.EMP_GRADE
,APL.re_org_status
from hr_all_positions_f POS,
     per_position_definitions PPD,
     PER_ALL_VACANCIES PV,
     (SELECT pv.vacancy_id
     ,PPF.LAST_NAME
     ,PPF.FIRST_NAME
     ,NVL(PPF.APPLICANT_NUMBER,EMPLOYEE_NUMBER) EMP_APL_NUMBER
     ,HR_GENERAL.DECODE_GRADE((SELECT PAF2.GRADE_ID
       FROM PER_ALL_ASSIGNMENTS_F PAF2
       WHERE PAF2.PERSON_ID = PAF1.PERSON_ID
       AND PAF2.ASSIGNMENT_TYPE = 'E'
       AND SYSDATE BETWEEN PAF2.EFFECTIVE_START_DATE AND PAF2.EFFECTIVE_END_DATE
       AND ROWNUM = 1)) EMP_GRADE
     ,(SELECT fl.meaning REORG_STATUS
  FROM apps.per_person_analyses ppa,
       apps.per_analysis_criteria pac,
       apps.per_special_info_types_v psi,
       fnd_lookup_values FL
WHERE ppa.id_flex_num = pac.id_flex_num
   AND ppa.analysis_criteria_id = pac.analysis_criteria_id
   AND psi.id_flex_num = ppa.id_flex_num
   AND psi.NAME = 'Re-Organisation Details'
   and fl.lookup_type = 'NR_REORG_APPSTATUS'
   and fl.lookup_code = pac.segment2
   and ppa.person_id = ppf.person_id
   and rownum = 1) re_org_status
  FROM  PER_ALL_ASSIGNMENTS_F PAF1,
        PER_ALL_PEOPLE_F PPF,
        PER_ALL_VACANCIES PV
  WHERE PAF1.ASSIGNMENT_TYPE = 'A'
    AND SYSDATE BETWEEN PAF1.EFFECTIVE_START_DATE AND PAF1.EFFECTIVE_END_DATE
    AND SYSDATE BETWEEN PPF.EFFECTIVE_START_DATE AND PPF.EFFECTIVE_END_DATE
    AND PAF1.PERSON_ID = PPF.PERSON_ID
    AND PAF1.VACANCY_ID = PV.VACANCY_ID) apl
where sysdate between pos.effective_start_date and pos.effective_end_date
and pos.status = 'VALID'
and ppd.position_definition_id = pos.position_definition_id
and pv.position_id = pos.position_id
and pv.vacancy_id = apl.vacancy_id(+)
AND PV.VACANCY_ID = :P_VACANCY_ID]]>
</sqlStatement>
<sqlStatement name="Q3">
<![CDATA[SELECT    (SELECT ppf2.first_name||' '||PPF2.Last_name||', '||ppf2.employee_number||', '||ppd2.segment17||', '||ppd2.segment18||', '||ppd2.segment19 employee_number
   FROM PER_ALL_ASSIGNMENTS_F PAF2,
        PER_ALL_PEOPLE_F PPF2,
        HR_ALL_POSITIONS_F POS2,
        PER_POSITION_DEFINITIONS PPD2
   WHERE PAF2.PERSON_ID = PPF2.PERSON_ID
   AND PAF2.POSITION_ID = POS2.POSITION_ID
   and ppd2.position_definition_id = pos2.position_definition_id    
    AND SYSDATE BETWEEN ppf2.effective_start_date AND ppf2.effective_end_date
   AND SYSDATE BETWEEN paf2.effective_start_date AND paf2.effective_end_date
   AND SYSDATE BETWEEN pos2.effective_start_date AND pos2.effective_end_date
   AND PAF2.ASSIGNMENT_TYPE = 'E'
   AND PAF2.PERSON_ID = PAF.PERSON_ID) employee_number,
       pos.NAME "CURRENT_POS",
       PAF.PERSON_ID,
       XXNR_HR_COPP_GENERAL.VAC_NAME(pac.segment3)||' - ' "VAC_PREF1",
       XXNR_HR_COPP_GENERAL.VAC_POS(pac.segment3) "VAC_PREF1_POS_NAME",
       XXNR_HR_COPP_GENERAL.VAC_NAME(pac.segment4)||' - ' "VAC_PREF2",
       XXNR_HR_COPP_GENERAL.VAC_POS(pac.segment4) "VAC_PREF2_POS_NAME",
       XXNR_HR_COPP_GENERAL.VAC_NAME(pac.segment5)||' - ' "VAC_PREF3",
       XXNR_HR_COPP_GENERAL.VAC_POS(pac.segment5) "VAC_PREF3_POS_NAME",
       (SELECT LOCATION_CODE
        FROM HR_LOCATIONS WHERE LOCATION_ID = pac.segment15
        AND ROWNUM = 1) "REORG_ADMIN_OFFICE",
       (SELECT LOCATION_CODE
        FROM HR_LOCATIONS WHERE LOCATION_ID = pac.segment18
        AND ROWNUM = 1) "PREF_LOCATION",
       pac.segment19 "WILL_RELOCATE",
       pac.segment20 "LOCATION_TO_RELOCATE"
  FROM apps.per_people_f ppf,
       apps.per_assignments_f paf,
       apps.hr_all_positions_f pos,
       apps.per_person_analyses ppa,
       apps.per_analysis_criteria pac,
       apps.per_special_info_types_v psi,
       apps.per_vacancies pv
WHERE ppf.person_id = ppa.person_id
   AND SYSDATE BETWEEN ppf.effective_start_date AND ppf.effective_end_date
   AND SYSDATE BETWEEN paf.effective_start_date AND paf.effective_end_date
   AND SYSDATE BETWEEN pos.effective_start_date AND pos.effective_end_date
   AND ppf.person_id = paf.person_id
   and paf.vacancy_id = pv.vacancy_id
   AND paf.position_id = pos.position_id
   AND pos.status = 'VALID'
   AND paf.assignment_type = 'A'
   AND ppa.id_flex_num = pac.id_flex_num
   AND ppa.analysis_criteria_id = pac.analysis_criteria_id
   AND psi.id_flex_num = ppa.id_flex_num
   AND psi.NAME = 'Re-Organisation Details'
   AND PV.VACANCY_ID = :P_VACANCY_ID]]>
</sqlStatement>
</dataQuery>
<dataTrigger name="beforeReport" source="OO_HR_OO_GENERAL.submit_request_22(:P_VACANCY_ID)"/>
<dataStructure>
<group name="PANEL_MEM_LIST" source="Q1">
<element name="PANEL_MEMBER" value ="PANEL_MEMBER"/>
<element name="PANEL_START_TIME" value ="PANEL_START_TIME"/>
<element name="INTERVIEW_LOC" value ="INTERVIEW_LOC"/>
<element name="PANEL_START_DATE" value ="PANEL_START_DATE"/>
<element name="UPN" value ="UPN"/>
<element name="RE_ORG_NAME" value ="RE_ORG_NAME"/>
<element name="VACANCY_NAME" value ="VACANCY_NAME"/>
<element name="JOB_NAME" value ="JOB_NAME"/>
<element name="DEPT" value ="DEPT"/>
</group>
<group name="LIST_OF_EMPS" source = "Q2">
<element name="POSITION_NAME" value ="POSITION_NAME"/>
<element name="UPN" value ="UPN"/>
<element name="VACANCY_GRADE" value ="VACANCY_GRADE"/>
<element name="FUNCTION" value ="FUNCTION"/>
<element name="ROUTE" value ="ROUTE"/>
<element name="DELIVERY_UNIT" value ="DELIVERY_UNIT"/>
<element name="SAFETY_INDICATOR" value ="SAFETY_INDICATOR"/>
<element name="VACANCY_NAME" value ="VACANCY_NAME"/>
<element name="VACANCY_ID" value ="VACANCY_ID"/>
<element name="JOB_NAME" value ="JOB_NAME"/>
<element name="LAST_NAME" value ="LAST_NAME"/>
<element name="FIRST_NAME" value ="FIRST_NAME"/>
<element name="EMP_APL_NUMBER" value ="EMP_APL_NUMBER"/>
<element name="EMP_GRADE" value ="EMP_GRADE"/>
<element name="RE_ORG_STATUS" value ="RE_ORG_STATUS"/>
<element name="EMP_GRADE" value ="EMP_GRADE"/>
<element name="RE_ORG_STATUS" value ="RE_ORG_STATUS"/>
</group>
<group name="LIST_OF_EMPS_PREFS" source = "Q3">
<element name="EMPLOYEE_NUMBER" value ="EMPLOYEE_NUMBER"/>
<element name="CURRENT_POS" value ="CURRENT_POS"/>
<element name="VAC_PREF1_POS_NAME" value ="VAC_PREF1_POS_NAME"/>
<element name="VAC_PREF2_POS_NAME" value ="VAC_PREF2_POS_NAME"/>
<element name="VAC_PREF3_POS_NAME" value ="VAC_PREF3_POS_NAME"/>
<element name="VAC_PREF1" value ="VAC_PREF1"/>
<element name="VAC_PREF2" value ="VAC_PREF2"/>
<element name="VAC_PREF3" value ="VAC_PREF3"/>
<element name="REORG_ADMIN_OFFICE" value ="REORG_ADMIN_OFFICE"/>
<element name="PREF_LOCATION" value ="PREF_LOCATION"/>
<element name="WILL_RELOCATE" value ="WILL_RELOCATE"/>
<element name="LOCATION_TO_RELOCATE" value ="LOCATION_TO_RELOCATE"/>
</group>
</dataStructure>
</dataTemplate>
Edited by: Sharky on Jun 23, 2009 5:02 AM

Rules-wise, you have the beforeReport trigger before the dataStructure, and that is correct. Syntax, the parameter is going in okay. Question is then the logic or data. Does the function work outside of this? That is, if you were to exec the function in an anonymous block of PL/SQL, do you get the desired output (i.e., test for boolean value returned)?

Similar Messages

  • Before report trigger execution sequence

    Hi,
    What is the execution sequence of the before report trigger ?
    In the report builder help, the definition says "The Before Report trigger fires before the report is executed *but after queries are parsed and data is fetched*."
    But the oracle document "Oracle iDS Reports: Build Internet Reports: Volume 2: Student Guide" says
    "Before a report executes; *after queries are parsed, but before records are fetched*
    I have built a report where, i am populating a table A with some data in the before report trigger. The data model query is a "select * from A ". But the report o/p is blank since the before report trigger was fired after the query was parsed and fetched. My understanding is that the queries should only be parsed but not fetched before the "before report trigger"
    Regards,
    Suresh

    Hi,
    this is an important question.
    In fact the online help is right: Before its execution the query is parsed and data fetching is strarted.
    Thus any plsql operation that may influence the query and the data accessed is too late in the BEFOREREPORT trigger.
    THe issue is that there is no error message or warning. THe problem scenario bandwidth is wide: From "no problem at all" to constant or intermittent error scenarios or worst case unrecognized problems like missing records or any strange behavior in the layout.
    So very carefull while using BEFOREREPORT trigger
    Ciao
    Markus

  • Drill down reports from Before Report Trigger

    Hallo,
    I am using reports 6.08 and I want to run several subreports from the parameter form of a master report. However when I call srw.run_report() from the Before Report Trigger with batch=no I get the error message ... When I use batch=yes I cannot use destype=srcreen. When I use the same call from a button trigger it works fine.
    How can I call a drill down report from the Before Report Trigger?
    The master report should not create a report itself; only the drill down report should be visible. How can I exit the master report without raising an exception after running the drill down report?
    Thanks a lot - Ulrich

    Ulrich,
    The only place where it is valid to call a report using srw.run_report() with a destype=Screen (or Preview) is from a button of an already run report (to provide drill down capabilities).
    In your situation where you're really only using Reports as a parameter form (in the master case) I would suggest that you look to use a real Oracle Form as the master driver, and run_product calls to generate the required reports.
    Hope this helps,
    Danny

  • REP-1825: Before Report Trigger returned FALSE

    Is there any work around for this error...??
    I am running a report in a batch mode. I have an old version 3.0.5.14 for unix.
    There is logic on the Before Report Trigger and an email is sent. A blank email if nothing needs to be reported or with data if there is anything to be reported.
    I updated the report (a different program unit), recompiled it and now I am getting this error and no email.
    any ideas?
    thanks
    simona

    Hi Simona,
    Does this happen when you are not running in batch mode? It sounds like you will need to step through the report, possibly with some srw.message calls to output some of the data values to find out why the Before Report Trigger is now returning false. Without seeing the logic, it's difficult to say.
    Toby

  • Before Report Trigger error

    Hi,
    I'm trying to run an update in the Before Report Trigger of a report but I keep getting a fatal error message PLSQL: Function returned without value. Do I have the syntax wrong ?
    function BeforeReport return boolean is
    begin
    update trp_a set val_id = 1 where xrt is null
    commit;
    end;
    thanks

    Hi
    I am getting error ORA 06503 - PL SQL function returned without value.
    This is the function that is defined in oracle report in the "before report" trigger
    function BeforeReport return boolean is
    begin
         :CP_BATCH_NAME := ' AND BATCH_NAME= ' ||''''|| :P_BATCH_NAME || ' ' ;
    if Rtrim(LTRIM(:P_BATCH_NAME)) is not null then
    end if;
    return (TRUE);
    end;
    END;
    Pls help

  • Before Report Trigger Running Endlessly

    Hi all,
    I got the following query in my before report trigger. But the system is running endlessly without stop. Any advise is appreciated.
    function AfterReport return boolean is
    begin
    delete chart_temp;
    COMMIT;
    IF :P_1 IS NOT NULL THEN
         INSERT INTO CHART_TEMP VALUES ( :PERIOD1, :M1 );
    ELSE
    IF :P_2 IS NOT NULL THEN
    INSERT INTO CHART_TEMP VALUES ( :PERIOD2, :M2 );
    END IF;
    END IF;
    COMMIT;
    return (TRUE);
    end;
    rgds
    Lim

    Rules-wise, you have the beforeReport trigger before the dataStructure, and that is correct. Syntax, the parameter is going in okay. Question is then the logic or data. Does the function work outside of this? That is, if you were to exec the function in an anonymous block of PL/SQL, do you get the desired output (i.e., test for boolean value returned)?

  • Difference between After parameter Trigger and befor report Trigger

    hi,
    Can anyone tell me Functional difference between After parameter Trigger and Before Report Trigger. with some practical example or scenario.
    I did try few things but I couldn't make out any difference.
    thanks
    ram

    Probably none at this point.
    We pass parameters from a form (and do not use the report param selection screen), but always run code in the afterpform.
    put your parameter form code processing in the afterpform. I rarely ever use before report.
    The order is as expected:
    before pform
    param form
    after pform
    before report
    report
    --between pages during report run
    after report

  • Error while using Before report trigger. -- Urgent

    Dear All,
    The following error I am getting when I execute my data template where I have used Before Report Trigger. I am also pasting the Data Template that I have developed.
    ============================
    Error
    ============================
    XDO Data Engine Version No: 5.6.3
    Resp: 20560
    Org ID : 204
    Request ID: 4846248
    All Parameters: P_LOB=01:P_DIV_FROM=:P_DIV_TO=:P_FROM_ORG=:P_TO_ORG=:P_INV_FROM=:P_TO_INV=:P_TRX_DATE_FROM="2003/01/01 00:00:00":P_TRX_DATE_TO="2003/01/15 00:00:00"
    Data Template Code: SSBWIPANA_MFGR
    Data Template Application Short Name: WIP
    Debug Flag: N
    {P_DIV_FROM=, P_TRX_DATE_TO=2003/01/15 00:00:00, P_DIV_TO=, P_FROM_ORG=, P_TO_ORG=, P_TRX_DATE_FROM=2003/01/01 00:00:00, P_INV_FROM=, P_LOB=01, P_TO_INV=}
    Calling XDO Data Engine...
    [122407_011745100][][EXCEPTION] SQLException encounter while executing data trigger....
    java.sql.SQLException: ORA-06550: line 2, column 12:
    PLS-00302: component 'P_LOB' must be declared
    ORA-06550: line 2, column 1:
    PL/SQL: Statement ignored
    ORA-06550: line 3, column 12:
    PLS-00302: component 'P_DIV_FROM' must be declared
    ORA-06550: line 3, column 1:
    PL/SQL: Statement ignored
    ORA-06550: line 4, column 12:
    PLS-00302: component 'P_DIV_TO' must be declared
    ORA-06550: line 4, column 1:
    PL/SQL: Statement ignored
    ORA-06550: line 5, column 12:
    PLS-00302: component 'P_FROM_ORG' must be declared
    ORA-06550: line 5, column 1:
    PL/SQL: Statement ignored
    ORA-06550: line 6, column 12:
    PLS-00302: component 'P_TO_ORG' must be declared
    ORA-06550: line 6, column 1:
    PL/SQL: Statement ignored
    ORA-06550: line 7, column 12:
    PLS-00302: component 'P_FROM_INV' must be declared
    ORA-06550: line 7, column 1:
    PL/SQL: Statement ignored
    ORA-06550: line 8, column 12:
    PLS-00302: component 'P_TO_INV' must be declared
    ORA-06550: line 8, column 1:
    PL/SQL: Statement ignored
         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:743)
         at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:215)
         at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:967)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3327)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3433)
         at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4394)
         at oracle.apps.xdo.dataengine.XMLPGEN.executeTriggers(XMLPGEN.java:699)
         at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:254)
         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:157)
    =====================================================
    Data Template
    ====================================================
    <dataTemplate name="SSBWIPANA_MFGR" defaultPackage="PRODUCTION" version="1.0">
    <parameters>
    <parameter name="P_LOB" datatype="charecter"/>
    <parameter name="P_DIV_FROM" datatype="charecter"/>
    <parameter name="P_DIV_TO" datatype="charecter"/>
    <parameter name="P_FROM_ORG" datatype="charecter"/>
    <parameter name="P_TO_ORG" datatype="charecter"/>
    <parameter name="P_FROM_INV" datatype="charecter"/>
    <parameter name="P_TO_INV" datatype="charecter"/>
    <parameter name="P_TRX_DATE_FROM" datatype="charecter"/>
    <parameter name="P_TRX_DATE_TO" datatype="charecter"/>
    </parameters>
    <dataQuery>
    <sqlStatement name="Q_1">
    <![CDATA[SELECT DISTINCT MSI.CONCATENATED_SEGMENTS, MMT.INVENTORY_ITEM_ID,
                    MSI.DESCRIPTION, MMT.TRANSACTION_UOM, SDT.TRX_DATE,
                    MTP.ORGANIZATION_CODE, MMT.ORGANIZATION_ID
               FROM MTL_MATERIAL_TRANSACTIONS MMT,
                    MTL_PARAMETERS MTP,
                    MTL_SYSTEM_ITEMS_VL MSI,
                    SSBWIP_DATE_TEMP SDT
              WHERE MMT.INVENTORY_ITEM_ID = MSI.INVENTORY_ITEM_ID
                AND MMT.ORGANIZATION_ID = MSI.ORGANIZATION_ID
                AND MSI.ORGANIZATION_ID = MTP.ORGANIZATION_ID
                AND MMT.ORGANIZATION_ID = MTP.ORGANIZATION_ID
                AND MMT.TRANSACTION_TYPE_ID IN (17, 44)
                AND MMT.ORGANIZATION_ID IN (
                       SELECT MP.ORGANIZATION_ID
                         FROM MTL_PARAMETERS MP, GL_CODE_COMBINATIONS GCC
                        WHERE MP.MATERIAL_ACCOUNT = GCC.CODE_COMBINATION_ID
                          AND GCC.SEGMENT1 = :P_LOB
                          AND (GCC.SEGMENT2 BETWEEN NVL (:P_DIV_FROM,
                                                         GCC.SEGMENT2)
                                                AND NVL (:P_DIV_TO, GCC.SEGMENT2)
                AND MTP.ORGANIZATION_CODE BETWEEN NVL (:P_FROM_ORG,
                                                       MTP.ORGANIZATION_CODE
                                              AND NVL (:P_TO_ORG,
                                                       MTP.ORGANIZATION_CODE
                AND MSI.CONCATENATED_SEGMENTS BETWEEN NVL
                                                        (:P_FROM_INV,
                                                         MSI.CONCATENATED_SEGMENTS
                                                  AND NVL
                                                        (:P_TO_INV,
                                                         MSI.CONCATENATED_SEGMENTS
           ORDER BY MSI.CONCATENATED_SEGMENTS, MTP.ORGANIZATION_CODE]]>
    </sqlStatement>
    <sqlStatement name="Q_2">
    <![CDATA[SELECT NVL (SUM (TRANSACTION_QUANTITY), 0) COMPLETION
           FROM MTL_MATERIAL_TRANSACTIONS
         WHERE INVENTORY_ITEM_ID = :INVENTORY_ITEM_ID
           AND ORGANIZATION_ID = :ORGANIZATION_ID
           AND TRANSACTION_TYPE_ID = 44
           AND TRUNC (TRANSACTION_DATE) = :TRX_DATE]]>
    </sqlStatement>
    <sqlStatement name="Q_3">
    <![CDATA[SELECT NVL (SUM (TRANSACTION_QUANTITY) * -1, 0) INCOMPLETION
          FROM MTL_MATERIAL_TRANSACTIONS
        WHERE INVENTORY_ITEM_ID = :INVENTORY_ITEM_ID
          AND ORGANIZATION_ID = :ORGANIZATION_ID
          AND TRANSACTION_TYPE_ID = 17
          AND TRUNC (TRANSACTION_DATE) = :TRX_DATE]]>
    </sqlStatement>
    <sqlStatement name="Q_4">
    <![CDATA[SELECT DESCRIPTION
          FROM FND_FLEX_VALUES_VL
        WHERE FLEX_VALUE_SET_ID = 1002470
              AND FLEX_VALUE = :P_LOB]]>
    </sqlStatement>
    <sqlStatement name="Q_5">
    <![CDATA[SELECT DESCRIPTION
         FROM FND_FLEX_VALUES_VL
        WHERE FLEX_VALUE_SET_ID = 1012471
          AND FLEX_VALUE = :P_DIV_FROM
          AND PARENT_FLEX_VALUE_LOW = :P_LOB]]>
    </sqlStatement>
    <sqlStatement name="Q_6">
    <![CDATA[SELECT DESCRIPTION
         FROM FND_FLEX_VALUES_VL
        WHERE FLEX_VALUE_SET_ID = 1012471
          AND FLEX_VALUE = :P_DIV_TO
          AND PARENT_FLEX_VALUE_LOW = :P_LOB]]>
    </sqlStatement>
    </dataQuery>
    <dataTrigger name="beforeReport" source="PRODUCTION.beforereporttrigger(:P_TRX_DATE_FROM,:P_TRX_DATE_TO)"/>
    <dataStructure>
    <group name="G_CONCATENATED_SEGMENTS" source="Q_1">
    <element name="CONCATENATED_SEGMENTS" datatype="charecter" value="CONCATENATED_SEGMENTS"/>
    <element name="DESCRIPTION" datatype="charecter" value="DESCRIPTION"/>
    <element name="TRANSACTION_UOM" datatype="charecter" value="TRANSACTION_UOM"/>
    <element name="INVENTORY_ITEM_ID" datatype="number" value="INVENTORY_ITEM_ID"/>
    <element name="ORGNIZATION_ID" datatype="number" value="ORGANIZATION_ID"/>
    <group name="G_TRX_DATE" source="Q_1">
    <element name="TRX_DATE" datatype="date" value="TRX_DATE"/>
    <group name="G_1" source="Q_1">
    <element name="ORGANIZATION_CODE" datatype="charecter" value="ORGANIZATION_CODE"/>
    <group name="G_ORGANIZATION_CODEC" source="Q_2">
    <element name="COMPLETION" datatype="number" value="COMPLETION"/>
    </group>
    <group name="G_ORGANIZATION_CODEI" source="Q_3">
    <element name="INCOMPLETION" datatype="number" value="INCOMPLETION"/>
    </group>
    </group>
    </group>
    </group>
    <group name="G_LOB" source="Q_4">
    <element name="CF_LOB" datatype="charecter" value="description"/>
    </group>
    <group name="G_FROM_DIV" source="Q_5">
    <element name="CF_DIVFROM" datatype="charecter" value="description"/>
    </group>
    <group name="G_TO_DIV" source="Q_6">
    <element name="CF_DIVTO" datatype="charecter" value="descrption"/>
    </group>
    <element name="CS_COUNT" function="count()" datatype="number" value="G_CONCATENATED_SEGMENTS.CONCATENATED_SEGMENTS"/>
    </dataStructure>
    </dataTemplate>
    Pls. suggest me.
    null

    Hi,
    without checked the whole document .... you've defined all paramaters as datataype charecter instead of character.
    Regards
    Rainer

  • WHEN-NEW-ITEM-INSTANCE TRIGGER NOT FIRING IN FORM PERSONLIZATION

    We are upgrading to R12, when-new-item-instance trigger written for radio group not firing. using USO-821 Order Administrator Responsibility the function order capture.After clicking on actions push button
    opening Copy Quote for this Form Personalization written.
    For Radio Group Copy-Group when-new-item-instance trigger written but this trigger not firing,but In 11i Instance its Firing.
    trigger-event: when-new-item-instance
    Trigger-object:copy_group
    condition:when copy_group='ALL'
    Action: showing message.
    The same when-new-instance trigger written in form item level and trigger execution hierarchy properties 'OVERRIDE'.
    Just I am thinking this overriding by Item level trigger of form.
    Please kindly help me quickly .What I need to do?
    How can I make trigger to Fire?
    Please kindly give solution.....Its very urgent Requirement.pls help me.
    Regards,
    Basavaraj

    Please kindly help me quickly .What I need to do?
    > Please kindly give solution.....Its very urgent Requirement.pls help me.
    Kindly log a SR for urgent issues.
    Thanks,
    Hussein

  • WHEN-NEW-ITEM-INSTANCE TRIGGER NOT FIRING IN FORM PERSONLIZATION(R12 UPGRAD

    We are upgrading to R12, when-new-item-instance trigger written for radio group not firing. using USO-821 Order Administrator Responsibility the function order capture.After clicking on actions push button
    opening Copy Quote for this Form Personalization written.
    For Radio Group Copy-Group when-new-item-instance trigger written but this trigger not firing,but In 11i Instance its Firing.
    trigger-event: when-new-item-instance
    Trigger-object:copy_group
    condition:when copy_group='ALL'
    Action: showing message.
    The same when-new-instance trigger written in form item level and trigger execution hierarchy properties 'OVERRIDE'.
    Just I am thinking this overriding by Item level trigger of form.
    Please kindly help me quickly .What I need to do?
    How can I make trigger to Fire?
    Please kindly give solution.....Its very urgent Requirement.pls help me.
    Regards,
    Basavaraj

    Please kindly help me quickly .What I need to do?
    > Please kindly give solution.....Its very urgent Requirement.pls help me.
    Kindly log a SR for urgent issues.
    Thanks,
    Hussein

  • Difference between After parameter Form Trigger and before Report Trigger

    hi,
    Can some one tell me difference between After parameter form Trigger and Before parameter trigger.
    Why do we need both these trigger , why can't we use any one of them because after parameter trigger will obviously fire before report trigger and similarly before report trigger will fire after parameter form.
    Thanks
    Ram

    Hi,
    i will make it clear..!
    Actually, we have four type of triggers in reports..!
    Before Parameter -- fires before params are suppied to the calling report..
    After Parameter -- fires after params are suppied to the calling report..
    Before Report -- fires before report is generated..
    After Report. -- fires after report is generated..
    Before Report and After Report triggers are used for formatting the report design..
    like u can specify a report to be displayed based on a condition in the Before
    Report trigger and u can specify some backend updations in the after report trigger
    which fires after report is generated..

  • How to set multiple operating units in before report trigger

    hi all
    can any one help me out in getting clear in how to set multiple operating units in before report trigger in oracle report.
    as we set single operating unit (mo_global.set_policy.context('S',81); as 81 is my operating unit).then who to set for multiple operating unit at run time.

    Sounds like eBusiness Suite, right? Better ask this in the appropriate forum.

  • After Trigger Not Fired

    Hi All,
    I had created a Before and After Trigger for each row on a table.
    The Before Trigger will be fired when some columns are updated.
    In the Before trigger, I will changed the value of 1 column, says delvstatus.
    The After trigger will be fired if the delvstatus was changed.
    However, I noticed that after trigger is not fired if the delvstatus is changed within Before Trigger.
    Is this a normal case for trigger execution in oracle?
    Any comments are welcome.
    Thanks.

    The before trigger and the after trigger should be fired like in the following test case.
    If not please post your test case and your 4 digits Oracle version.
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for 32-bit Windows: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    SQL>
    SQL> drop table t purge;
    Table dropped.
    SQL> drop table log purge;
    Table dropped.
    SQL>
    SQL> create table log(txt varchar2(50));
    Table created.
    SQL>
    SQL> create table t (x int primary key, s1 int, s2 int);
    Table created.
    SQL>
    SQL> create trigger tbu
      2  before update of s1
      3  on t
      4  for each row
      5  begin
      6  :new.s1 := 1;
      7  insert into log values('tbu fired');
      8  end;
      9  /
    Trigger created.
    SQL> show errors
    No errors.
    SQL>
    SQL> create trigger tau
      2  after update of s1
      3  on t
      4  for each row
      5  begin
      6  insert into log values('tau fired');
      7  end;
      8  /
    Trigger created.
    SQL> show errors
    No errors.
    SQL>
    SQL> insert into t values(0,0,0);
    1 row created.
    SQL> update t set s1 = 2 where x = 0;
    1 row updated.
    SQL> select * from t ;
             X         S1         S2
             0          1          0
    SQL> select * from log;
    TXT
    tbu fired
    tau fired
    SQL>

  • Trigger not firing in linux OS

    Hi All:
    Initially i am developed a form using form builder and i deployed this form in Windows OS this is working fine when i am deploying this same form in Linux OS
    that is not working even small trigger also not firing.so here we need to change any initial set up any help please.

    We are developing and deploying our Forms application on Linux, have no problem with the triggers whatsoever - any specific reason why developing on windows when deploying from Linux? otherwise, you have to recompile every time you move the form to the Linux iAS box for deployment (as Tony mentioned).

  • Key-enter trigger not firing

    hi friends,
    i have a trigger on key enter, but it is not firing when i press the enter key,
    why it is not working. i want the trigger to be fired only if the user press Enter key
    thanks
    Kris

    Hi Kris,
    I would suggest you try searching this forum for "KEY-ENTER". You shall be able to find out why it does not fire
    regards,
    teo

Maybe you are looking for

  • Ex-Uverse customer not happy with being a new Fios customer

    We just had our Fios Triple installed on Saturday 9/30/13. I was a very happy Uverse customer.  We moved to Verizon territory and we wanted something similar so we chose Verizon vs Direct TV and Charter Cable.  Verizon Fios is far inferior to my expe

  • Report Navigation Using Hyperlinks to Another Report (not drill down)

    I would like 2 sample reports.  The first report would have a hyperlink to the second report.  I want to publish these in BusinessObjects Enterprise and see this functionality using the Dhtml viewer preferably using the "my infoview". Anyone have or

  • How to delete individual entries in safari

    hello people, i would like to delete some of my entries in safari. safari allows only to delete all of them. but i want to keep some in firefox i can deleted them by pushing "shift+del" here is a picture of an example. http://imageshack.us/photo/my-i

  • Short Dump While selecting Variant for ABAP query

    Hi, ABAP query is going to short dump (CONNE_IMPORT_WRONG_COMP_LENG) while selecting a Variant. If i create and use variant then i am able to see Output of Variant.But not able to use Earlier created variants . I think some mismatch between variant v

  • 0DOC_CATEGR-Sales Document Category of Reference Doc. in Order Header

    Hi, I am extracting the standard datasource for Sales Order Header 2Lis_11_VAHDR to BW.I am getting error while loading data.I checked it in PSA there are around 30 records which were showing the error with the message "Record 985 :Contents M from fi