Appendix: Using Error Processing

This chapter discusses how to:

Click to jump to parent topicCreating Error Messages

This section provides an overview of error messages and discusses how to use error handling messages in array processing.

Click to jump to top of pageClick to jump to parent topicUnderstanding Error Messages

 

For successful payroll calculation, the system must detect error conditions and notify you of unsuccessful data processing. Error messages can alert you of common error conditions that need correcting without interrupting the calculation process. Global Payroll for Germany includes a methodology that enables you to easily create your own error processing messages while delivering a set of predefined error messages for common error conditions.

You can create error messages that identify error conditions that are specific to your needs. Error messages can include instructions to online users about how to correct payroll data to enable processing to continue.

The error message feature has two facets:

With encapsulated error handling messages, the formulas require minimum maintenance overhead. Ease of use also encourages you to use the error message feature more often, ensuring greater accuracy in payroll processing.

Example

Assume a functional processing error when the variable DE_TX_CLASS is greater than 6. Further, assume that a message (17125,1218) displays "Employee Tax Class is greater than 6 (invalid)!"

The error checking formula might look like this:

FM.DE_EM_CHECK_1218: IF VR.DE_TX_CLASS > 6 THEN 1218 >> VR.DE_EM_NUMBER FM.DE_EM_ERROR >> VR.DE_EM_DUMMY ENDIF 0 >> FM.DE_EM_CHECK_1218

In the functional formula that handles the tax calculation, you would have to add only a single line to call the dedicated error checking formula:

FM.DE_EM_CHECK_1218 >> VR.DE_EM_DUMMY

The advantages to this approach to error processing messages are:

See Also

Defining Formula Elements

Defining Message Elements

Click to jump to top of pageClick to jump to parent topicUsing Error-Handling Messages in Array Processing

When an array is processed and no rows are retrieved, an error handling formula is executed directly by the array module. If the return of no rows is considered an error, then a special error checking formula is not required because the error was already detected. In such a case, you can use a more generic approach that uses one formula to print the error message (such as DE_EM_ERROR, which is explained later in this chapter) and set the message number immediately before calling the array.

For consistency you should use the dedicated formula approach with arrays. If an array is used repeatedly and the messages should differ each time, then use the alternative method defined elsewhere in this chapter.

Click to jump to parent topicUsing Message Formula Source Code

Message formulas delivered with Global Payroll for Germany use a cascading style for encapsulation. The following code illustrates the processing levels for an error message:

/* user assigns error number */ 1234 >> VR.DE_EM_NUMBER /* calls error procedures */ FM.DE_EM_ERROR /* error procedures sets payment in error flag */ 1 >> VR.DE_EM_SEVERITY /* calls general message procedure */ FM.DE_EM_MESSAGE /* general message procedures assigns message set */ 17125 >> SY.MSG_SET_NBR /* calls output routine */ FM.DE_EM_MSG_OUTPUT /* output sets error number */ VR.DE_EM_NUMBER >> SY.MSG_NBR /* sets severity */ VR.DE_EM_SEVERITY >> SY.MSG_PAYMENT_ERR /* calls core error messages */ EM.MSG_PIN

The message base formula DE_EM_MSG_OUTPUT performs the call to the Global Payroll message feature and is generally not used directly. Instead, it's the common interface for the other message formulas.

DE_EM_NUMBER and DE_EM_SEVERITY expect a variable set.

MSG_SET_NBR expects a system elements set.

MSG_BINDx_PTR and MSG_BINDx_NM_IND expect a system elements set (if applicable).

Click to jump to parent topicUsing Delivered Error Message Elements

Because the goal of the error processing formulas is to simplify the creation of error messages, and to optionally set the payment in error, PeopleSoft delivers a set of predefined elements for your use.

This section lists:

Click to jump to top of pageClick to jump to parent topicError Message Formulas

The message set number is specified in some of the formulas, so you need to use the following formulas as a template for your own error formulas with your own message set number. The formula DE_EM_MSG_OUTPUT can be used to ultimately issue the message.

Message Formula

Description

FM.DE_EM_NO_MESSAGE

Creates no message. Use this formula as an error formula in arrays where the array doesn't have to return any rows. The formula itself does nothing, but its presence confirms that it's acceptable for nothing to happen.

FM.DE_EM_WARNING

Prints a warning and information. Standard formula for printing a message without additional parameters. The payment isn't set in error, which means that the calculation continues.

FM.DE_EM_ERROR

Prints an error message. Standard error formula for printing a message without additional parameters and to set the payment in error.

FM.DE_EM_MSG_OUTPUT

Prints a message. This formula provides the interface between the error handling of Global Payroll for Germany and the Global Payroll core message facility. It sets the flag DE_EM_ERROR_STATUS for upcoming process items so that certain formulas or sections will be avoided if an error already occurred. All message formulas for Global Payroll for Germany use this formula to output their messages.

FM.DE_EM_MESSAGE_NV

