Considerations for Planning Value Sets
The value sets you create and configure depend on the valid values of the business object attributes that use the value sets. When creating value sets, you first provide a name and description, and then define the valid values.
The following aspects are important in planning value sets:
-
List of values
-
Plain text
-
Value ranges
-
Value format specification
-
Security
List of Values
You can use one of the following types of lists to specify the valid values for a segment:
-
Table column
-
User-defined list. Also include a sub list.
-
Dependent user-defined list
If the valid values exist in a table column, use a table value set to specify the list of values. To limit the valid values to a subset of the values in the table, use a SQL WHERE clause. Table value sets also provide some advanced features, such as enabling validation depending on other segments in the same structure.
Use an independent value set to specify a user-defined set of valid values. For example, you can use an independent value set of Mon, Tue, Wed, and so forth to validate the day of the week. You can also specify a subset of an existing independent value set as the valid values for a segment. For example, if you have an independent value set for the days of the week, then a weekend subset can comprise entries for Saturday and Sunday.
Use a dependent value set when the available values in the list and the meaning of a given value depend on which independent value was selected for a previously selected segment value. For example, the valid holidays depend on which country you're in. A dependent value set is a collection of value subsets, with one subset for each value in a corresponding independent value set.
For lists of values type value sets, you can additionally limit the valid values that an end user can select or enter by specifying format, minimum value, and maximum value. For list of values type value sets, you can optionally implement value set data security. If the applications are running in different locales, you might need to provide different translations for the values and descriptions.
Plain Text
Use a format-only value set when you want to allow users to enter any value, as long as that value conforms to formatting rules. For example, if you specify a maximum length of 3 and numeric-only, then end users can enter 456, but not 4567 or 45A. You can also specify the minimum and maximum values, whether to align the text to either side, and whether to zero-fill. With a format-only value set, no other types of validation are applied.
Value Ranges
You can use either a format-only, independent, or dependent value set to specify a range of values. For example, you might create a format-only value set with Number as the format type where the end user can enter only the values between 0 and 100. Or, you might create a format-only value set with Date as the format type where the end user can enter only dates for a specific year, such as a range of 01-JAN-93 to 31-DEC-93. Because the minimum and maximum values enforce these limits, you need not define a value set that contains each of these individual numbers or dates.
Value Format
Flexfield segments commonly require some kind of format specification, regardless of validation type. Before creating a value set, consider how you will specify the required format.
The following table shows options for validation type and value data type.
Option |
Description |
---|---|
Value data type |
Character, Number, Date, Date Time. |
Value subtype |
Text, Translated text, Numeric digits only, Time (20:08), Time (20:08:08). An additional data type specification for the Character data type for the Dependent, Independent, and Format validation types. |
Maximum length |
Maximum number of characters or digits for Character data type. |
Precision |
Maximum number of digits the user can enter. |
Scale |
Maximum number of digits that can follow the decimal point. |
Uppercase only |
Lowercase characters automatically changed to uppercase. |
Zero fill |
Automatic text alignment and zero-filling of entered numbers (affects values that include only the digits 0-9). |
Value Sets for Context Segments
You can use only table and independent value sets to validate context values. The data type must be character and the maximum length of the values being stored must not be larger than the context's column length. If you use a table value set, the value set can't reference flexfield segments in the value set's WHERE clause other than the flexfield segment to which the value set is assigned.
Security
When enabling security on a value set, the data security resource name is an existing value set or one that you want to create. The name typically matches the code value for the value set. You can't edit the data security resource name after you save your changes.