5 Define Formats

This chapter contains these topics:

5.1 Defining Formats

You use invariable information and retrieval references to define the formats that make up a layout. Invariable information is the static information that prints on an invoice regardless of the customer or billing details, such as currency symbols or remit-to information. Retrieval references direct the system to the variable information you want to include on the invoice, such as totals, a supplier's name, or dates.

Defining formats consists of the following tasks:

  • Adding static information to a format

  • Defining retrieval references for a format

5.1.1 Lines, Positions, and Rulers

A format definition represents only one section of a layout. A Format Definition form consists of an unlimited number of lines. If you exceed the page length for one format definition, that definition will impact all the definitions for subsequent formats and the entire invoice design.

You enter static information and retrieval references directly onto a line of the Format Definition form. The static information or retrieval reference should begin in the position on the Format Definition form that correlates to the actual location where you want the information to print on your invoice.

Lines

When you first access the Format Definition form, the cursor is located in the first position on the first line of the form. The Line field on the upper-right portion of the form indicates that the location of the cursor is line 001. If your cursor is located within the first 15 lines of the form, the Line field still displays 001 as the line number.

You can page down to view the next 14 available lines. When you do, the Line field displays 15. The first line on the second page is 15, and the last line is 29. The Line field displays the number for the first line within the group of lines currently displayed on the form. You can use the line number to determine approximately how many lines you have defined for a specific format.

Positions

The Format Definition form displays 70 positions horizontally. You can place the cursor anywhere in the existing form display. If you need to place your cursor outside the form display, you must enter a number in the Window Increment field and choose the Window Right function (F20).

If you choose Window Right without entering a value in the Window Increment field, the system automatically enters 70 in the Window Increment field, and the cursor moves to the 70th position on the form display. To return, choose the Window Left function (F19).

Rulers

The Format Definitions form includes a ruler that you can use to reference the position of the cursor within a line. The ruler consists of dots, asterisks, and numbers. Each symbol represents the following space increment:

Symbol Spaces
Dot 1 space
Asterisk 5 spaces
Number 10 spaces

Use the ruler to find an exact position on the Format Definition form. For example, to place your cursor in the 37th position on a line, you use the ruler to move the cursor to the number 3 position, plus the following asterisk, plus two dots.

In the following graphic, the retrieval reference (&1) is at position 20 and the cursor is at position 37:

Figure 5-1 Layout Definition Ruler Detail

Description of Figure 5-1 follows
Description of "Figure 5-1 Layout Definition Ruler Detail"

5.2 Adding Invariable Information to a Format

Contract Billing

Navigation

From Contract Billing Processing (G52), choose 29

From Contract Billing System Setup (G5241), choose Invoice Layout Revisions (P4850)

Service Billing

Navigation

From Word Order/Service Billing Processing (G48), choose 29

From Word Order/Service Billing Setup (G4841), choose Invoice Layout Revisions (P4850)

The invariable information you include on a layout can consist of symbols or text. Invariable (static) information usually does not change from invoice to invoice. For example, you might include text, such as Please Remit To: or a symbol, such as a currency sign, on all your printed invoices, regardless of the variable information that appears on the invoice.

You enter invariable information directly onto a line of the Format Definition form. The invariable information should begin in the position on the Format Definition form that correlates to the actual location where you want the information to print on your invoice. You can enter a invariable information on any line of any format definition that makes up your layout.

5.2.1 Special Format Considerations

You can design invoices so that the formats you define for a layout print across the page rather than down the page. This is especially helpful if you want to print invoices using a multi-columnar format to print continuous lines of billing information.

To print the information from more than one format in columns across the page, you use the special invariable information text &ZICR. You can enter &ZICR anywhere within a format in the same way that you would enter any other message. When the system finishes printing the information from one format that includes the &ZICR invariable information, it searches for and prints the next format definition that includes the &ZICR message on the same line of the invoice.

To add invariable information to a format

