Forum Stats

  • 3,837,059 Users
  • 2,262,222 Discussions
  • 7,900,194 Comments

Discussions

Post_save_document EUL trigger not working

DaveG
DaveG Member Posts: 15
edited Aug 6, 2015 9:59PM in Discoverer

Hi,

I have been trying to get the Post_save_document EUL trigger in discoverer working with no luck.

I've followed instructions from this document How To Dynamically Extract SQL from Discoverer 10g or 11g Worksheet (Doc ID 359117.1)

I'm using Discoverer 11.1.1.3 with EUL 5.1 in an Oracle R12 E-Business Suite environment.


The custom table never gets populated regardless how I save the workbook in Discoverer Desktop. Nothing happens at all. No error message or indication it has not worked. When I register the function in Discoverer Administrator it shows as VALID. 


Below is my custom table and the POST_SAVE_DOCUMENT function. I've attached screenshots from the Discoverer Administration registration of the PL/SQL function.

CREATE TABLE APPS.MY_SQL

  (

    WORKBOOKOWNER VARCHAR2(100 BYTE),

    WORKBOOK      VARCHAR2(100 BYTE),

    WORKSHEET     VARCHAR2(100 BYTE),

    SEG_SEQUENCE  NUMBER(10,0),

    SQL_SEGMENT   VARCHAR2(2000 BYTE)

  )

create or replace FUNCTION POST_SAVE_DOCUMENT(

    P_WORKBOOKOWNER IN VARCHAR,

    P_WORKBOOK      IN VARCHAR,

    P_WORKSHEET     IN VARCHAR,

    P_SEQUENCE      IN NUMBER,

    P_SQL_SEGMENT   IN VARCHAR

  )

  RETURN NUMBER

AS

BEGIN

  DELETE FROM my_sql;

  INSERT

  INTO my_sql

    (

      WORKBOOKOWNER,

      WORKBOOK,

      WORKSHEET,

      SEG_SEQUENCE,

      SQL_SEGMENT

    )

    VALUES

    (

      P_WORKBOOKOWNER,

      P_WORKBOOK,

      P_WORKSHEET,

      P_SEQUENCE,

      P_SQL_SEGMENT

    );

  RETURN 1;

END;

Any help will be appreciated.

regards

Dave

This discussion has been closed.