1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

What kind of a code is this?

Discussion in 'Oracle Forms and Reports' started by vamsioracle, Aug 25, 2009.

  1. vamsioracle

    vamsioracle Forum Expert

    Messages:
    98
    Likes Received:
    1
    Trophy Points:
    140
    Hi

    could someone explain me what kind of a code is this.

    Code (SQL):

    CREATE OR REPLACE PACKAGE BODY APPS.FFP3613_01011951 AS
    /*
    Code generated by Oracle FastFormula - do not edit. Formula Name:
    BG_ABSENCE_DURATION
    */

    PROCEDURE DD(V IN OUT NOCOPY DATE,I IN NUMBER,D IN DATE) IS
    BEGIN IF I=-2 OR I=0 THEN V:=D; END IF; END DD;
    PROCEDURE DN(V IN OUT NOCOPY NUMBER,I IN NUMBER,D IN NUMBER) IS
    BEGIN IF I=-2 OR I=0 THEN V:=D; END IF; END DN;
    PROCEDURE DT(V IN OUT NOCOPY VARCHAR2,I IN NUMBER,D IN VARCHAR2) IS
    BEGIN IF I=-2 OR I=0 THEN V:=D; END IF; END DT;
    PROCEDURE FORMULA IS

    L_D FF_WRAPPER_PKG.T_DATE:=FF_WRAPPER_PKG.G_D;
    L_T FF_WRAPPER_PKG.T_TEXT:=FF_WRAPPER_PKG.G_T;
    L_N FF_WRAPPER_PKG.T_NUMBER:=FF_WRAPPER_PKG.G_N;
    L_I FF_WRAPPER_PKG.T_NUMBER:=FF_WRAPPER_PKG.G_I;
    L_ERCD NUMBER;
    L_ERLN NUMBER;
    L_ERMT VARCHAR2(255);
    BEGIN
    FORMULA(L_D,L_N,L_T,L_I,L_ERLN,L_ERCD,L_ERMT);
    FF_WRAPPER_PKG.G_D:=L_D;
    FF_WRAPPER_PKG.G_I:=L_I;
    FF_WRAPPER_PKG.G_N:=L_N;
    FF_WRAPPER_PKG.G_T:=L_T;
    FF_WRAPPER_PKG.G_FFERLN:=L_ERLN;
    FF_WRAPPER_PKG.G_FFERCD:=L_ERCD;
    FF_WRAPPER_PKG.G_FFERMT:=L_ERMT;
    END FORMULA;
    PROCEDURE FORMULA(D IN OUT NOCOPY FF_WRAPPER_PKG.T_DATE,
    N IN OUT NOCOPY FF_WRAPPER_PKG.T_NUMBER,
    T IN OUT NOCOPY FF_WRAPPER_PKG.T_TEXT,
    I IN OUT NOCOPY FF_WRAPPER_PKG.T_NUMBER,
    FFERLN OUT NOCOPY NUMBER,FFERCD IN OUT NOCOPY NUMBER,FFERMT OUT NOCOPY VARCHAR2) IS
    BEGIN
    FORMULA
    (
    D(1),
    I(3),
    D(3),
    T(4),
    I(6),
    T(3),
    I(4),
    T(1),
    I(1),
    D(2),
    I(5),
    T(2),
    I(2),
    T(5),
    I(7),
    N(1),
    D(4),
    I(8),
    FFERLN,
    FFERCD,
    FFERMT
    );
    END FORMULA;
    PROCEDURE FORMULA (
    D1 IN OUT NOCOPY DATE,
    I3 IN OUT NOCOPY NUMBER,
    D3 IN OUT NOCOPY DATE,
    T4 IN OUT NOCOPY VARCHAR2,
    I6 IN OUT NOCOPY NUMBER,
    T3 IN OUT NOCOPY VARCHAR2,
    I4 IN OUT NOCOPY NUMBER,
    T1 IN OUT NOCOPY VARCHAR2,
    I1 IN OUT NOCOPY NUMBER,
    D2 IN OUT NOCOPY DATE,
    I5 IN OUT NOCOPY NUMBER,
    T2 IN OUT NOCOPY VARCHAR2,
    I2 IN OUT NOCOPY NUMBER,
    T5 IN OUT NOCOPY VARCHAR2,
    I7 IN OUT NOCOPY NUMBER,
    N1 IN OUT NOCOPY NUMBER,
    D4 IN OUT NOCOPY DATE,
    I8 IN OUT NOCOPY NUMBER,
    FFERLN OUT NOCOPY NUMBER,
    FFERCD IN OUT NOCOPY NUMBER,
    FFERMT OUT NOCOPY VARCHAR2) IS
    /* BG_ABSENCE_DURATION*/
    LEMT VARCHAR2(255);
    L_ERCD NUMBER(15,0);
    L_ PLS_INTEGER;
    R_ VARCHAR2(255);
    BEGIN
    DECLARE
    EX1  EXCEPTION;
    NULL_FOUND  EXCEPTION;
    V0 NUMBER;
    V1 NUMBER;
    V2 NUMBER;
    V3 NUMBER;
    V4 NUMBER;
    V5 NUMBER;
    V6 VARCHAR2(255);
    V7 NUMBER;
    V8 NUMBER;
    V9 NUMBER;
    V10 NUMBER;
    V11 VARCHAR2(255);
    V12 NUMBER;
    V13 NUMBER;
    V14 NUMBER;
    V15 NUMBER;
    V16 VARCHAR2(255);
    V17 NUMBER;
    V18 NUMBER;
    V19 NUMBER;
    V20 VARCHAR2(255);
    V21 VARCHAR2(255);
    V22 DATE;
    V23 DATE;
    V24 VARCHAR2(255);
    tv0 VARCHAR2(255);
    CURSOR C1 IS
    SELECT
    hr_general.decode_lookup('SEX',PEOPLE.sex),
    'FF ROUTE:SEH_PER_PERSON_DETAILS_PERF'
    FROM
     per_all_people_f PEOPLE
     , per_person_types PTYPE
     , per_phones PHONE
     , fnd_sessions SES
     , hr_lookups a
     , hr_lookups b
     , hr_lookups c
     , hr_lookups d
     , per_all_assignments_f ASSIGN
     WHERE D3 BETWEEN ASSIGN.effective_start_date
     AND ASSIGN.effective_end_date
     AND ASSIGN.assignment_id = N1
     AND PEOPLE.person_id = ASSIGN.person_id
     AND D3 BETWEEN PEOPLE.effective_start_date
     AND PEOPLE.effective_end_date
     AND PTYPE.person_type_id = PEOPLE.person_type_id
     AND PHONE.parent_id (+) = PEOPLE.person_id
     AND PHONE.parent_table (+)= 'PER_PEOPLE_F'
     AND PHONE.phone_type (+)= 'W1'
     AND D3 BETWEEN NVL(PHONE.date_from(+),D3)
     AND NVL(PHONE.date_to(+),D3)
     AND a.lookup_type = 'YES_NO'
     AND a.lookup_code = nvl(PEOPLE.current_applicant_flag,'N')
     AND a.application_id = 800
     AND b.lookup_type = 'YES_NO'
     AND b.lookup_code = nvl(PEOPLE.current_npw_flag,'N')
     AND b.application_id = 800
     AND c.lookup_type = 'YES_NO'
     AND c.lookup_code = nvl(PEOPLE.current_employee_flag,'N')
     AND c.application_id = 800
     AND d.lookup_type = 'REGISTERED_DISABLED'
     AND d.lookup_code = nvl(PEOPLE.registered_disabled_flag,'N')
     AND d.application_id = 800
     AND SES.session_id = USERENV('SESSIONID');
    V25 DATE;
    V26 DATE;
    V27 DATE;
    V28 DATE;
    V29 NUMBER;
    CURSOR C2 IS
    SELECT
    PGROUP.SEGMENT1,
    'FF ROUTE:KEY_FLEXFIELD_ROUTE'
    FROM
     per_all_assignments_f ASSIGN,
     hr_all_positions_f POS,
     hr_all_positions_f_tl POSTL,
     per_position_definitions POSDEF,
     per_grades GRA,
     per_grades_tl GRATL,
     per_grade_definitions GRADEF,
     per_jobs JOB,
     per_jobs_tl JOBTL,
     per_job_definitions JOBDEF,
     pay_people_groups PGROUP
     WHERE D3 BETWEEN ASSIGN.effective_start_date
     AND ASSIGN.effective_end_date
     AND D3 BETWEEN POS.effective_start_date(+)
     AND POS.effective_end_date(+)
     AND ASSIGN.assignment_id = N1
     AND POS.position_id (+)= ASSIGN.position_id
     AND POSTL.position_id (+)= ASSIGN.position_id
     AND POSTL.LANGUAGE (+)= userenv('LANG')
     AND POSDEF.position_definition_id (+)= POS.position_definition_id
     AND GRA.grade_id (+)= ASSIGN.grade_id
     AND GRATL.grade_id (+)= ASSIGN.grade_id
     AND GRATL.LANGUAGE (+)= userenv('LANG')
     AND GRADEF.grade_definition_id (+)= GRA.grade_definition_id
     AND JOB.job_id (+)= ASSIGN.job_id
     AND JOBTL.job_id (+)= ASSIGN.job_id
     AND JOBTL.LANGUAGE (+)= userenv('LANG')
     AND JOBDEF.job_definition_id (+)= JOB.job_definition_id
     AND PGROUP.people_group_id (+)= ASSIGN.people_group_id;
    dv0 DATE;
    CURSOR C0 IS
    SELECT
    SERVICE.date_start,
    'FF ROUTE:SEH_EMP_PERSON_SERVICE_1'
    FROM
     per_all_assignments_f ASSIGN
    , per_periods_of_service SERVICE
    WHERE D3 BETWEEN ASSIGN.effective_start_date
     AND ASSIGN.effective_end_date
    AND ASSIGN.assignment_id = N1
    AND SERVICE.period_of_Service_id (+)= ASSIGN.period_of_service_id;
    V30 DATE;
    V31 DATE;
    BEGIN
    L_ERCD:=0;
    LEMT:='OB';
    L_:=50;
    V0:=5;

    L_:=51;
    V1:=3;

    L_:=52;
    V2:=15;

    L_:=53;
    V3:=5;

    L_:=82;
    LEMT:='TO_DATE';
    LEMT:='SUBSTR';
    LEMT:='TO_CHAR';
    IF I3=0 THEN
    D1:=TO_DATE('0001/01/01 00:00:00','FXYYYY/MM/DD HH24:MI:SS');
    I3:=-2;
    END IF;
    V22:=fffunc.td(('01-JAN-' || SUBSTR(fffunc.dc(D1),1,4)));

    L_:=83;
    LEMT:='TO_DATE';
    LEMT:='SUBSTR';
    LEMT:='TO_CHAR';
    V23:=fffunc.td(('31-DEC-' || SUBSTR(fffunc.dc(D1),1,4)));

    L_:=85;
    LEMT:='CBTT_GET_ABSENCE_TYPE';
    IF I4=0 THEN
    T3:=T3;
    LEMT:='ABSENCE_ATTENDANCE_TYPE_ID';
    RAISE EX1;
    END IF;
    V24:=CBTT_UDFS_PKG.CBTT_GET_ABSENCE_TYPE(T3);

    L_:=103;
    IF I5=0 THEN
    D2:=TO_DATE('4712/12/31 00:00:00','FXYYYY/MM/DD HH24:MI:SS');
    I5:=-2;
    END IF;
    IF (((I3=-2 )
    OR (I5=-2 ))) THEN
    L_:=89;
    T2:='0';

     ELSE
    L_:=93;
    LEMT:='CBTT_GET_GRADE';
    V11:=CBTT_UDFS_PKG.CBTT_GET_GRADE(N1,D1);

    L_:=102;
    IF ((V11 = 'Security Staff')) THEN
    L_:=97;
    LEMT:='TO_CHAR';
    LEMT:='DAYS_BETWEEN';

     

    vamsi
     
  2. Sadik

    Sadik Community Moderator Forum Guru

    Messages:
    1,906
    Likes Received:
    252
    Trophy Points:
    1,455
    I think that's the backend object of a fastformula. Why are you asking?

    I hope you know how to use fastformulas :)

    A Link
     
  3. vamsioracle

    vamsioracle Forum Expert

    Messages:
    98
    Likes Received:
    1
    Trophy Points:
    140
    Hi Sadik,

    yeah i know fast formulas. But the problem is when i make some changes to fast formula, the corresponding changes doesn't take effect in that code

    for example:

    If i add an extra parameter to any function, the object code doesn't change, and i get an error " A compile version of package FFP3613_.... doesn't exist"

    I had to manually update the code.


    what might be the problem

    Vamsi
     
  4. apps_expert

    apps_expert Forum Expert

    Messages:
    325
    Likes Received:
    28
    Trophy Points:
    330
    Location:
    Chennai, India
    I would suggest delete the registered function in your fastformula, log off and log in again and reregister it. That might resolve your compilation error.
     
  5. vamsioracle

    vamsioracle Forum Expert

    Messages:
    98
    Likes Received:
    1
    Trophy Points:
    140
    This didn't resolve it. It is working for all the other custom functions which were registered a long time back. I followed the same procedure to register the new function. But it is not updating the object code.

    Is this a bug from oracle