10 Working with User Defined Codes

This chapter contains the following topics:

10.1 Understanding User Defined Codes

Most forms in JD Edwards EnterpriseOne contain fields. Some fields enable you to enter any value, and some require you to select from a list of values. A user defined code (UDC) is one value in a set of values that is assigned as valid for a field. You can use UDCs to categorize your data and make sure that users provide consistent input on forms. Because users can select only values from the list, UDCs simplify, standardize, and validate the data that is contained in fields.

From any JD Edwards EnterpriseOne application, you can identify fields that have UDCs attached to them by using the visual assist button that appears when you tab into or click in a field. If you do not know the value to enter in a field with a user defined code attached to it, click the visual assist button, which accesses the Select User Define Code form. This form displays all values contained in the user defined code tables for this field. You can then select the value to use.

JD Edwards EnterpriseOne provides predefined UDCs, but many of the UDCs that you will use are unique to your enterprise, and your needs are likely to change. Therefore, the system lets you change, add, and delete UDCs to meet the needs of your enterprise. When you upgrade JD Edwards EnterpriseOne software, your customized UDCs will remain.

10.1.1 UDCs, UDC Types, and Category Codes

A UDC is one value in a set of values that you have assigned as valid for a field. A UDC is made up of two parts. The first part is the code, which consists of the characters that you enter in a field. The second part is the description, which is text that describes what the code means. For example, on the Work With Addresses form, you can enter A in the Search Type field to designate an Applicant; this code becomes part of the data stored with the record.

A UDC type is the complete set of UDCs that are allowed as values for a field. A UDC type is made up of a code type, which is its two-character name, and a description. Examples of UDC types are ST - Search Type and UM - Unit of Measure. UDC types are sometimes referred to as UDC lists.

Each UDC type is associated with a JD Edwards EnterpriseOne product code. You can identify any set of UDCs by its product code and its code type. For example, the Address Book (product code 01) list of search types (code type ST) is referred to as UDC 01/ST.

Throughout the system, you will see references to category codes. Category codes are UDC types that JD Edwards EnterpriseOne provides for you to customize according to your needs. You can change the code type and the description, and you can redefine the UDCs as appropriate for your purposes. For example, you might see a UDC type called Category Code 01. You can change its description and define the UDCs within it to suit your business needs.

10.2 Understanding UDC and UDC Type Customization

JD Edwards EnterpriseOne provides many UDC types that contain predefined UDCs. Some of the UDCs are hard-coded, which means that certain applications depend on specific values, so you should not change these UDCs. However, if a UDC is not hard-coded, you can change it to suit your business needs.

Many of the UDCs that you need to use are unique to your enterprise, and your needs are likely to change. Therefore, you can change, add, and delete UDCs. UDCs enable you to customize JD Edwards EnterpriseOne software to meet your needs without having to write complex programs or modify the system code. When you upgrade JD Edwards EnterpriseOne software, your customized UDCs remain.

You can change, add, and delete UDCs in these ways:

  • Change the code or the description of a UDC in an existing UDC type. For example, in UDC 01/ST, a medical institution might change the UDC for C - Customers to P - Patients to more accurately describe the category.

  • Add UDCs to an existing UDC type. For example, in the Search Type list, you might add a UDC for S - Students.

  • Delete UDCs from a UDC type. For example, if you want to prevent users from choosing a UDC, you can delete it from the UDC type.

You can also change, add, and delete UDC types in the following ways:

  • Change the code type or the description of an existing UDC type, which is useful if you want to customize one of the generic category code lists for your needs.

  • Create a new UDC type and add UDCs to it. For example, an educational institution might create a UDC type called MA - Major Field of Study to classify its students, and it might define the following UDCs:

  • LA - Liberal Arts

  • MA - Mathematics

  • CS - Computer Science

  • EN - Engineering

  • MD - Medicine

10.2.1 Consequences of Customizing UDCs

