Show TOC

Event 23: Before the Address Maintenance Screen CallLocate this document in the navigation structure

Use

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

Process

There are no standard routines for this event. The following global data is available for the realization of user routines:

  • The table or view work area.

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 the parameter CHANGE_DEFAULT_COMM_TYPES

    • VIM_ADDR_FRAME_TEXT corresponds to the parameter FRAME_TEXT

    • VIM_ADDR_EXCLUDED_FUNCTIONS corresponds to the parameter EXCLUDED_FUNCTIONS

Only VIM_ADDR_TITLEBAR of these variables has as a default the standard maintenance screen title. All other variables have the initial value so that the address maintenance defaults apply.

Actions to perform at this event:

  • Determine the context from the contents of the table or view work area and set the function module interface parameters accordingly.

  • Set the relevant global variables (VIM_ADDR_..., see above). Non- relevant variables need not be handled because the address maintenance default applies to them.

    Example

    FORM name.

    * FORM for the event 23 for view V_HUGO

    DATA: ADDR_KONTEXT TYPE C.

    * Determine first context:

    IF V_HUGO-F1 = 'OTTO'

    ADDR_KONTEXT = '1'.

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

    ADDR_KONTEXT = '2'.

    ENDIF.

    * Set second globale variables

    CASE ADDR_KONTEXT.

    WHEN '1'.

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

    VIM_ADDR_FIELD_SELECTION+2(1) = '+'.

    WHEN '2'.

    * the first sort field should be a required field und the second

    * sort field should be hidden in this context.

    VIM_ADDR_FIELD_SELECTION+2(1) = '+'.

    VIM_ADDR_FIELD_SELECTION+4(1) = '-'.

    WHEN OTHERS.

    * the field 'Transport zone' should be an optional field in this

    * context (it is normally hidden)

    VIM_ADDR_FIELD_SELECTION+32(1) = '.'.

    ENDCASE.

    ENDFORM