22 Work with Conditional Reallocation Rules

This chapter contains these topics:

22.1 Working with Conditional Reallocation Rules

Navigation

From Contract Billing Processing (G52), enter 29

From Contract Billing System Setup (G5241), choose Table Information

From Table Information (G4843), choose Account Derivation Table (P48196)

Reallocation rules can be dependent on the results of a conditional test. When you specify a test for a conditional reallocation rule, the system must test each condition before it can execute each account derivation rule. This additional processing increases the time it takes for the system to create the resulting journal entries.

Each conditional test can include one or more types of tests the system must execute for the Condition Code before it applies the reallocation rule. To assign a condition code to a reallocation rule, you must determine the following:

  • Appropriate journal processing stage for the conditional reallocation

  • Base rule associated with the conditional reallocation rule

  • Object account range for the workfile transactions associated with the conditional reallocation rule

  • Resulting accounts for the conditional reallocation amount

  • Applicable amount basis and tax basis for the conditional reallocation rule

  • Condition code tests

Working with conditional reallocation rules consists of the following tasks:

  • Defining retrieval references

  • Setting up condition codes

See Also:

22.2 Defining Retrieval References

You use retrieval references to direct the system to the information stored in various files that you want to include in a conditional reallocation rule.

The information that is stored in system tables is directly related to data items. Each data item corresponds to a particular field in a table. To define retrieval references, you need to know the name and specifications of the data items for the information stored in system tables that you want to print on your invoices.

You can review a list of all the tables from which you can retrieve variable information for your invoices. You can access the File Field Description window to review a list of the names of the data items within a specific table.

When you define retrieval references, you must specify how you want the system to use each reference based on the following information:

  • Retrieval code

  • Parameters

22.2.1 Retrieval Codes

The retrieval code you specify for a retrieval reference determines the type of reference that you define. You must specify a retrieval code for each retrieval reference. Retrieval codes tell the system what kind of variable information you want the retrieval reference to retrieve and whether you want the system to display the information as is or to use it to perform a calculation. Retrieval codes can also direct the system to a table from which you can retrieve variable information that is related to a specific data item.

22.2.2 Parameters

You use parameters in combination with retrieval codes to further define a retrieval reference. For example, you might define parameters for a retrieval code to specify:

  • Names of data items within a specific table

  • Mathematical applications, such as add

  • The code for another retrieval reference

You can assign up to five parameters for a retrieval reference. The number of parameters you are required to specify for a retrieval reference depends on the retrieval code for the reference.

Each retrieval code has different parameter requirements. To determine whether a specific retrieval code requires parameters, choose Field Sensitive Help (F1) for the first parameter. After you define the first parameter, continue choosing Field Sensitive Help for the subsequent parameters. When you choose Field Sensitive Help for the first parameter that is not required for the retrieval code, the system displays the following message:

A generalized 10 character parameter value passed to a called program.

To define retrieval references

On Account Derivation Table

  1. Choose Condition Code Definition (F13).

  2. On Condition Code Revisions (P4871), choose Retrieval Reference Definition (F13).

    Figure 22-1 Retrieval Reference Definition screen

    Description of Figure 22-1 follows
    Description of "Figure 22-1 Retrieval Reference Definition screen"

  3. On Retrieval Reference, choose Field Sensitive Help (F1) for the following field to see a list of the predefined retrieval codes:

    • Retrieval Code

    Figure 22-2 Retrieval Code Selection screen

    Description of Figure 22-2 follows
    Description of "Figure 22-2 Retrieval Code Selection screen"

  4. On Retrieval Code Selection, choose the code you want to use to define the retrieval reference.

  5. On Retrieval Reference, complete the following fields to specify an y of the parameters required for the retrieval code:

    • Parameter 1 - 5

  6. Use the Add action.

  7. Choose Exit Program (F3).

    The system closed the Retrieval Reference window.

  8. To use the new retrieval reference in a condition, on Condition Code Revisions, enter an ampersand (&) and the number of the retrieval reference (without leading zeros) in one of the following fields:

    • · Value One

    • · Comparison Value Two

Field Explanation
Value One (CMV1) The information entered in this field will determine the first value in a comparison of two values. This field must contain a Retrieval Reference Number, preceded by an ampersand (&). The retrieved value will then be compared to the value specified in Comparison Value 2 to determine if the relationship entered in the Relationship field is satisfied.
Comparison Value Two (CMV2) This field represents the second of two values that will be compared. You can enter a specific value to be used in the comparison, or you can enter a Retrieval Reference Number, preceded by an ampersand (&). This value will be compared to the value referenced in the Value One field to determine if the relationship specified in the Relationship field is satisfied.
Retrieval Number (RTVN) Retrieval Codes are automatically numbered consecutively. After you have defined a Retrieval Code, the Retrieval Number, preceded by an ampersand (&), is used to reference the retrieval number on other forms.
Retrieval Code (RTVC) You can use Retrieval Codes to extract information from the database. The code tells the system what kind of data to extract, where the data is stored, and whether to display it as is or to calculate it. Many retrieval codes require additional parameters to more specifically define the desired information.
Parameters (PRM1 - PRM5) Depending on the retrieval code, this value may be a field within a file or a value to be included in a calculation.
Data Item to Retrieve Each piece of information within a file is associated with a unique "field name." The field name consists of a two-character file prefix and a four character Data Item. Enter the Data Item which is associated with the information you want to retrieve from the file. You can use cursor-sensitive help or the appropriate function key (F8 on most systems) to review a list of possible values.

22.2.3 What You Should Know About

Topic Description
Numbering retrieval references The system automatically numbers the retrieval references you define. These sequential reference numbers are unique to each Condition Code.

If you have not defined retrieval references for a particular Condition Code, the system numbers the first retrieval reference you define as 1. If you had already defined 6 retrieval references for the Condition Code, the system automatically uses 7 for the Retrieval Number.

NOTE: The Condition Code Revisions form might not display all previously defined retrieval references.

Comparison values To delete retrieval references, follow the steps to locate a retrieval reference. On Retrieval Reference, use the Delete action to remove the information that defines the reference. When you return to the Condition Code Revisions form, clear the code for the retrieval reference.

NOTE: After you delete a retrieval reference and its code from the Format Definition form, the system does not reassign that number. You can then manually assign the number to a new retrieval reference.