Event 23 

Execution : Before the address maintenance screen call

Use

This event occurs before the address maintenance screen is displayed, i.e. before the ADDR_DIALOG_PREPARE function module call. The module is usually only used to set the address maintenance screen title. If the standard address maintenance screen does not satisfy your specific requirements, the maintenance screen can be configured context-dependently.

Realization

This event has no standard routine. The following global data is available for the realization of the user routine:

· the work area of the table or view.

This contains the current entry for which the address is to be processed, from which the current context can be determined.

· global variables, which correspond to the interface parameter of the function module ADDR_DIALOG_PREPARE in the function group SZA1. These are:

- VIM_ADDR_FIELD_SELECTION corresponds to parameter FIELD_SELECTION

- VIM_ADDR_KEYWORDS corresponds to parameter KEYWORDS

- VIM_ADDR_TITLEBAR corresponds to parameter TITLEBAR

- VIM_ADDR_CHNG_DEFLT_COMM_TYPES corresponds to parameter CHANGE_DEFAULT_COMM_TYPES

- VIM_ADDR_FRAME_TEXT corresponds to parameter FRAME_TEXT

- VIM_ADDR_EXCLUDED_FUNCTIONS corresponds to parameter EXCLUDED_FUNCTIONS

Of these variables only VIM_ADDR_TITLEBAR has as default value the standard maintenance screen title. All the other variables have the initial value, so that the address maintenance default applies.

Actions to be performed at this event are:

· get the context from the table or view work area and assign function module interface parameters.

· set the relevant global variables (VIM_ADDR_..., see above). Irrelevant variables need not be handled because they get the address maintenance default.

FORM name.

* FORM for event 23 for view V_HUGO

DATA: ADDR_KONTEXT TYPE C.

* 1. get context:

IF V_HUGO-F1 = 'OTTO'

ADDR_KONTEXT = '1'.

ELSEIF V_HUGO-F1 = 'ERWIN' AND V_HUGO-F2 = 'WALDEMAR'.

ADDR_KONTEXT = '2'.

ENDIF.

* 2. set global variables:

CASE ADDR_KONTEXT.

WHEN '1'.

* the first sort field in this context should be a required field.

VIM_ADDR_FIELD_SELECTION+2(1) = '+'.

WHEN '2'.

* the first sort field in this context should be a required field, and the second

* should be hidden.

VIM_ADDR_FIELD_SELECTION+2(1) = '+'.

VIM_ADDR_FIELD_SELECTION+4(1) = '-'.

WHEN OTHERS.

* the 'Transport zone' field should be a required field in this context.

* (it is normally hidden)

VIM_ADDR_FIELD_SELECTION+32(1) = '.'.

ENDCASE.

ENDFORM.