On Invoice Layout Revisions

  1. Complete the steps for reviewing a Format Definition form.

    See Section 4.2, "Reviewing Format Definition Forms"

  2. On Format Definition, position the cursor on the line where you want the message to begin.

  3. Enter the invariable information.

  4. To return to Invoice Layout Revisions, choose Exit Program.

    The system displays a message prompting you to save any changes you made to the Format Definition form.

  5. Complete the following field:

    • Save Changes (Y/N)

5.2.2 What You Should Know About

Topic Description
Changing and removing invariable information You can change invariable information at any time by entering the new information over the existing information. To enter additional information, use the Insert key. To remove a portion of invariable information, enter spaces over the existing information or use the Delete key. To remove a line, choose the Delete A Line function (F18). After you delete a line, the cursor is repositioned at the top of the window.
Adding blank lines Position the cursor and choose the Insert A Line function (F17). The system inserts a blank line below the cursor.
Printing boldfaced text Some printers can create boldfaced text by printing the same information twice on the same line. Enter &ZICR at the end of the line you want to boldface. On the line directly beneath the &ZICR, type &ZICR and repeat the information exactly as it appears on the preceding line.

Some printers are so precise that overprinting does not create boldfaced text.


See Also:

5.3 Defining Retrieval References for a Format

Contract Billing

Navigation

From Contract Billing Processing (G52), choose 29

From Contract Billing System Setup (G5241), choose Invoice Layout Revisions (P4850)

Service Billing

Navigation

From Word Order/Service Billing Processing (G48), choose 29

From Word Order/Service Billing Setup (G4841), choose Invoice Layout Revisions (P4850)

Invoices typically include information that varies by invoice and customer, depending on the billing transactions. When you design invoices with Invoice Formatting, you use retrieval references to define the variable information that you want to print on invoices. For example, you can use retrieval references to:

  • Direct the system to the information stored in various files that you want to include on an invoice

  • Perform calculations, such as add, subtract, multiply, and divide

  • Store and recall the results of a previous calculation

  • Add special information on an invoice that is not contained in a table, such as the page numbers

Note:

Not all of the information defined in retrieval references must print on the customer's invoice. You can specify a register to store the information in memory. Later, you can recall the information for use in another format within the layout structure.

5.3.1 Types of Variable Information

You can use retrieval references to direct the system to the following types of variable information:

  • Information related to data items

  • Calculations

  • Totals

Information Related to Data Items

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 retrieve variable information for your invoices from the following tables:

  • Account Master (F0901)

  • Address by Date (F0116)

  • Address Book Master (F0101)

  • Business Unit Master (F0006)

  • Business Unit Supplemental Data (F00692)

  • Owner Pay Item Text (F52024)

  • Contract Master (F5201)

  • Invoice Summary Access (F48520)

  • Customer Master (F0301)

  • Asset/Equipment Master (F1201)

  • Invoice Text (F4813)

  • Milestone/Progress Billing Information (F5216/F52161)

  • Address Book Generic Text (F0016)

  • Owner Pay Item Detail (F5202)

  • Transaction Parameters (F069116)

  • Address Book Phone Numbers (F0115)

  • Invoice Summary (F4822)

  • Supplier Master (F0401)

  • Payment Terms (F0014)

  • Who's Who (F0111)

  • Work Order Master (F4801)

  • Work Order Text (F4802)

  • Billing Workfile (F4812)

You can access the File Field Description window to review a list of the names of the data items within a specific table. The File Field Description window also lists the specifications of each data item, such as its size and type.

The size of a data item represents the maximum number of positions you will need to reserve in the line on the Format Definition form to accommodate the variable information. If you know the data item size, you can prevent truncating or overprinting information on an invoice.

The type of a data item refers to whether the information related to the data item is alpha, numeric, or alphanumeric. If you know the data item type, you can determine the exact format specifications for the information stored in the data item. For example, you might want to specify the number of decimal positions and whether commas display for the information that is related to a numeric data item.

Calculations

