Start of Content Area

Event 23: Before the Address Maintenance Screen Call  Locate the document in its SAP Library structure

 

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:

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

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:

Example

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.