Field Groupings

Technique

Using field grouping, the BDT can show or hide screen fields, or make these required fields or display fields. Field grouping is done per field group (see Screen Layout Field Groups). Different field grouping criteria can be defined by the applications and integrated into the field status determination carried out by the BDT.

For each criterion, the status of the field groups is stored in field status definitions. These consist of four data fields which cross-reference the data element BU_FLDSTLS. The following rules apply when interpreting field status definitions:

  • The first field contains the status of field groups 1 to 250, the second contains the status of groups 251 to 500, the third 501 to 750 and the fourth 751 to 1000.

  • Each character stands for a field group. In the first field, the first character stands for the field status of field group 1, the second character stands for field group 2 and so on. In the second field, the first character stands for field group 251, the second character stands for field group 252 and so on. This rule also applies in the same way to the third and fourth fields.

  • The individual field statuses are represented using the following characters:

+ (plus) Required input

. (period) Optional input

* (star) Display

- (minus) Hidden

(SPACE) Not specified

Using set rules, the BDT links the settings for each field group, which have been made on the basis of different criteria.

Note: Of course, the field status is not maintained by the user directly in the field status definition (see Menus , Additional funtions, "Adjusting generated maintenance programs"). In the case of further field grouping criteria, the field status can be saved in a different way (for example, a separate data record for each criterion and field group).

Predefined Field Grouping Criteria

The BDT offers field grouping for

  • Activity

  • Object part

as a service. Each application object can use both of these predefined criteria.

Activities: Only the setting activities

  • 0100 field grouping per activity

  • 0101 field grouping per object part

must be defined for the application object and must bear a transaction code.

Note: Neither predefined criterion is contained in the table of field grouping criteria. Only the additional criteria are entered here.

Additional Field Grouping Criteria

Any number of additional field grouping criteria can be created for each application object. Each application can define additional criteria.

Activities: The following steps are necessary for defining an additional criterion:

  • Create/expand table in the DDIC

The table key should correspond to the entity of the criterion. Four fields are used in the data part for storing the field status definitions which cross-reference the data element BU_FLDSTLS. The field statuses can, of course, be stored in another form, for example with a separate data record for each field group (the number of the field group then goes into the table key).

  • Create maintenance view in the DDIC

The maintenance view generally consists of:

  • The key fields of the table created/expanded in the first step

  • The fields for storing the field status definitions (maintenance attribute "H": Field does not appear on the maintenance screen) and

  • Possibly a name from the text table belonging to it (maintenance attribute "R": Field is read-only).

The maintenance status is usually "Read and change" as, in this maintenance view, entries should neither be created nor deleted.

  • Generating maintenance programs

Using transaction SE54 you can generate the maintenance program for the maintenance view created in the previous step.

  • Adjusting generated maintenance programs

The field status should not be maintained by the user directly in the field status definition. The BDT offers a clearly arranged maintenance interface with selection fields. The generated maintenance program must therefore be adjusted as follows:

  • Define separate menu for the maintenance view

The standard interface from the program SAPLSVIM is copied to the main program of the generated maintenance program. The new menu option is included in the editing menu and the application toolbar with the text "field grouping". This function must now be activated in various statuses. The function FLDM can be used as a template with the text "field grouping" in the program SAPLBUS2. The event "ST" must be defined for the maintenance view, and also the name of the main program. This means that the main program’s interface, which has been expanded to include the "field grouping" function, is used instead of the standard interface SAPLSVIM.

  • Calling up the function ‘field status‘

In the flow logic of the maintenance view screen, a separate module is inserted in the PAI before the module LISTE_UPDATE_LISTE (applies only to single-level maintenance views). This module calls up the BDT function module BUS_FMOD_CUSTOMIZING which carries out field status maintenance using the selection fields. The module FIELDMOD_V_TB004_01 on screen SAPLBUS2/0840 can be used as a template for creating the PAI module.

  • Event FMOD1: Creating a function module for reading the table

The value of the criterion should be known, at the latest, once the initial screen has been executed. The function module to be created will read the table on the basis of this value and sends the contents of the field status definitions as a result to the BDT. If the value is not yet known at one of the runtimes, the field status definitions returned to the BDT should be blank or 0.

Runtime: Before the initial screen and between the initial screen and the first data screen.

Application area: Owner application of the field grouping criterion.

Naming convention: <Application>_<Application object>_EVENT_FMOD1_<Criterion>

(Customer: Function module name has the prefix Y_ or Z_).

Example: BUP_BUPA_EVENT_FMOD2_BUP003

  • Enter field grouping criterion

The criterion must now be entered into the control table of field grouping criteria. You should also define the name of the function module here, with which the BDT can call up the field statuses for the criterion.