You can define retrieval references for the mathematical calculations of add, subtract, multiply, and divide. Retrieval references for calculations can include:

  • Specific values

  • Variable information, based on another retrieval reference

  • Combinations of specific values and retrieval references

For example, if payroll details are part of a customer's billing transaction detail, you might define a retrieval reference that performs a calculation such as:

Number of Hours Worked x Hourly Rate

In this example, the number of hours worked might be variable information and the hourly rate might be a specific value, such as 50. In this case, you define a retrieval reference to retrieve the number of hours worked for which you want to bill. The retrieval reference that you define for the calculation specifies to the system to multiply the value retrieved by the retrieval reference for the number of hours worked multiplied by 50.

5.3.2 Totals

You can define a retrieval reference for totals. You can incorporate totals in an invoice as individual subtotals or as totals that are added to make up another total. To add individual totals to create a subtotal on an invoice, you need to use a register.

Registers are storage locations that can be used to:

  • Print an amount on an invoice

  • Perform calculations

  • Accumulate, but not necessarily print, calculated amounts for future calculations

You can define up to 99 unique register locations within a layout structure. You use a retrieval reference to specify whether a register is used to accumulate, store, or recall totals.

The number of times you can add previously calculated totals into a new total depends on your placement of registers within a retrieval reference within the formats you define for the layout.

To print multiple subtotals within a layout structure, you must:

  • Determine the correct order of the formats on which you want to recall the totals

  • Define a retrieval reference for the format

  • Know the number of the appropriate register locations to recall within the retrieval reference

The order of the format definitions containing the appropriate register locations are determined based on the most specific total for group of billing transactions to the overall total for the invoice. You use the following hierarchy to determine the correct format on which to define retrieval references containing the appropriate register locations:

  • Individual billing transactions are accumulated in a register to equal a detail sequence data item total.

  • Detail sequence data item subtotals are accumulated in a register to equal a grouping key total.

  • Grouping key subtotals are accumulated in a register to equal a major sequence data item total.

  • Major sequence data item subtotals are accumulated in a register to equal the overall invoice total, or grand total.

You do not have to define all four subtotals. For example, if you do not define a major sequence data item total, you can accumulate grouping key totals in a register to equal the overall invoice (grand) total.

5.3.3 Retrieval Reference Definitions

When you access a Format Definition form for the first time, the format display is blank. You must define retrieval references for the format to direct the system to the variable information you want to print for that particular section of the invoice.

You define retrieval references directly on a line of the Format Definition form. The retrieval reference should begin in the position on the form that correlates to the actual location where you want the variable information to print on your invoice. You can enter a retrieval reference on any line of any format definition that makes up your layout.

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

  • Format specifications

Figure 5-2 Retrieval Reference screen

Description of Figure 5-2 follows
Description of "Figure 5-2 Retrieval Reference screen"

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.

Invoice Formatting includes predefined retrieval codes, such as Add for calculations, Account to specify a table, and Page to specify page numbers. If you need a retrieval code that is not already included in the system, you can define custom retrieval codes.

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.

Format Specifications

After you have determined the retrieval code and parameters for a retrieval reference, you can define further specifications to control exactly how the system prints the retrieved information on the invoice. For example, if you define a retrieval reference for a billing amount, you could define format specifications so that the amount prints right justified with decimals.

Note:

You must always specify a size for the retrieval reference, regardless of whether you print the retrieved information.

See Also:

To define retrieval references for a format

