ffug 2222

Embed Size (px)

Citation preview

  • 8/8/2019 ffug 2222

    1/54

    Oracle

    FastFormulat

    UsersGu

    ide

    Release11.0

    PartNo.A5834601

    EnablingtheInformationAget

  • 8/8/2019 ffug 2222

    2/54

    OracleFastFormulaU

    sersGuide,Release11.0

    PartNo.A5834601

    CopyrightEOracleC

    orporation1995

    Allrightsreserved.P

    rintedintheU.S.A.

    PrimaryAuthor:John

    Cafolla,JulietteFlemingandLouiseRaffo

    Contributors:MarkC

    allaghan,MichaelOShea

    Thissoftwarewasno

    tdevelopedforuseinanynuclear,aviation,mass

    transit,medical,orotherinherentlydangerousapplications.Itisthe

    customersresponsibilitytotakeallappropriatemeasurestoensurethe

    safe

    useofsuchapplicatio

    nsiftheprogramsareusedforsuchpurposes.

    Thissoftware/docum

    entationcontainsproprietaryinformationofOracle

    Corporation;itisprov

    idedunderalicenseagreementcontainingrestrictio

    nson

    useanddisclosureandisalsoprotectedbycopyrightlaw.Reverseengineering

    ofthesoftwareisproh

    ibited.

    Ifthissoftware/documentationisdeliveredtoaU.S.GovernmentAgency

    of

    theDepartmentofDefense,thenitisdeliveredwithRestrictedRightsand

    the

    followinglegendisap

    plicable:

    RestrictedRightsLeg

    endUse,duplication,ordisclosurebytheGovernm

    entis

    subjecttorestrictionsassetforthinsubparagraph(c)(1)(ii)ofDFARS

    252.2277013,RightsinTechnicalDataandComputerSoftware(October1

    988).

    OracleCorporation,500OracleParkway,RedwoodCity,CA94065.

    Ifthissoftware/documentationisdeliveredtoaU.S.GovernmentAgency

    not

    withintheDepartmen

    tofDefense,thenitisdeliveredwithRestrictedRights,

    asdefinedinFAR52.2

    2714,RightsinDataGeneral,includingAlternate

    III

    (June1987).

    Theinformationinthisdocumentissubjecttochangewithoutnotice.Ifyo

    u

    findanyproblemsinthedocumentation,pleasereportthemtousinwriting.

    OracleCorporationdoesnotwarrantthatthisdocumentiserrorfree.

    ORACLE,OracleAlert,O

    racleFinancials,SQL*PlusareregisteredtrademarksofOracle

    Corporation

    OracleApplicationObjectLibrary,OracleGeneralLedger,OracleHumanResources,

    OraclePayroll,OracleReports,PL/SQL,SQL*TextRetrievalaretrademarksofOracle

    Corporation.

    Allotherproductsorcompanynamesareusedforidentificationpurposes

    only,

    andmaybetrademarksoftheirrespectiveowners.

  • 8/8/2019 ffug 2222

    3/54

    i

    Contents

    Contents

    Preface

    Preface

    i

    .................................................

    AboutThisUsersGuide

    ii

    ..............................

    FindingtheLatestInformation

    ii

    .........................

    Assumptions

    iii

    ........................................

    DoNotUseDatabaseToolsto

    ModifyOracleApplications

    Data

    iv

    ................................................

    OtherInformationSources

    v

    .............................

    AboutOracle

    viii

    ........................................

    ThankYou

    viii

    ...........................................

    Chapter1

    OracleFastFormula

    11

    ......................................

    OracleFastFormulaOverview

    12

    .............................

    WritingaSimplePayrollCalcu

    lation

    12

    ....................

    TypesofInput

    13

    .......................................

    WritingMoreComplexCalculations

    15

    ....................

    IncorporatingConditions

    16

    ..............................

    CommentingyourFormulas

    18

    ...........................

    FormulaStructure

    19

    ....................................

    UsingtheFormulaWindow

    110

    ...........................

    UsingtheGlobalsWindow

    112

    ............................

    DefiningFunctions

    113

    ...................................

    UsingOracleFastFormulaforPayrollCalculations

    116

    ...........

    AccessingInputValuesinPay

    rollFormulas

    117

    ..............

    WritingEfficientPayrollCalcu

    lationFormulas

    119

    ...........

    WritingFormulasforElement

    SkipRules

    121

    ................

  • 8/8/2019 ffug 2222

    4/54

  • 8/8/2019 ffug 2222

    5/54

    iii

    Contents

    DynamicDatabaseItems

    A19

    ..................................

    ElementDatabaseItems

    A19

    ...............................

    GradeRateDatabaseItems

    A22

    ............................

    PayScaleRateDatabaseItems

    A22

    .........................

    DescriptiveFlexfieldDatabase

    Items

    A23

    ....................

    KeyFlexfieldDatabaseItems

    A25

    ..........................

    AbsenceDatabaseItems

    A26

    ...............................

    Glossary

    Index

    ReadersCommentForm

    OracleFastFormulaUsersGuide

    A5834601

    OracleCorporationwelcomesyourcommentsandsuggestionsonthequalityandu

    sefulness

    ofthispublication.

    Yourinputisanimportantpartoftheinformationweuseforrev

    ision.

    Didyoufindanyerrors?

    Istheinformationclearlypresen

    ted?

    Doyouneedmoreinformation?

    Ifso,where?

    Aretheexamplescorrect?Doy

    ouneedmoreexamples?

    Whatfeaturesdidyoulikemost

    aboutthismanual?Whatdidyoulikeleastabo

    utit?

    Ifyoufindanyerrorsorhaveanyothersuggestionsforimprovement,pleaseindicatethetopic,chapter,

    andpagenumberbelow:

    Pleasesendyourcommentsto:

    OracleApplicationsDocumentation

    Manager

    OracleCorporation

    500OracleParkway

    RedwoodShores,CA

    94065

    Phone:(650)5067000

    Fax:(65

    0)5067200

    Ifyouwouldlikeareply,pleasegiveyourname,address,andtelephonenumberbelow:

    Thankyouforhelpingusimproveourdocumentation.

  • 8/8/2019 ffug 2222

    6/54

    Index2

    OracleFastFormulaUsersGuide

    usingvariables,132to135

    writingefficientfo

    rmulas,119to121

    Functions

    informulas,136

    userdefined,113

    GGlobalvalues,14,

    112,132

    I Ifstatement,informulas,148

    Inputvalues

    inpayrollformuals,117

    validation,123

    Inputsstatement,1

    3,146

    LLocalvariables,14

    ,132

    PPayrollformulas,1

    16to122

    Payrollruns,skiprules,121

    Processes

    CreateDescriptive

    FlexfieldDBItems,A34

    CreateKeyFlexfieldDBItems,A36

    QQuickPaintreports,writingformulasfor,126

    RReturnstatement,informulas,150

    SSkiprules,1

    21

    Statements,in

    formulas,19to110,145

    UUsertables,va

    lidatingentries,123

    VVariables,info

    rmulas,132

    WWASDEFAUL

    TEDcondition,16

    Windows

    DatabaseIte

    ms,111

    DefineFunction,113

    Formula,1

    10

    Globals,112

    i

    Preface

    Preface

    WelcometoRelease11.0oftheOracleFastFormulaUsersGuide.

    Thisguideincludestheinformationyouneedtounderstandanduse

    OracleFastFormula.Itprovidesdetailsofsyntaxforeachofthe

    statementsand

    functionsavailableinFastFormulaaswellasexamples

    ofthedifferent

    typesofformulasyoumaywanttowrite.

    Thisprefaceex

    plainshowtheguideisorganizedandintroduc

    esother

    sourcesofinformationthatcanhelpyou.

  • 8/8/2019 ffug 2222

    7/54

  • 8/8/2019 ffug 2222

    8/54

    Glossary10

    OracleFastFormulaUsersGuide

    TTaskFlowsAseque

    nceofwindowslinkedby

    buttonstotakeyouthroughthesteps

    requiredtocomp

    leteatask,suchashiringa

    newrecruit.Syst

    emadministratorscan

    createtaskflowstomeettheneedsof

    groupsofusers.

    TerminatingEmployeesYouterminatean

    employeewhenh

    eorsheleavesyour

    organization.Informationaboutthe

    employeeremain

    sonthesystembutall

    currentassignme

    ntsareended.

    TerminationRuleS

    pecifieswhenentriesofan

    elementshouldclosedownforanemployee

    wholeavesyourenterprise.Youcandefine

    thatentriesendo

    ntheemployeesactual

    terminationdate

    orremainopenuntila

    finalprocessingd

    ate.

    UUserBalancesUserscancreate,updateand

    deletetheirownbalances,including

    dimensionsandb

    alancefeeds.Seealso:

    Balances

    UserProfileO

    ptionsFeaturesthatallow

    systemadm

    inistratorsanduserstotailor

    OracleHRMStotheirexactrequirements.

    Seealso:Re

    sponsibility,SecurityProfile

    VWaitingDays

    StatutorySickPayisnot

    payablefor

    thefirstthreequalifyingdaysin

    periodofin

    capacityforwork(PIW),which

    arecalledw

    aitingdays.Theyarenot

    necessarily

    thesameasthefirstthreedays

    ofsickness,aswaitingdayscanbecarried

    forwardfro

    mapreviousPIWi

    fthelinking

    intervalbetweenthetwoPIWsislessthan

    56days.

    WorkChoices

    AlsoknownasDeploymentor

    WorkFacto

    rs.Thesecanaffectapersons

    capacityto

    bedeployedwithinan

    enterprise,

    suchwillingnesstotravelor

    relocate.Yo

    ucanholdworkchoicesatboth

    jobandposition,oratpersonlevel.

    WorkStructur

    esThefundamentaldefinitions

    oforganiza

    tions,jobs,positions,grades,

    payrollsan

    dotheremployeegroupswithin

    yourenterp

    risethatprovidetheframework

    fordefiningtheworkassignmentsofyour

    employees.

    iii

    Preface

    Assumptions

    Thisguideassu

    mesyouhaveaworkingknowledgeofthefollowing:

    theprinciplesandcustomarypracticesofyourbusiness

    area

    theplaceswhereFastFormulaareusedintheOracleHR

    MS

    product

    set.

    Ifyouar

    enotfamiliarwithOracleHRorOraclePayroll

    we

    suggestyouattendtheintroductionorimplementationtraining

    classesfortheseproductavailablethroughOracleEducation.

    theOrac

    leApplicationsgraphicaluserinterface.

    Tolearn

    moreaboutthis,readtheOracleApplicationsUsers

    Guide.

    SeeOtherInformationSourcesbelowforfurtherdetailsofOra

    cle

    Applicationsproductinformation.

  • 8/8/2019 ffug 2222

    9/54

  • 8/8/2019 ffug 2222

    10/54

  • 8/8/2019 ffug 2222

    11/54

  • 8/8/2019 ffug 2222

    12/54

  • 8/8/2019 ffug 2222

    13/54

  • 8/8/2019 ffug 2222

    14/54

  • 8/8/2019 ffug 2222

    15/54

  • 8/8/2019 ffug 2222

    16/54

  • 8/8/2019 ffug 2222

    17/54

  • 8/8/2019 ffug 2222

    18/54

    A26

    OracleFastFor

    mulaUser;sGuide

    AbsenceDatabaseItems W

    henyoudefineanabsencetype,OracleHRMSrunsaprocessto

    createthefollowingdatabaseitemforit.Toensureeasyrecognitionof

    thisitem,theprocessaddstheabsencetypename

    toit.

    Databaseitem

    Description

    _CUM_BALANCE

    Thecumulativebalanceforan

    absencetype

    TableB24

    NestedExpressions

    15

    OracleFastFormula

    Note:

    Youcannotchangethevalueofinputvalues,database

    items,orglobalvalueswithinaformula.

    WritingMoreComplexCalculation

    s

    TheAssignmentstatementinthewagesexampleaboveusesa

    simple

    multiplicationtocalculatethevalueofthewageselement.Youcanalso

    useaddition,subtraction,division,andanumberoffunctions.

    For

    example:

    bonus

    =

    GR

    EATEST

    (days_

    at_

    wor

    k,163

    )

    +

    bonus_

    rate

    HerethefunctionGREATESTtellsOracleFastFormulatousethevalue

    ofthevariable

    days_at_work,ifitisgreaterthan163,andothe

    rwiseto

    usetheconstan

    t163.

    Thedatatypeo

    fvariablesandconstantsdetermineshowoperatorsand

    functionsactonthevalues.Forexample,theadditionoperato

    r(+)can

    beusedwithnumericortextdata,whiledivisioncanbeusedwith

    numericdatao

    nly.

    Therearespecialfunctionsthatconvertvariablesfrom:

    numberstotext(TO_T

    EXT)

    datesto

    text(TO_T

    EXT)

    texttodate(TO_D

    ATE)

    texttonumber(TO_N

    UM)

    See:Functions:page136

    TheAssignmentstatementcanuseasmanyarithmeticoperato

    rsand

    functionsasyo

    urequire.Eachfunctionorcalculationisoneex

    pression,

    andyoucanne

    stexpressionstocreatemorecomplexcalculations.You

    mustusebrack

    etstomakecleartoOracleFastFormulatheord

    erin

    whichthecalcu

    lationsareperformed.Forexample:

    ANNUAL_

    BON

    US

    =

    trunc

    (((((sa

    lary_

    amount

    /100

    )*

    bonus_

    perc

    entage

    )/183

    )*

    (days_

    between

    (en

    d_

    per

    io

    d_

    date,

    start_

    date

    )

    +

    1)),

    2)

    OracleFastFormulabeginscalculatinginsidethebracketsand

    fromleft

    toright,inthefollowingsteps:

    1.

    sa

    lary_

    amo

    unt

    /100

    2.

    1.

    *

    bonus_

    percentage

    3.

    2.

    /

    183

  • 8/8/2019 ffug 2222

    19/54

  • 8/8/2019 ffug 2222

    20/54

    A24

    OracleFastFor

    mulaUser;sGuide

    Description

    Databaseitem

    APPLICATIONS_

    =

    183

    AND

    emp

    lo

    yee_

    status

    =

    FULL

    TIME

    THEN

    .

    .

    .

    UseORifyouwantanactiontooccurwhenanyoneof

    twoor

    moreconditionsistrue.Forexample:

    IF

    stoc

    k_

    leve

    l

    =

    1500

    THEN

    .

    .

    .

    UseNOTifyouwantanactiontooccurwhenaconditionisnot

    true.Forexample:

    IF

    NOT

    (mo

    nt

    hs_

    between

    (purc

    hase_

    date,

    system_

    date

    )

    =>

    60

    THEN

    .

    .

    .

    AswithAssign

    mentstatements,youmayneedtousebracketstotell

    OracleFastFormulainwhichordertotestconditions.Bydefault,NOT

    hasthehighest

    precedence,followedbyANDthenOR.Sothe

    followingcond

    ition:

    IF

    X

    =6

    AND

    NOT

    Y

    =

    7

    OR

    P

    >=

    6

    isinterpreteda

    s:

    IF

    (X

    =

    6

    AND

    (NOT

    Y

    =

    7))

    OR

    P

    >=

    6

    Howyouuseb

    racketscanchangedramaticallythemeaningofa

    formula. S

    uggestion:Usebracketswheneveryoucreatemultiple

    conditions,sothatthemeaningoftheformulaisclear

    toother

    readers.

    Wehaveseenh

    owtomakeconditionsmorecomplex.Youcan

    also

    maketheactionsperformedascomplexasyoulike.Inoursim

    ple

  • 8/8/2019 ffug 2222

    21/54

  • 8/8/2019 ffug 2222

    22/54

    A22

    OracleFastFor

    mulaUser;sGuide

    GradeRateDatabaseItems

    Whenyoudefineagraderate,OracleH

    RMSrunsaprocesstocreatea

    numberofrelateddatabaseitemsforit.Toensureeasyrecognitionof

    theseitems,theprocessaddsthegrade

    ratenametoeach

    one.

    Hereisalistofdatabaseitemscreatedeachtimeyoudefineagrade

    rateusingtheGradeRatewindow:

    Databaseitem

    Description

    GRADE__VALUE

    Thegraderatesvalue

    GRADE__MINIMUM

    Thegraderatesminimumvalue

    GRADE__MAXIMUM

    Thegraderatesmaximumvalue

    TableB20

    PayScaleRateD

    atabaseItems

    Whenyoudefineapayscalerate,OracleHRMSrunsaprocessto

    createthefollowingdatabaseitemforit.Toensureeasyrecognitionof

    thisitem,theprocessaddstheratenam

    etoit.

    Databaseitem

    Description

    SPINE__VALUE

    Thepayscaleratesvalue

    TableB21

    AliasStatement

    19

    OracleFastFormula

    Warning:Donotputacommentwithinacomment.

    This

    causes

    OracleFastFormulatoreturnasyntaxerror.

    Youcanuseac

    ommenttoexplainwhatpartofyourformulad

    oes.So,

    forexample,yo

    umightwantacommentexplainingwhodecid

    esthe

    bonuspercenta

    ge:

    INPUTS

    ARE

    sa

    lary_

    amount,

    start_

    date

    (date

    ),

    en

    d_

    per

    io

    d_

    date

    (date

    ),

    bonus_

    percentage

    /*

    dec

    ide

    d

    at

    boar

    d

    lev

    el

    *

    /

    Youcanalsousecommentstocommentoutpartsoftheform

    ulayou

    donotcurrentl

    ywanttouse.So,forexample,youcaninclude

    afifth

    inputofemployee_s

    tatus,ensuringthatemployeeswithastatusoffull

    timeareaward

    edabonus.However,asyoudonotyethavea

    rangeof

    statuses,youdonotcurrentlyneedthefifthinput.

    INPUTS

    ARE

    sa

    lary_

    amount,

    start_

    date

    (date

    ),

    en

    d_

    per

    io

    d_

    date

    (date

    ),

    bonus_

    percentage

    /*

    dec

    ide

    d

    at

    boar

    d

    lev

    el

    */

    /*

    emp

    loyee_

    status

    (text

    )

    */

    FormulaStructure

    Avalidformul

    ahasawelldefinedstructure.Itismadeupof

    commentsand

    statements.OracleFastFormulaignorescommentsand

    carriesouttheinstructionsinthestatements.

    Wehavealread

    ylookedatfourtypesofstatement:

    Assignm

    entstatement

    Inputsstatement

    Returns

    tatement

    Ifstatem

    ent

    Therearetwoothertypesofstatementyoucanuse:

    Aliassta

    tement

    Defaultstatement

    Databaseitems

    arenamedbythesystemwhenitcreatesthem,and

    sometimesthesenamesaretoolongtoconvenientlyuseinafo

    rmula.

    Youcannotsho

    rtenthenameofadatabaseitem(oraglobalva

    lue)

    itself,butyouc

    ansetupanalternativeshorternametousewithinthe

    formula.Forexample:

  • 8/8/2019 ffug 2222

    23/54

    DefaultStatement

    OrderofStatemen

    ts

    110

    OracleFastFor

    mulaUsersGuide

    ALIAS

    as_

    overt

    ime_

    qua

    lify

    ing_

    le

    ngt

    h_

    of

    _serv

    ice

    AS

    ot_

    qls

    Intherestoftheformula,youcanusethealias(inthisexample,ot_qls)

    asifitweretheactualvariable.

    Attention:UsinganAliasism

    oreefficientthanassigningthe

    databaseitemtoalocalvariablewithashortname.

    UsetheDefaultstatementtosetadefau

    ltvalueforaninputvalueora

    databaseitem.Theformulausesthede

    faultvalueifthedatabaseitem

    isemptyornoinputvalueisprovidedwhenyouruntheformula.For

    example:

    DEFAULT

    FOR

    hour

    ly_

    rate

    IS

    3.00

    X

    =

    hours_

    wor

    ke

    d

    *

    hour

    ly_

    rate

    IF

    hour

    ly_

    rate

    WAS

    DEFAULTED

    THEN

    MESG

    =

    Warn

    ing:

    hour

    ly

    rate

    de

    fau

    lte

    d

    Thisexamplesetsadefaultof3.00forthedatabaseitemhourly_rate.If

    hourly_rateisempty(NULL)inthedatabase,theformulausesthe

    defaultvalueof3.00.Theformulauses

    theWASDEFAULTEDtestto

    detectwhenadefaultvalueisused,inwhichcaseitissuesawarning

    message. Attention:YoumustusetheD

    efaultstatementfordatabase

    itemsthatcanbeempty.TheD

    atabaseItemswindowincludes

    acheckboxlabelledDefaultRe

    quired.Thischeckboxis

    checkedfordatabaseitemsthatcanbeempty.TheDatabase

    ItemswindowappearswhenyouchoosetheShowItems

    buttonontheFormulaswindow.

    Statementsinyourformulamustappearinthefollowingorder:

    1)ALIASstatements(ifany)

    2)DEFAULTFORstatements(ifany)

    3)INPUTstatement(ifany)

    4)Otherstatements

    UsingtheFormu

    laWindow

    A21

    DatabaseItem

    s

    Description

    Databaseitem

    __START_DATE

    Thestartdateofele

    ment

    __END_DATE

    Theenddateofelem

    ent

    TableB18

    Inadditiontot

    hecommonlistabove,OracleHRMScreatesthe

    followingitem

    forelementsdefinedwithmultipleentriesallowed

    whoseinputvaluesarenumeric(thatis,hours,integer,money

    or

    number).

    Databaseitem

    Description

    __ENTRY_VALUE

    Thesummedelementv

    aluesfor

    themultipleentries

    TableB19

    TheunitsforENTRYVALUEaregenerated

    forbothrecurringandnonrecurringelementsandareuserdefinable.

    OracleHRMSmodifiesthedefinitiontexttoretrievetheentry

    valuein

    theunitofmea

    sureasspecifiedinthepay_input_values_f

    table.

  • 8/8/2019 ffug 2222

    24/54

    A20

    OracleFastFor

    mulaUser;sGuide

    Description

    Databaseitem

    _OUTPUT_CURRENCY_CODE

    Theelementsoutputcurrency

    code

    _PROCESSING_PRIORITY

    Theelementsprocessing

    priority

    _QUALIFYING_AGE

    Theelementsqualifyingage

    _QUALIFYING_UNITS_CODE

    Thequalifyinglengthof

    serviceunits(codevalues)

    _QUALIFYING_UNITS

    Thequalifyinglengthof

    serviceunits(fromlookup

    table)

    _REPORTING_NAME

    Theelementsreportingname

    _STANDARD_LINK

    Yes/noflag:yes=standard,

    no=discretionary

    _STANDARD_LINK_CODE

    Yes/noflag:yes=standard,

    no=discretionary

    __UNIT_OF_MEASURE

    Theelementsunitof

    measure(fromlookuptable)

    __UNIT_OF_MEASURE

    _CODE

    Theelementsunitof

    measure(codevalues)

    __DEFAULT

    Theelementsdefaultinput

    value

    __MIN

    Theelementsminimuminput

    value

    __MAX

    Theelementsmaximuminput

    value

    TableB17

    Inadditiontotheitemsabove,OracleH

    RMScreatesthefollowingfour

    itemsforelementsdefinedwithmultipleentriesnotallowed:

    Databaseitem

    Description

    __ENTRY_VALUE

    Theelementvalue

    __USER_ENTERED_CO

    DE

    Whetheravalueexistsatthe

    elemententrylevel(yes/no)

    TableB18

    111

    OracleFastFormula

    "

    Towriteoredi

    taformula:

    1.

    Setyoureffectivedatetothedatewhenyouwanttobegin

    using

    theformula.

    2.

    Towriteanewformula,entertheformulasnameandsele

    ctatype.

    Toeditanexistingformula,queryitsname.

    3.

    Choosethe

    EditbuttontoopenablankEditFormulawind

    ow

    whereyou

    canwriteanewformula,ormodifyanexisting

    one.

    4.

    Ifyouwanttoselectdatabaseitems,choosetheShowItem

    sbutton

    todisplaytheDatabaseItemswindowandrunaquery.C

    opyand

    pasteitemsfromthiswindowtotheEditFormulawindow

    .

    5.

    Whenyou

    finishwritingoreditingtheformula,choosetheVerify

    buttontocompileit.

  • 8/8/2019 ffug 2222

    25/54

  • 8/8/2019 ffug 2222

    26/54

    A18

    OracleFastFor

    mulaUser;sGuide

    SupervisorInfor

    mation

    Databaseitem

    Description

    SUP_CURRENT_EMP

    Whetherthesupervisorisa

    currentemployee(yes/no)

    SUP_DATE_FROM

    Thedatefromwhichthis

    supervisorinformationiseffective

    SUP_DATE_TO

    Thedatetowhichthissupervisor

    informationiseffective

    SUP_EMP_NUMBER

    Thesupervisorsemployee

    number

    SUP_GRADE

    Thesupervisorsgrade

    SUP_INT_ADDR_LINE

    Thesupervisorsinternaladdress

    SUP_JOB

    Thesupervisorsjob

    SUP_LOCATION

    Thesupervisorsworklocation

    SUP_MANAGER

    Whethertheassignmentisa

    managerialassignment(yes/no)

    SUP_ORG

    Thesupervisorsorganization

    SUP_PERSON_TYPE

    Thesupervisorspersontype

    SUP_POSITION

    Thesupervisorsposition

    SUP_WORK_PHONE

    Thesupervisorsworktelephone

    number

    TableB15

    DateInformation

    Databaseitem

    Description

    SESSION_DATE

    Theeffectivedatefrom

    FND_S

    ESSIONS

    SYSDATE

    Thesystemdate

    TableB16

    113

    OracleFastFormula

    "

    Todefineaglo

    balvalue:

    1.

    Setyoureffectivedatetothedatewhenyouwanttobegin

    using

    theglobalvalue.

    2.

    Enteranam

    e,datatype(number,text,ordate),andvalue.Youcan

    alsoentera

    description.

    DefiningFunctions

    ManyfunctionsaresuppliedwithOracleFastFormula.See:Fu

    nctions:

    page136.In

    addition,youcancreateotherfunctionsasyou

    require

    forusebyOrac

    leFastFormula.Doingthisinvolvestwosteps:

    creating

    anewPL/SQL

    function,thenregisteringitinthesystemusing

    the

    DefineFunctionwindow.

    Youneedtobe

    awareoftworestrictionswhencreatinguserd

    efined

    functions.Theseare:

    Thecurr

    entreleaseofOraclePayrollallowsyoutodefin

    e

    function

    swithINtypeparametersonly.Thismeanstha

    tauser

    definedfunctionmayonlyreturnonevalue.INOUTandOUT

    typepar

    ametersarenotsupported.

    Userdef

    inedfunctionsshouldnothaveanycommit,rollback,or

    savepoin

    tstatementsasthesecouldleadtodataintegrity

    problem

    swiththepayrollrun.Inaddition,theyshould

    notnot

    perform

    anydatamanipulationasFastFormulaisintendedasa

    readonlytool.

    RegisteringtheFunction

    Youregisteran

    ewfunctionbynaminganddefiningit,thencreating

    contextsandparametersforit.Contextsareenvironmentvalu

    esthat

    donotgetpass

    edtothefunction.

  • 8/8/2019 ffug 2222

    27/54

  • 8/8/2019 ffug 2222

    28/54

    A16

    OracleFastFor

    mulaUser;sGuide

    Description

    Databaseitem

    PER_TITLE

    Thepersonstitle

    PER_WORK_PHONE

    Thepersonsworktelephone

    number

    TableB13

    115

    OracleFastFormula

    4.

    ClosetheC

    ontextUsageswindowandchoosetheParameters

    button.

    5.

    InthePara

    meterswindow,selecttheparameters,oroperands,you

    requiretodefinethefunction.Typeandclassdisplay

    automatica

    lly.

    6.

    ChecktheOptionalcheckboxifyouwantthecorresponding

    parameter

    tobeoptional.

    7.

    ChecktheContinuingcheckboxifyouwantthefunctiontomake

    morethanonecalltotheparameter.

    Note:You

    cannotdefineaparameterascontinuingunless

    youalso

    makeitoptional.However,anoptionalparameterdoesnothaveto

    becontinuing.

    8.

    Saveyourentries.

  • 8/8/2019 ffug 2222

    29/54

  • 8/8/2019 ffug 2222

    30/54

    A14

    OracleFastFor

    mulaUser;sGuide

    HomeAddressDe

    tails(USonly)

    Databaseitem

    Description

    PER_ADR_US_COUNTY

    Thepersonscounty(USonly)

    PER_ADR_US_STATE

    Thepersonsstate(USonly)

    PER_ADR_US_STATE_CODE

    Thepersonsstatecode(USonly)

    TableB11

    HomeAddressDe

    tails(UKonly)

    Databaseitem

    Description

    PER_ADR_UK_COUNTY

    Thepersonshomecounty(UK

    only)

    TableB12

    117

    OracleFastFormula

    SeeAlso

    DefininganElement(HRUsers),OracleHumanResourcesUsersGuide

    DefininganElement(PayrollUsers),OraclePayrollUsersGuide

    AccessingInputValuesinPayrollF

    ormulas

    Inmanyformu

    lasforcalculatingpay,someoralloftheinform

    ation

    youneedcome

    sfromtheinputvaluesoftheelement.

    Asasimpleexample,supposeyoupaysomesalariedemploye

    esusing

    arecurringelementcalledSalary.TheSalaryelementhasaninput

    valuecalledan

    nual_salary.Youneedaformulathatdividesth

    einput

    valueintotwel

    veparts:

    INPUTS

    ARE

    annua

    l_

    sa

    lary

    Sa

    lary

    =a

    nnua

    l_

    sa

    lary

    /12

    RETURN

    Sal

    ary

    Attention:WhenyouuseanInputsstatement,youneedto

    makes

    urethatnoneoftheinputvaluescanhaveavalueof

    nullbe

    causethiscausestheformulatofail.Youcanavoidthis

    problembyusingtheDefaultstatement.

    UsinganInputsstatementisthemostefficientwaytoaccesstheinput

    valuesoftheelementwithwhichtheformulaisassociated.However,

    iftheformulau

    sestheinputvaluesofotherelements,itmustaccess

    thedatabaseitemsforthem.

    Forexample,if

    youwanttousetheinputvalueannual_salary

    inthe

    formulatocalc

    ulatetheelementBonus,youusethedatabaseitemas

    follows:

    IF

    Sa

    lary_

    annua

    l_

    sa

    lary

    >

    20000

    THEN

    Bonus

    =

    bo

    nus_

    rate

    *

    (sa

    les_

    ac

    hieve

    d

    sa

    les_

    thres

    hol

    d)

    Noticethatthe

    databaseitemnameisintwoparts:theinputvalue

    (annual_salary)nameprefixedbytheelementname(Salary).Thisis

    thenamingcon

    ventionforthedatabaseitemsofelementinputvalues.

    MultipleEntriesofElementInputValues

    Whenyoudefineanelement,youcanenablemultipleentriesofthe

    elementwithin

    apayrollperiod.

    Asasimpleexample,supposeyouusetheelementWagestop

    aysome

    weeklypaidemployees.TheWageselementhastheinputvalue

  • 8/8/2019 ffug 2222

    31/54

  • 8/8/2019 ffug 2222

    32/54

  • 8/8/2019 ffug 2222

    33/54

    DateLiterals

    SingleExpression

    s

    DatabaseItems

    120

    OracleFastFor

    mulaUsersGuide

    Inefficient:

    Sa

    lary

    =

    Sa

    lary_

    annua

    l_

    sa

    lary

    /

    12

    RETURN

    Sa

    lary

    Efficient:

    INPUTS

    ARE

    Annua

    l_

    sa

    lary

    Sa

    lary

    =

    Annua

    l_

    sa

    lary

    /

    12

    RETURN

    Sa

    lary

    UsetheTO_D

    ATEfunctiononlywhen

    theoperandisavariable.

    Inefficient:

    Start_

    date

    =

    TO_

    DATE

    (

    12JAN1

    992

    )

    Efficient:

    Start_

    date

    =

    12JAN1992

    (date

    )

    Useasingleexpressioninstraightforwardformulaswherethisdoes

    notleadtoconfusion.

    Inefficient:

    Temp

    =

    Sa

    lary

    /

    Annua

    liz

    ing_

    fact

    or

    Tax

    =

    Temp

    *

    3

    Efficient:

    Tax

    =

    (Sa

    lary

    /

    Annua

    liz

    ing_

    fact

    or

    )

    *

    3

    Donotrefertodatabaseitemsuntilyou

    needthem.Peoplesometimes

    listatthetopofaformulaallthedatabaseitemstheformulamight

    need,thinkingthishelpsOracleFastFormulaprocessmorequickly.

    However,thisinfactslowsprocessingbycausingunnecessary

    databasecalls.

    Inefficient:

    S

    =

    Sa

    lary

    A

    =

    Age

    IF

    S