Domain data element search help

A domain defines a value range. A domain is assigned to a data element. All table fields or structure components that use this data
element then have the value range defined by the domain. The relationship between the field or component and the domain is thus defined
by the data element of the field or component.

Fields or components that refer to the same domain (with the assigned data elements) are also changed when the domain is changed. This
ensures that the value ranges of these fields or components are consistent. Fields or components that are technically the same can thus be
combined with a reference to the same domain.

domain-dataelement

domain-dataelement

The value range of a domain is defined by specifying a data type and length (and number of decimal places for numeric data types).

A personnel number is defined by the data format NUMC and by specifying the number of places for this personnel number.

The value range of a domain can be restricted by defining fixed values. If all the fields or components that refer to the domain should be
checked against a certain table, this table can be defined as the value table of the domain.

Output attributes can also be defined for all the fields or components that refer to the domain (see Creating Domains). A conversion
routine can be assigned to a domain. This conversion routine converts values from display format to internal format for the fields or
components that refer to this domain.

Creating Domains

Before creating a new domain, check whether a domain that defines the same value range already exists. In this case you should use
the existing domain if possible.

Procedure

Select object type Domains in the initial screen of the ABAP Dictionary, enter the name of the domain and choose Create.
The maintenance screen for domains appears.

Enter an explanatory short text in the field Short text.
You can for example find the domain at a later time using this short text.

On the Data type tab page, choose the  data type, number of places (valid positions without editing characters such as comma or
period) and number of decimal places (only needed for data types DEC, FLTP, QUAN and CURR).
Note that some data types have a fixed length. For example, the data type CLNT (client) always has 3 places. If you enter an invalid
number of places for such a data type, the system corrects this automatically after issuing a warning.

If only certain input values are valid for the domain, you can enter them in the Value range tab page as fixed values.
You can also define a value table as proposed value for foreign key checks on this tab page.

Save the domain.
You are asked to assign the domain a development class.

Choose .
Result

The domain is activated. You can find

Changing Domains

Procedure

In the initial screen of the ABAP Dictionary select object type Domain, enter the domain name and choose Change.

All the tables and structures in which a field or component refers to the particular domain are affected by changes made to the domain.

A conversion of these tables could be necessary (see  Adjusting Database Structures). This could be very time-consuming for tables
containing a large number of records. Foreign keys might also become inconsistent in such tables and structures. You should therefore
find out what effects the change will have using the where-used list  before you change a domain.

Changing the Data Type, Number of Places or Number of Decimal Places

You can change the data type and number of places or decimal places simply by overwriting the relevant data. Note that a change of
this type can cause all tables containing a field referring to the changed domain to be converted.

You should therefore find out all the database tables in which a field refers to the domain before making such a change. To do this,
choose  and then Indirect use in the next dialog box. A list appears. Select DB tables and choose . All the database tables in which a
field refers to the domain are displayed.

Changing the Output Attributes

Changing the output attributes of a domain has an effect on the dialog behavior in all the screens in which a field refers to this domain.

You should therefore find out which screens are affected before making such a change. To do this, choose  and then Indirect use in the
next dialog box. A list appears. Select Screens and choose . All the screens in which a field refers to the domain are listed.

Changing the Value Table

The value table is used as proposal value for foreign key definitions. If you change the value table, use the where-used list to check if
foreign keys that were already created also have to be changed. You can find out which foreign keys are affected by finding all the fields
that refer to the domain and checking them against the changed value table.

Search Helps

The input help (F4 help) is a standard function of the R/3 System. The user can display the list of all possible input values for a screen
field with the input help. The possible input values can be enhanced with further information. This is meaningful especially when the field
requires the input of a formal key.

Standard Input Help Process

A user calls an input help with the following steps (some steps can be omitted, depending on the definition of the input help):

The user starts the input help to display the possible input values for a field (search field) in a screen template.
The system offers the user a number of possible search paths. The user selects one of these search paths. Each search path offers a
number of restrictions to limit the number of possible input values. These values are offered in a Dialog box for value restriction when
the search path is selected.
The user enters restrictions if required and then starts the search.

Function of a Search Help

This standard process can be completely defined by creating a search help in the ABAP Dictionary. This search help only has to be
assigned to the screen fields in which they should be available (see Attaching Search Helps to Screen Fields).

There are two types of search help:

Elementary search helps describe a search path. The elementary search help must define where the data of the hit list should be read
from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of
the search help) and how the online input help should be defined (online behavior of the search help).
Collective search helps combine several elementary search helps. A collective search help thus can offer several alternative search paths

Leave a Reply

Copy Protected by Chetan's WP-CopyProtect.