How to call procedure with parameters in a trigger Oracle PL/SQL

Requirement:

When an absence is entered into System, an SIT should be auto filled based on data available on Absence form.

Here is the procedure to upload data into SIT(Special Information Type)

How to create SIT in Oracle HRMS

CREATE OR REPLACE PROCEDURE APPS.DEV_CREATE_SPECIAL_INFO(P_PERSON_ID IN NUMBER,P_DATE_START IN DATE,P_DATE_END IN DATE)
IS

   L_ID_FLEX_NUM               NUMBER;
   L_PERSON_ID                 NUMBER;
   L_NAME                      VARCHAR2 (240);
   ERROR_DESC                  VARCHAR2 (240);
   LV_SIT_FLAG                 CHAR (1);
   L_OBJECT_VERSION_NUMBER     NUMBER;
   L_ANALYSIS_CRITERIA_ID      NUMBER;
   L_PERSON_ANALYSIS_ID        NUMBER;
   L_PEA_OBJECT_VERSION_NUMBER NUMBER;
  

  
BEGIN

    L_PERSON_ID := P_PERSON_ID;
   
   


       
       

      BEGIN
         HR_SIT_API.CREATE_SIT
                        (P_VALIDATE                   => FALSE,
                         P_PERSON_ID                  => L_PERSON_ID,
                         P_BUSINESS_GROUP_ID          => 2217,--FND_PROFILE.VALUE('PER_BUSINESS_GROUP_ID'),
                         P_ID_FLEX_NUM                => 50647,--L_ID_FLEX_NUM,
                         P_DATE_FROM                  => P_DATE_START,
                         P_DATE_TO                    => P_DATE_END,
                         P_EFFECTIVE_DATE             => P_DATE_END,
                         P_SEGMENT1                   => to_char(P_DATE_START,'YYYY/MM/DD HH24:MI:SS'),-- P_DATE_START,
                         P_SEGMENT2                   => to_char(P_DATE_END,'YYYY/MM/DD HH24:MI:SS'),--P_DATE_END,
                         --P_SEGMENT3                   => LC_C_SIT.SEGMENT3,
                         --,P_CONCAT_SEGMENTS           =>
                         --P_ATTRIBUTE_CATEGORY         => LC_C_SIT.ATTRIBUTE_CATEGORY,
                         --P_ATTRIBUTE1                 => LC_C_SIT.ATTRIBUTE1,
                         --P_ATTRIBUTE2                 => LC_C_SIT.ATTRIBUTE2,                        
                         P_ANALYSIS_CRITERIA_ID       => L_ANALYSIS_CRITERIA_ID,
                         P_PERSON_ANALYSIS_ID         => L_PERSON_ANALYSIS_ID,
                         P_PEA_OBJECT_VERSION_NUMBER  => L_PEA_OBJECT_VERSION_NUMBER
                        
                        );
      END;



      L_OBJECT_VERSION_NUMBER := '';
      ERROR_DESC := '';
      LV_SIT_FLAG := '';
      L_OBJECT_VERSION_NUMBER  :=   '';
      L_ANALYSIS_CRITERIA_ID   :=   '';
      L_PERSON_ANALYSIS_ID     :=  '';
      L_PEA_OBJECT_VERSION_NUMBER := '';
  


EXCEPTION
   WHEN OTHERS
   THEN
      DBMS_OUTPUT.PUT_LINE (SQLERRM);
END;

/


Trigger

create or replace trigger Auto_ticket
AFTER insert on per_absence_attendances
for each row
declare
    PRAGMA AUTONOMOUS_TRANSACTION;
begin
  APPS.DEV_CREATE_SPECIAL_INFO(:new.person_id,:new.date_start,:new.date_end);
  COMMIT;

end;


Leave comment for any query.


7 comments:

  1. Great post very useful info thanks for this post ....
    Devops trainign in chennai

    ReplyDelete
  2. Awesome post! Personally I like your site. . I am so impressed to read your content. I am looking forward for the next valuable and informative concept in your blog. Overall outstanding post. Carry on :) Well done!
    If you want Digital Marketing Serives :-
    Digital marketing Service in Delhi
    SMM Services
    PPC Services in Delhi
    Website Design & Development Packages
    SEO Services PackagesLocal SEO services
    E-mail marketing services
    YouTube plans

    ReplyDelete
  3. Awesome post! Personally I like your site. . I am so impressed to read your content. I am looking forward for the next valuable and informative concept in your blog. Overall outstanding post. Carry on :) Well done!
    If you want Digital Marketing Serives :-
    online bookkeeping tool

    ReplyDelete
  4. Awesome post! Personally I like your site. . I am so impressed to read your content. I am looking forward for the next valuable and informative concept in your blog. Overall outstanding post. Carry on :) Well done!
    If you want KPMG SERVICE :-
    online bookkeeping tool

    ReplyDelete
  5. Great learning experience with proficient trainers in Informatica. Flexible timings with hands on experience with real time scenarios.
    Oracle Apps HRMS Training in Bangalore

    ReplyDelete