Prints a message with PIN and value. Standard formula for printing a message with additional parameters of PIN number as %1 of the message text (DE_EM_NAME_PTR) and PIN value as %2 of the message text (DE_EM_VALUE). The variable DE_EM_SEVERITY decides whether the payment is set in error (1) or not (0).

FM.DE_EM_MESSAGE_N

Prints a message with PIN number. Standard formula for printing a message with the additional parameter PIN number as %1 of the message text (DE_EM_NAME_PTR). The variable DE_EM_SEVERITY decides whether the payment is set in error (1) or not (0).

FM.DE_EM_MESSAGE_V

Prints a message with PIN value. Standard formula for printing a message with the additional parameter PIN value as %1 of the message text (DE_EM_VALUE). The variable DE_EM_SEVERITY decides whether the payment is set in error (1) or not (0).

Basic Message Formulas

Most errors can be explained to the user with a message, and they do not require the output of PIN numbers or values. Therefore, in most cases, identifying the message number and indicating whether they should set the payment in error or continue is sufficient.

To accomplish this, use the basic message formulas DE_EM_WARNING or DE_EM_ERROR. These formulas use the message number DE_EM_NUMBER as the only parameter. Even the MESSAGE_SET_NBR is fixed and need not be specified.

You can use this type of message, for example, "Employee has no social insurance data in GPDE_SE_EE" when there is no need to print the name or the value of the element that causes the error.

Error Situations and Message Numbers

Message catalog entries for Global Payroll for Germany are assigned to the message set number 17125 and start with the number 1000.

Note. Message numbers below 1000 are reserved and do not appear in the message log.

Not all the message formulas that are delivered with Global Payroll for Germany are listed here, but you can see their design by using the Global Payroll core formula pages. You can easily identify these messages because their formula elements are named by use of the naming convention DE_EM_CHECK_<number>, where <number> is the message number.

Note. Make sure you understand how to use formulas to create messages by referring to the PeopleSoft Enterprise Global Payroll 9.1 PeopleBook.

Click to jump to top of pageClick to jump to parent topicError Message Variables

This table lists the variables that are reserved for passing parameters to message routines:

Variable

Description

DE_EM_NUMBER

Message number reference in the message catalog.

DE_EM_NAME_PTR

Pointer variable for assigning the element name (always use element number).

DE_EM_VALUE

Decimal variable for assigning the element value.

DE_EM_SEVERITY

1 for error, 0 for warning.

DE_EM_DUMMY

Dummy variable used for error handling.

DE_EM_ERROR_STATUS

Flag that indicates whether an error occurred.

Note. Not all variables are evaluated by all routines.

Click to jump to parent topicExamples of Error Messages

To clarify how error message are created in Global Payroll for Germany, here are some examples:

Example DE_EM_NUMBER Formula

(filler)

IF SOMEERROR = TRUE THEN 123 >> DE_EM_NUMBER FM.DE_EM_WARNING >> VR.DE_EM_DUMMY ENDIF

This formula might print a message similar to "Employee part-time percentage for old age part-time is below limit, please check."

Example DE_EM_MESSAGE_NV Formula

(filler)

IF SOMEERROR = TRUE THEN /* set message number for the right text */ 1234 >> VR.DE_EM_NUMBER /* pass the element in a pointer so its name will be printed */ VR.DE_SI_SOME_VAR (use element number) >> VR.DE_EM_NAME_PTR (use element number) /* pass the element value so the value will be printed */ VR.DE_SI_SOME_VAR (use element value) >> VR.DE_EM_VALUE /* in this example we set the payment in error */ 1 >> VR.DE_EM_SEVERITY /* print message */ FM.DE_EM_MESSAGE_NV >> VR.DE_EM_DUMMY ENDIF

This formula might print a message similar to "Employee part-time percentage DE_SE_SOME_VAR is 12.44 (below limit)." The italicized text comes from the variable references to DE_SI_SOME_VAR, which are replaced by the element name and value.

Example DE_EM_CHECK_1008 Formula (check - provides not found)

(filler)

1008 >> VR.DE_EM_NUMBER FM.DE_EM_ERROR >> FM.DE_EM_CHECK_1008

This is the simplest case in which a message should be triggered by an array error formula. No need further condition checking is needed because the array already detected that it could not retrieve a row.

Note. In some arrays, the absence of a row may not be an error. In such cases, we recommend that you use DE_EM_NO_ERROR as the error formula to explicitly show this.

Example DE_EM_CHECK_1023 Formula (check - rate ID for provider)

(filler)

0 >> FM.DE_EM_CHECK_1023 IF VR.DE_SI_H_RATE_EE = ' ' THEN 1023 >> VR.DE_EM_NUMBER FM.DE_EM_ERROR >> VR.DE_EM_DUMMY ENDIF

This normal error check is used in a functional formula. It checks for a certain functional condition and prints an error message only if required. If all checks are programmed like this, you can easily find the location of the formula usage through the message number.