Error in After Report Trigger

Hi,
I've developed a report in HRMS for my client which collated the Vacation Accrual data of all employees. When i run the report for all employees which is an optional parameter it throwing the below error.
REP-0300: ORACLE error occurred.
REP-0069: Internal error
In-process job terminated:Terminated with error:
REP-300:
During debugging i found that in the After Report Trigger , after the return statement, the below error is being thrown. I couldn't identify the exact source of the error. Any help on this would be much appreciated. Below is the After Report Trigger code.
function AfterReport return boolean is
begin
srw.MESSAGE (12345, 'After Report - Before Return');
return (TRUE);
srw.MESSAGE (12345, 'After Report - After Return');
end;
Thanks
Elango

After spending a lot of time in analyzing, i ripped apart each and every part of the report and found a function where am doing a varchar to date conversion. Then i ran the query individually and picked up the below error.
ORA-01841: (full) year must be between -4713 and +9999, and not be 0
Then i identified the record which has incorrect data and modified it thru applications. Oracle Internal error basically arises due to datatype mismatch and its always better to use exception blocks with log messages wherever its applicable.
Thanks
Elango.

Similar Messages

  • FND_REQUEST.SUBMIT_REQUEST is not working in After Report Trigger Reports6i

    Hi Guys,
    I am calling the another conc program in After report trigger using FND_REQUEST.SUBMIT_REQUEST. The below are the statement which i use in my program.
    req_id := FND_REQUEST.SUBMIT_REQUEST('APPL_SHORT','CONC_SHORT',NULL,NULL,FALSE);
    I have also use the SRW.USER_EXIT('FND SRWINIT') in Before Report Trigger and SRW.USER_EXIT('FND SRWEXIT') in After Report Trigger also.
    I am getting the error in Log file saying that
    REP-0736: There exist uncompiled program unit(s).
    REP-1247: Report Contains uncompiled PL/SQL.
    Quick Response is highly appreciated.
    Thanks in Advance.
    Regards
    Madhan.S

    Hi Sawwan,
    I was compiled in Unix platform also. If i comment that FND_REQUEST.SUBMIT_REQUEST line it executes fine. It gives the same error in Unix also.
    Can anyone pls help this issue.
    Thanks in Advance.
    Regards
    Madhan.S

  • EBS: Email XML publisher output, from After Report Trigger in Data Template

    Here is what I'm trying to do:
    -- In EBS (11.5.10 CU2), I'm using XML publisher (5.6.2) data template and layout template to generate Output files (PDF, EXCEL etc)
    --In the Data Template's AfterReport Trigger, I'm using the Concurrent Request Id to locate the Output file name and trying to Email that output file.
    Problem:
    -- When the AfterReport trigger code is executed, the code is NOT seeing the output file and hence the file is NOT emailed.
    Observations/Questions:
    -- From what I observe, the Output Post Processor ( that generates the Excel / PDF files) is running AFTER the code in AfterReport trigger... and hence the AfterReport trigger is Not quite seeing / able to access the output file.
    So, the sequence of execution seems to be:
    -- Before Report Trigger
    -- Data Query (SQL statement)
    -- After Report Trigger
    -- Output Post Processor
    Because the AfterReport Trigger is running before the Output Post Processor, it is Not able to see the output file. Is that a True statement?
    If Yes, how else can the DataTemplate access the Output file?
    If No, what could cause the AfterReport trigger to not see the output file?

    Because the AfterReport Trigger is running before the Output Post Processor, it is Not able to see the output file. Is that a True statement?
    I believe so, as the OPP works on the output of the Report after the Report has completed execution.
    You could use the same approach as we do for bursting the report to different users. Write a Java Concurrent program based on "oracle.apps.xdo.oa.cp. XMLPReportBurst" with delivery channel Email to send the email output. You would need to add code to launch the Concurrent child request in your AfterReport Trigger:
    function AfterReport return boolean is
    jreq_id number;
    begin
    srw.message (100, 'DEBUG: AfterReport_Trigger +');
    jreq_id:= FND_REQUEST.SUBMIT_REQUEST ('XDO','XDOBURST','','',FALSE,:P_CONC_REQUEST_ID,'Y',chr(0),
    If (jreq_id=0)
    then
    srw.message (100,'Request id is zero');
    end if;

  • Problem in writing 'After Report trigger'

    Hi All,
    Iam trying to insert values into database table after running the report.
    but the values are not inserted into the table.
    Here is the code in 'After Report trigger'
    function AfterReport return boolean is
    begin
    insert into reports_log values('poorders',user,sysdate,'Y');
    commit;
    return (TRUE);
    end;
    Thanks in Advance

    Tested one of my reports and found:
    the After Report Trigger does not fire (to insert a table) in Report Builder (6i) but it fires when it's invoked from Apex.
    It you run your report in Froms or Apex or...., try over there.

  • How to reference the total pages in a the after-report trigger

    I need to call a procedure in my after report trigger, and send the total number of pages as a parameter. However, a bind reference only applies to columns or parameters.
    I have the total pages displayed on my report, I just can't reference that field in my trigger.
    Does anyone have any ideas?
    Here is a link to my ultimate goal.
    Telling Form the number of pages in a report

    If any body is curious, I found a work around in Metalink that is working for me now.
    Search for Doc ID 130432.1

  • Facing issue in after report trigger in XML publisher

    HI All,
    I have a XML template in that i am calling a after report trigger like below :
    <dataTrigger name="afterReport" source="apps.testpkg.testupdate_fun(:HEADER_ID)"/>
    I am passing the header_id from my header block to the function.
    My Function looks like below:
    FUNCTION testupdate_fun(P_HEADER_ID IN NUMBER ) RETURN BOOLEAN AS
    BEGIN
    UPDATE TEST_TABLE SET PROCESS_FLAG='P' WHERE HEADER_ID=P_HEADER_ID;
    COMMIT;
    return true;
    EXCEPTION
    WHEN OTHERS THEN
    return false;
    END;
    The problem i am facing is it is updating only one record in the table.but in my header data block i am getting the details for more order numbers with header id like 1,2,3..., but it is updating only one header id in table, please help me out how to update record for all the header_id.
    Thanks

    Examples of combining all IDs into comma-separate list can be found here: http://www.oracle-base.com/articles/misc/string-aggregation-techniques.php . That list you need to send as parameter to the trigger. In the trigger you may split it again and update the records one-by-one, or you can build an EXECUTE IMMEDIATE statement to update the table, and in that statement the list can be used as a whole, no need to split it. Please, advise on which steps of this process you need more detailed assistance.

  • Update statement in After report trigger

    Hi
    I've written an update statement on a standard table to update one of its attributes in after report trigger.
    And then commit.
    I tried running the report without moving to reports top. The table was not updated.
    What could have gone wrong?
    Thanks
    Regards
    BalaKrishna

    Could you provide the UPDATE statements?

  • Problems with After Report trigger Updating using User-defined functions

    Hi,
    I have a report which uses SQL to select data that uses a user-defined stored function in the WHERE clause.
    I use the same SQL in the After Report trigger with and UPDATE statement to flag all records selected as being run.
    Data is being selected by the report no problem, but the records are not being updated. In a test, If I remove the conditions using the user functions, the records update as expected. In Live conditions I must have these conditions in the script.
    I originally tried putting the UPDATE in a formual column, but that would not fire on records where that page was not paged through (or paged to end) in the Runtime Previewer.
    Can anyone advise?

    In case anyone is interested.
    The issue was that the stored functions have roles assigned for security.
    PL/SQL for After Report doesn't seem to recognise the roles having been assigned for the report, so the implicit cursor update/select I had wouldn't work.
    I changed the SELECT into an explicit CURSOR and introduced a FOR LOOP, keeping the UPDATE as an implicit statement.
    I know see this was more of a PL/SQL issues than a report one, but such is life. So if anyone feels the urge to move it to the PL/SQL forum, then feel free!!
    Have a problem free afternoon. :-)

  • DELETE  in After report trigger

    Please help us resolve the following problem in a 6i report.
    The report had an After report trigger to delete the records from the same table used in the driver query. The report is launched thru a url to create a pdf file. The PDF is generated correctly for some users but for many others the PDF is generated with no data. When the delete statement is commented out, everybody get the PDF with data. All users have the same Acrobat Reader and IE version.
    Any idea why this is happening ?
    Appreciate your help
    Thanks

    Navneeth, Dmytro
    Thanks for your replies
    The report is for generating some sort of certificates ( in pdf format) from a staging table. If the certificate is issued, the record is to be deleted. So the report is different in each run.
    The real issue is the report behavior is not consistent from one machine to another. For the same set of data in the staging table for PC1 the PDF is generated and processed records are deleted. But in PC2 records are processed, records are deleted but the PDF has no data.
    We tried to use a global temp. table, didn't help either.
    In the before report trigger
    insert into gt_table select * from staging_table
    commit
    Report query modified to get data from gt_table
    After report trigger deletes records from staging_table
    The PDF data is seen in PC1 but not in PC2
    When the after report trigger is commented out, PDF launched in both machines contain data.
    There are many reports which generates PDF file without a delete trigger and they all work well.
    Is this problem happening because the records are getting deleted before pdf is launched? Or any type of browser (IE) or Acrobat reader settings required ?
    The deletes can be handled in the front end application after launching the report url but preferred to keep it in the reports to avoid deleting records in case there's a problem with report server and records are not processed.
    Thanks you for your help

  • Schedule in After-report Trigger

    I desperately need to be able to schedule a report in the after report trigger so that the completed report automatically gets sent to a printer. Is this possible? If not, its a real show stopper for my project. Please help! We are using BIEE 10.1.3.2 Stand alone version. Any help is GREATLY appreciated!

    Tim,
    Thank you so much for your reponse. I greatly appreciate the feedback.
    The biggest requirement of my project is to be able to automatically send the report output to a printer after it has rendered. It doesn't matter what I use to get it there (after report trigger, web services, pl/sql), as long as it is seemless to the user. So I don't necessarily need to use an after report trigger. Are those two suggestions still my best options?
    Do you happen to have an example of how to kick off a BI Publisher report from pl/sql?
    One last question, most of the report formats (html, excel, etc) open inside of the BI Publisher window, but when I run a PDF report, it automatically opens up a new browser to display it in. Is there a way to also open a PDF report inside of BI Publisher without opening a new browser? The report property, 'open report in new browser' has been disabled. Ideas?
    Thanks again! I am really grateful for your insight!!

  • After report trigger

    hi,
    is after report trigger fire after the report failed to run?
    Regards
    Ravikumar.A

    hi,
    you are right i had to post this tread in report forum. but i tagged this thread as report..
    i suppose it make sense.
    Regards
    Ravikumar.A

  • Error in after insert trigger

    Hello all,
    I have a question about after insert trigger. Will be new row inserted and commited if after insert trigger returns error? Thank you.
    regards,
    Miha

    What is the error that u r facing?
    there could multiple reasons for that. Basically, u can't put commit in the trigger (unless it is an autonomous transaction). Share the pseudo-code of u r triiger, so that , problem can be identified.
    Cheers,
    Ram Kanala

  • Droping temp table in after report trigger.

    I am working on Oracle Report. I am trying to create a temporary table to run the report. I trigger that in 'before report' trigger. Now I want to drop this temp table after the report so I tried to drop this by using
    srw.DO_SQL('drop table temptable')
    For some reason it doesn't drop the table. Do anyone have any suggestions please.
    Thanks in advance
    Sinta.

    Hi,
    Depending on which database version you are using, maybe using temporary tables is a solution.
    You create them by 'create temporary table.....'.
    Regards, Cees

  • Save the pdf file in after report trigger

    Hi friends,
    How can I save the report PDF result file in table from after report triger?
    I am using Oracle report 10g. So is it possible to do that.
    thanks

    You can install the pluggable database destination from OTN.
    http://www.oracle.com/technology/products/reports/pluginxchange/index.html
    After deploying it on the reports server you can print the PDF to a BLOB column of a table in the database.
    An other "older" option is described over here:
    http://technology.amis.nl/blog/?p=576
    Hope this helps
    Marcos

  • Error In After Logon Trigger

    Hi,
        I am using Release 11.2.0.3.0 of oracle.
    I have created a trigger for restricting specific users(logging from specific program and having specific OSUSER) from loging into the database.
    I created below trigger in SYS schema.
    CREATE OR REPLACE TRIGGER t1
    AFTER
    LOGON
    ON DATABASE
    DECLARE
    trg_program varchar2(4000);
    trg_user varchar2(4000);
    trg_osuser varchar2(4000);
    v_killsession  VARCHAR2(4000);
    v_sid   VARCHAR2(4000);
    v_serial   VARCHAR2(4000);
    BEGIN
    SELECT UPPER (program), UPPER (USERNAME), UPPER (OSUSER),SID,serial#
      INTO trg_program, trg_user, trg_osuser,v_sid,v_serial
      FROM v$session
    WHERE audsid = SYS_CONTEXT ('USERENV', 'SESSIONID') AND ROWNUM = 1;
    IF  trg_program IN ('SQLPLUS.EXE','SQLPLUSW.EXE','TOAD.EXE')
        AND  trg_user in ('USER1','USER2')--,'SYS','SYSTEM')
        --AND trg_osuser  not in ('O12345')
    THEN
           raise_application_error(-20001,'You are not authorized to connect to this schema directly!!');
    END IF;   
    END;
    when i am logging into USER1 through sqlplus/toad it works fine, i am getting required message which is mentioned as 'raise application error'
    but when i am compiling the trigger by uncommenting extra condition for OSUSER i.e trg_osuser  not in ('O12345') in the trigger code, so that it wont affect the highly provileged user(i.e OSUSER O12345).During logging in to user USER1 i am getting below error
    ERROR:
    ORA-04045: errors during recompilation/revalidation of
    XIGNCMN.RESTRICT_UNAUTH_ACCESS
    ORA-01031: insufficient privileges
    it should alow me to login because i am OSUSER 'O12345', so why its not working?

    Thanks John.
    Actually currently we are having database server installed in each of the developers machine so having DBA privilege and having business data, thats why i am planning to configure common database to which all will connect and i wont allow them to connect to the database directly through the functional schema(2 schemas). Now i am planning to restrict the developers access to only 'SELECT+DMLS' for the functional schema and i will do that by creating another user through which they will get connected to the actual functional schema with restricted privilege.
    But here the issue is that, for JAVA application, they are having local source code in each of their machine and will also need the connection string/password for the functional schema, so they will know the password for the functional schema, but i want to restrict their access through all the program except 'Jdbc thin client' so i thought of above trigger.
    kindly suggest if any other way out?

Maybe you are looking for

  • Using JSP to run batch file - command launches excel but doesn't open file

    I have written a jsp on a server which runs a batch file. Every command line in the batch works fine except the following: CALL "C:\Program Files\Microsoft Office\Office\Excel.exe" C:\Temp\spreadsheet.xls I can see that a command prompt has been open

  • MDM Sender Channel - reading file name

    Hi all, Is there any simple way to read the name of file sent by MDM when I am using MDM sender adapter ? I know if it's file sender channel, then we can read file name by writing a UDF. But just wondering about MDM sender adapter. Regards, -Shankar

  • How to nail this effect?

    I was wondering if anyoen can help me. I want to create an effect where one video is playing and then as i zoom out you can see dozens of videos also playing around that? Was wondering what i would need to learn to do this? I've been learning through

  • Screen light burned out

    My screen light seems to have burned out. My computer is probably about 6 years old, so I was wondering if this can be fixed?

  • JDBC Adaper "socket closed"

    Hello All,   We are trying to update a database table in Oracle through SAP XI.   Our scenario is IDOC to JDBC.   We are facing a problem during the JDBC connectivity between XI and Oracle.   <b>In adapter monitoring the error saying that Java.sql.SQ