Because UDCs can significantly affect the integrity of your data, you should customize them only as part of a coordinated plan within your enterprise. When you add or change a UDC, you are affecting the set of values against which the system validates the data entry. However, you are not affecting the actual content of any existing data records. By changing UDCs within a working production environment, you might affect the integrity of your data. For example, you use Address Book to enter address book records, and you use search types to classify those records. Suppose that you select a search type of C - Customers to classify some of the records that you enter. Later, you decide to change that UDC from C - Customers to P - Patients. Any address book records that you entered with the original UDC value of C will still contain that value. When Address Book displays these records, you will see an error in the Search Type field because C is no longer a valid value.

10.2.1.1 User Defined Codes Compare Report (Release 9.1 Update 2)

The User Defined Codes Compare report (RD960004NA) compares UDCs between two environments or data sources. You can use this report as an audit or validation tool to determine which UDCs were added, deleted, or changed.

Before an upgrade, you can compare UDCs in the Production and Pristine environments. After the upgrade, you can use the report to verify that your modifications were carried forward to the new release.

See ”User Defined Codes Compare Report” in the JD Edwards EnterpriseOne Tools Software Updates Guide.

10.3 Understanding UDC Tables

You use the User Defined Codes program (P0004A) to create and customize UDCs and UDC types. The program stores UDC information in the following tables:

  • User Defined Code Types (F0004)

  • User Defined Codes (F0005)

For more information on customizing UDCs, see ”Customizing User Defined Codes” in JD Edwards EnterpriseOne Tools Foundation Guide.

10.4 Customizing UDC Types

This section provides overviews of how to customize UDC types and add UDC types and discusses how to:

  • Change a UDC type.

  • Add a UDC type.

  • Delete a UDC type.

10.4.1 Understanding How to Customize UDC Types

A UDC type is the complete set of UDCs that is allowed for a field. A UDC type is made up of a code type, which is its two-character name, and a description. Examples of UDC types are search types and units of measure. UDC types are sometimes referred to as UDC lists.

Each UDC type is associated with a JD Edwards EnterpriseOne product code. You can identify any set of UDCs by its product code and its code type. For example, the Address Book (product code 01) list of search types (code type ST) is referred to as UDC 01/ST.

You can change the code type and the description of an existing UDC type to meet your needs. Typically, you would change only the description so that it provides a meaningful description of the UDCs within the UDC type. For example, to classify your customers according to how much business they provide, you can change the description for Category Code 01 to Customer Volume. Then, you can customize the individual UDCs within that UDC type to describe the following classifications for your customers:

  • H - High-volume customer

  • M - Medium-volume customer

  • L - Low-volume customer

You can change the code type, but you should do so with caution. If you change a code type, you could invalidate any existing records that use the original code type.

You can also follow this procedure to see a complete list of UDC types for a product code.

10.4.2 Understanding How to Add UDC Types

Add a UDC type when you need to categorize your data using UDCs and when none of the existing UDC types is appropriate. For example, an educational institution might add a UDC type called "Major" to categorize its students by any of the following fields of study:

10.4.3 Prerequisite

Delete all individual UDCs from the UDC type.

For more information, see Deleting a UDC in the JD Edwards EnterpriseOne Tools Foundation Guide.

10.4.4 Changing a UDC Type

Access the Work With User Defined Codes form. From a System Setup menu for your product, select the appropriate program for changing UDCs; or enter UDC in the Fast Path field.

  1. Select Code Types from the Form menu.

  2. On the Work With User Defined Code Types form, complete the Product Code field and click Find.

    The system displays the UDC types that exist for that product code.

  3. Select the UDC type that you want to change and click Select.

  4. On the User Defined Code Types form, change the values in any of these fields and click OK:

    Field Description
    Code Types Enter a code that identifies the table that contains user defined codes. The table is also referred to as a UDC type.

    Note: It is suggested that you do not change code types. If you change a code type, you might invalidate existing records that use the original code type.

    Description Enter a description for the UDC type.
    Code Length Enter the length of the user defined code. It cannot be greater than 10 characters.
    2nd Line (Y/N) Determines if the Select User Defined Code form will display a second line of description. Valid values are:

    Y Enables the second line of description.

    M For maintenance only for second line display. This capability is seldom used, but has applicability in areas such as inventory product codes. The M value will not display the second line of description in the Select User Defined Code form.

    N Enables the Select User Defined Code form to display only one line of description.

    Numeric (Y/N) Determines whether a user defined code is numeric or alphanumeric.

    Valid values are:

    Y Indicates that the code is numeric and should be right-justified.

    N Indicates that the code is alphanumeric and should be left-justified.


