0% found this document useful (0 votes)
40 views21 pages

Les06 - Performance and Troubleshooting Tips

The document discusses the use of LATEST_BALANCES in Oracle HCM Cloud payroll runs, highlighting performance issues related to database access in formulas. It outlines common syntax and execution errors that can occur in fast formulas, including uninitialized variables and incorrect data types. Additionally, it provides recommendations for logging and performance optimization in payroll formulas.

Uploaded by

Miguel Torres
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views21 pages

Les06 - Performance and Troubleshooting Tips

The document discusses the use of LATEST_BALANCES in Oracle HCM Cloud payroll runs, highlighting performance issues related to database access in formulas. It outlines common syntax and execution errors that can occur in fast formulas, including uninitialized variables and incorrect data types. Additionally, it provides recommendations for logging and performance optimization in payroll formulas.

Uploaded by

Miguel Torres
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Oracle HCM Cloud: Fast Formula 6 - 2

Oracle HCM Cloud: Fast Formula 6 - 3


Oracle HCM Cloud: Fast Formula 6 - 4
The LATEST_BALANCES are values generated in the payroll run to hold the current value of
a balance. For example, it stores year-to-date gross earnings for an employee. The system is
also able to derive the value by summing up the results of the payroll run, but the latest
balance is stored for performance reasons.

Oracle HCM Cloud: Fast Formula 6 - 5


The main performance issue for formulas is database access when using database items.
Database items have uses outside of a formula. There are some database items designed for
use in extracts that are unsuitable for use in a formula because they return a lot of data. They
can be used in extracts because extracts have mechanisms for reducing the data returned by
these database items. Formulas do not have these methods so the result is:
• Poor performance because a huge amount of data is returned
• Complex formula code because often the data returned has no context, requiring
complex logic to get the correct data

Oracle HCM Cloud: Fast Formula 6 - 6


Oracle HCM Cloud: Fast Formula 6 - 7
Oracle HCM Cloud: Fast Formula 6 - 8
Note
• Use PAY_INTERNAL_LOG_WRITE to log messages for payroll formulas. This is
discussed in a later lesson.
• Remove logging statements when they are no longer needed because they affect
performance.
• For more information about tracing and logging, see the following related document:
- How to Trace and Log Fast Formulas in Fusion Payroll (Doc ID:1559909.1)

Oracle HCM Cloud: Fast Formula 6 - 9


Oracle HCM Cloud: Fast Formula 6 - 10
Oracle HCM Cloud: Fast Formula 6 - 11
• Syntax Error: The formula text violates the grammatical rules for the formula language.
An example is using IF1 instead of IF for an IF statement.
• Incorrect Statement Order: ALIAS, DEFAULT, or INPUT statements come after other
statements.
• Misuse of ASSIGNMENT Statement: Occurs when any of these conditions occurs:
- An ASSIGNMENT assigns a value to a database item
- A context is assigned a value externally to a CHANGE-CONTEXTS statement
- A non-context variable is assigned a value within a CHANGE-CONTEXTS
statement
• Misuse of ALIAS Statement: An ALIAS statement may only be used for a database
item.
• Missing DEFAULT Statement: A database item with defaulting specified must have a
DEFAULT statement.
• Misuse of DEFAULT Statement: A DEFAULT statement is specified for a variable
other than an input or database item.

Oracle HCM Cloud: Fast Formula 6 - 12


• Uninitialized Variable: The compiler detects that a variable is uninitialized when used.
This error often occurs when you want to use a database item, but a database item is
not available in the formula.
• Missing Function Call: A function call is not recognized. The combination of return
type, function name, and parameter types does not match any available function.
• Incorrect Operator Usage: An instance of a formula operator use does not match the
permitted uses of that operator. For example, the + operator has two permitted uses with
operands that are both of data type NUMBER or TEXT.
• Inconsistent Data Type Usage: A formula variable is being used as if it is of more than
one data type, or a database item or context is being used with the wrong data type. For
example, Variable A is initially assigned a NUMBER value, but a TEXT value later in the
formula.
• EXIT Statement Not Within WHILE Loop: A condition that eventually becomes false,
or an EXIT call for exiting the loop does not exist.
• Misuse of Context: A variable is used as a context, or a context is used as a variable.
For example, AREA1 is assigned a value as an ordinary variable, but later in the formula
AREA1 is used as a context in a GET_CONTEXT call.

