Tuesday, 12 August 2014

Concurrent Hold Process Trigger


CREATE OR REPLACE TRIGGER  < TRIGGER_NAME >
   BEFORE INSERT
   ON FND_CONCURRENT_REQUESTS
   REFERENCING OLD AS OLD NEW AS NEW
   FOR EACH ROW
WHEN (
NEW.concurrent_program_id = 41819
      )
DECLARE
   v_key   NUMBER;
BEGIN
   --:NEW.hold_flag   := 'Y';
   :NEW.status_code := 'Z';
END;
/

CREATE OR REPLACE TRIGGER < Trigger_Name >
   BEFORE INSERT
   ON FND_CONCURRENT_REQUESTS
   REFERENCING OLD AS OLD NEW AS NEW
   FOR EACH ROW
WHEN (
NEW.concurrent_program_id = 109075
      )
DECLARE
   v_key          NUMBER;
   v_created_by   VARCHAR2 (100);
BEGIN
   SELECT created_by
     INTO v_created_by
     FROM ap_suppliers
    WHERE vendor_id IN (SELECT payee_supplier_id
                          FROM iby_payments_all
                         WHERE payment_instruction_id = :NEW.argument1);

   IF :NEW.requested_by = v_created_by
   THEN
      :NEW.status_code := 'A';
   END IF;
END;

1 comment:

  1. Regards
    Sridevi Koduru (Senior Oracle Apps Trainer Oracleappstechnical.com)
    LinkedIn profile - https://in.linkedin.com/in/sridevi-koduru-9b876a8b
    Please Contact for One to One Online Training on Oracle Apps Technical, Financials, SCM, Oracle Manufacturing, BI Publisher, OAF, ADF, SQL, PL/SQL, D2K at sridevikoduru@oracleappstechnical.com | +91 - 9581017828.

    ReplyDelete