Troubleshooting Tips

Use the general best practices recommended to compose and troubleshoot fast formulas. You can also use the following three specific approaches to troubleshoot Absence Management fast formulas:

ESS Logs – Calculate Accruals and Balances

Accrual fast formulas are primarily called when the Calculate Accruals and Balances job is submitted. Since this is an ESS job, it generates a log and output file, which can be leveraged to capture sequence points or variable values in fast formulas.

In order to print any custom messages or values of variables into the log, the following formula function can be invoked - ESS_LOG_WRITE(). The format for using the particular formula function is:

lc_variable_to_be_logged = ‘The assignment number is : ’||HR_ASSIGNMENT_NUMBER
lc_dummy_variable = ESS_LOG_WRITE(lc_variable_to_be_logged)

Assuming the value of HR_ASSIGNMENT_NUMBER in the formula is ‘123456’, the output of the above statements in the log would be:

The assignment number is : 123456

When submitting the Calculate Accruals and Balances job, be sure to enable the Include trace statements in audit log option.

ESS Logs – Evaluate Absences

Every time you enter an absence, you initiate the Global Absence Type Duration formula. Submission of the Evaluate Absences job for an existing absence entry re-processes the absence entry (including making calls to the absence duration calculation formula). Since this is an ESS job, it generates a log and output file, which can be leveraged to capture sequence points or variable values in fast formulas.

In order to print any custom messages or values of variables into the log, the following formula function can be called - ESS_LOG_WRITE(). The format for using the particular formula function is:

lc_variable_to_be_logged = ‘The assignment number is : ’||HR_ASSIGNMENT_NUMBER
lc_dummy_variable = ESS_LOG_WRITE(lc_variable_to_be_logged)

Assuming the value of HR_ASSIGNMENT_NUMBER in the formula is ‘123456’, the output of the above statements in the log would be:

The assignment number is : 123456

When submitting the Evaluate Absences job, be sure to enable the Include trace statements in audit log option.

UI Error Messages – Global Absence Validation Formula

The Global Absence Entry Validation formula has two return types – VALID and ERROR_MESSAGE. When submitting the absence entry, if the value in the return type VALID is ‘N’, then the text displayed in the return type is ‘ERROR_MESSAGE’.

You can add the following statement to the required entry validation formula attached to the absence type:

VALID = ‘N’
ERROR_MESSAGE = ‘The assignment number is : ’||HR_ASSIGNMENT_NUMBER
RETURN VALID, ERROR_MESSAGE

Assuming the value of HR_ASSIGNMENT_NUMBER in the formula is ‘123456’, the system would try to search in FND_MESSAGES (accessed via task Manage Messages), for the message ‘The assignment number is: 123456’. When the formula does not find a message defined as such, it would print the following error message.

Cause: The message The assignment number is : 123456, cannot be accessed.