Oracle HCM Cloud: Fast Formula 6 - 13


Oracle HCM Cloud: Fast Formula 6 - 14
• Uninitialized Variable: Where the formula compiler cannot fully determine if a variable
or context is initialized when it is used, it generates code to test if the variable is
initialized. When the formula executes and the variable or context is not initialized an
error is raised.
• Divide by Zero: Raised when a numeric value is divided by zero.
• No Data Found: Raised when a non-array type database item unexpectedly fails to
return any data. If the database item can return no data then it should allow defaulting.
This error is also raised from within a formula function. The cause is an error in the
formula function code.
• Too Many Rows: Raised when a non-array type database item unexpectedly returns
more than a single row of data. The cause is an incorrect assumption made about the
data being accessed. This error can also be raised from within a formula function. The
cause is an error in the formula function code.
• NULL Data Found: Raised when a database item unexpectedly returns a NULL data
value. If the database item can return a NULL value, then defaulting is allowed.
• Value Exceeded Allowable Range: Raised for a variety of reasons, such as exceeding
the maximum allowable length of a string.

Oracle HCM Cloud: Fast Formula 6 - 15


• Invalid Number: Raised when an attempt is made to convert a non-numeric string to a
number.
• User Defined Function Error: Raised from within a formula function. The error
message text is output as part of the formula error message.
• External Function Call Error: A formula function returned an error, but did not provide
any additional information to the formula code. The function might have output error
information to the logging destination for the executing code.
• Function Returned NULL Value: A formula function returned a NULL value.
• Too Many Iterations: A single WHILE loop, or a combination of WHILE loops, has
exceeded the maximum number of permitted iterations. The error is raised to terminate
loops that could never end. This indicates a programming error within the formula.
• Array Data Value Not Set: The formula attempted to access an array index that has no
data value. This is an error in the formula code.
• Invalid Type Parameter for WSA_EXISTS: An invalid data type was specified in the
WSA_EXISTS call.

Oracle HCM Cloud: Fast Formula 6 - 16


• Incorrect Data Type For Stored Item: When retrieving an item using WSA_GET, the
items actual data type does not match that of the stored item. This is an error within the
calling formula.
• Called Formula Not Found: The called formula could not be resolved when attempting
to call a formula from a formula. This could be due to an error in the calling formula, or
because of installation issues.
• Recursive Formula Call: An attempt was made to call a formula from itself. The call
could be directly or indirectly via another called formula. Recursive formula calling is not
permitted.
• Input Has Different Types In Called and Calling Formulas: When calling a formula
from a formula, the actual formula input data type within the called formula does not
match the data type specified from the calling formula.
• Output Has Different Types In Called and Calling Formulas: When calling a formula
from a formula, the actual formula output data type within the called formula does not
match the data type specified from the calling formula.
• Too Many Formula Calls: There are too many formula from formula calls. This is due
to a problem with the formulas.

Oracle HCM Cloud: Fast Formula 6 - 17


Answer: a

Oracle HCM Cloud: Fast Formula 6 - 18


Answer: b
Syntax errors are generated when the formula is compiled. They are a type of compilation
error.

Oracle HCM Cloud: Fast Formula 6 - 19


Answer: a
If the input data types do not match in the called and calling formulas an execution error will
generate when the process using the formula is run.

Oracle HCM Cloud: Fast Formula 6 - 20


Oracle HCM Cloud: Fast Formula 6 - 21

You might also like