10.4.5 Adding a UDC Type

Access the Work With User Defined Codes form. From a System Setup menu for your product, select the appropriate program for changing UDCs; or enter UDC in the Fast Path field.

  1. Select Code Types from the Form menu.

  2. On the Work With User Defined Code Types form, complete the Product Code field and click Find.

  3. Click Add.

  4. On the User Defined Code Types form, scroll to the last empty row of the detail area, complete these fields, and then click OK:

10.4.6 Deleting a UDC Type

You can delete a UDC type, but you should do so with caution. JD Edwards EnterpriseOne applications and the integrity of the data within your database might depend on the existence of UDCs and UDC types. Only delete UDC types as part of a coordinated plan within your enterprise.

Important:

Do not delete UDC types that contain hard-coded UDCs because JD Edwards EnterpriseOne applications might depend on them. Hard-coded UDCs have the value Y in the Hard Coded field on the Work With User Defined Codes form.

Access the Work with User Defined Codes form. From a System Setup menu for your product, access the P0004A program, or enter UDC in the Fast Path field.

To delete a user defined code type:

  1. On the Work With User Defined Codes form, select Code Types from the Form menu.

  2. On the Work With User Defined Code Types form, complete the Product Code field and click Find:

  3. On the Work With User Defined Code Types form, select the code type that you want to delete and click Delete.

    Important:

    Ensure that you want to delete this code type. The only way to replace a deleted UDC type is to add it again.
  4. Click OK to confirm that you want to delete the code type.

10.5 Translating User Defined Codes into Alternate Languages

This section provides an overview on how to translate UDCs into alternate languages and discusses how to:

  • Translate UDC type descriptions into alternate languages.

  • Translate UDC descriptions into alternate languages.

10.5.1 Understanding How to Translate User Defined Codes into Alternate Languages

Multinational enterprises can translate the descriptions for both UDCs and UDC types into alternate languages. The system displays the descriptions in the language designated by the user's language preference. For example, you can provide a translated description for this UDC:

  • Code: E

  • English Description: Employees

  • Spanish Description: Empleados

In this way, users can select the same UDCs, regardless of their language preference.

The User Defined Code Alternate Descriptions program (P0004D) stores the translated descriptions in the following tables:

  • User Defined Codes - Alternate Language Descriptions (F0004D)

  • User Defined Codes - Alternate Language Descriptions (F0005D)

10.5.2 Translating UDC Type Descriptions into Alternate Languages

Access the Work With User Defined Codes form. From a System Setup menu for your product, access the P0004A program, or enter UDC in the Fast Path field.

  1. Select Code Types from the Form menu.

  2. On the Work With User Defined Code Types form, complete the Product Code field and click Find.

  3. Select the UDC type that you want to translate and then select Language from the Row menu.

  4. On the UDC Alternate Languages form, enter information in a blank row for these fields and click OK:

    Field Description
    L Select the user defined code (01/LP) that specifies the language to use on forms and printed reports. Before you specify a language, a code for that language must exist at either the system level or in your user preferences.
    Description Type the translated description into this field.

10.5.3 Translate UDC Descriptions into Alternate Languages

Access the Work With User Defined Codes form. From a System Setup menu for your product, access the P0004A program, or enter UDC in the Fast Path field.

  1. On the Work With User Defined Code form, complete the Product Code and User Defined Codes fields and click Find.

  2. Select the code that you want to translate and then select Language from the Row menu.

  3. On the UDC Value Alternate Descriptions form, enter the following information in a blank row in the grid, and then click OK:

    Field Description
    L Select the user defined code (01/LP) that specifies the language to use on forms and printed reports. Before you specify a language, a code for that language must exist at either the system level or in your user preferences.
    Description Type the translated description into this field.