On Invoice Layout Revisions

  1. Complete the steps to locate the format definition for a layout structure or data item.

    See Section 4.2, "Reviewing Format Definition Forms"

  2. On Format Definition, position your cursor where you want the retrieved information to print.

  3. Choose Retrieval Reference (F13).

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

    • Retrieval Code

    Figure 5-3 Retrieval Code Selection screen

    Description of Figure 5-3 follows
    Description of "Figure 5-3 Retrieval Code Selection screen"

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

    Figure 5-4 Retrieval Reference screen

    Description of Figure 5-4 follows
    Description of "Figure 5-4 Retrieval Reference screen"

  6. On Retrieval Reference, complete the following fields to specify any of the parameters required for the retrieval code:

    • Parameter 1-5

    If the retrieval code specifies a table, position your cursor in Parameter 1 and choose File Field Description (F8) to determine the correct data item.

    Figure 5-5 File Field Description screen

    Description of Figure 5-5 follows
    Description of "Figure 5-5 File Field Description screen"

  7. Complete the following field:

    • Display Size

    You must complete the Display Size field. If you do not specify a display size, the reference will not retrieve the related information.

  8. To specify a register in which to store the retrieved information, complete the following field:

    • Register Number

  9. To control the format specifications for the retrieved information, complete the following fields:

    • Edit Code

    • Print

    • Print Decimals

    • Align Right

  10. Use the Add action.

    The system clears the window.

  11. Choose Exit Program (F3).

    The system closes the Retrieval Reference window and displays an ampersand (&.) and the number of the retrieval reference (without leading zeros) in the line and position where you last located the cursor.

Figure 5-6 Layout Definition Ruler Detail

Description of Figure 5-6 follows
Description of "Figure 5-6 Layout Definition Ruler Detail"

5.3.4 What You Should Know About

Topic Description
Numbering retrieval references If you have not defined retrieval references for a particular form, the system assigns Retrieval Number 1 for the first retrieval reference that you define. If 6 retrieval references were already defined for the Format Definition form, the default Retrieval Number would be 7. You can override the default value.

The system might not display all the retrieval reference codes for retrieval references that you have previously defined for a Format Definition form. This can happen if you delete the code for the retrieval reference from the form, but not the definition.

Deleting retrieval references To delete retrieval references, follow the steps to locate a retrieval reference. After you review the information for the reference that you want to delete, use the Delete action to remove the information that defines the reference. When you return to the format definition, clear the code for the retrieval reference from the format by entering spaces in place of the code.

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

Printing page numbers You can print page numbers anywhere on an invoice. To print page numbers, position the cursor where you want to define the page number within the format and use the retrieval code PAGE.
Total page number counts You can print a running page count on your invoices along with the current invoice page number. First, define a retrieval reference for the format using the code PAGE. Next, enter invariable information to print the word "of". Finally, define another retrieval reference with the retrieval code PAGE OF.
Printing dates You can print the system date anywhere on an invoice. To print the date, position the cursor where you want the system date to print within the format. Then, define a retrieval reference with the retrieval code DATE.
Printing amounts You can print amounts, such as the cost amount or the unit amount, anywhere on an invoice. To print an amount, position the cursor where you want to define the amount within a format and use the retrieval code AMOUNT.

Amounts are retrieved from the Billing Workfile (F4812), based upon the value you select for Parameter 1 in the retrieval reference.

Description of image038.gif follows
Description of the illustration image038.gif
Printing cumulative totals for contracts You can print cumulative totals on an invoice using information from the Invoice Summary Access table (F48520). A system constant controls whether the system creates and maintains this table.
Totals within a Format Definition form Your placement of registers within a Format Definition form is critical to accumulating the correct total on your printed invoices. You must enter the retrieval reference containing the register before the retrieval reference that recalls the accumulated register results.

Note: You use the TOTAL retrieval code and parameters to recall the specific register number.

Clearing registers Registers continue to accumulate totals until you clear the totals from the registers. When you clear a register, you set the accumulated amount to zero. Then you can reuse the register to accumulate a new total amount.

You clear a register after its accumulated total has been recalled by another retrieval reference within the layout structure. To do this, you must use a 1 in the second parameter of the retrieval reference that recalls the register.

Calculations You can assign up to four parameters to a retrieval reference that performs a calculation. The system processes the parameters sequentially. You use the parameters in place of parentheses. This is especially helpful if you need to incorporate multiple variables within a single calculation.
Retrieval codes for text The File Field Description window does not apply when the system retrieves text using the following retrieval codes:
  • CC SUP2

  • INV TEXT

  • WO TEXT

  • NOTES

  • CL TEXT