Function Group SAPLSZA1

The function group contains function modules to put standard address maintenance dialogs in the applications flexibly.

The address maintenance dialog exists as a popup, as subscreen or a full screen (like a transaction).

The use of the different dialog types is described below.

The function module ADDR_DIALOG_PREPARE controls the field selection, some keywords and excluded functions, application-specifically, for all dialog types.

Use the function modules ADDR_NUMBER_GET, ADDR_MEMORY_SAVE and ADDR_MEMORY_CLEAR to save and get numbers (register first use) for both the subscreen and the popup. For further information see the documentation of function group SZA0 or the function module.

Register or delete other applications in all dialog types with the function modules ADDR_REFERENCE_INSERT and ADDR_REFERENCE_DELETE. For further information see also the documentation of SZA0 or the function module.

Which dialog type?

Subscreen - if the address is an integral or central component of an application objects and is normally maintained;

Popup - if the address is one application object attribute among several, and the maintenance is optional;

Full screen - if the addresses are initially created independently of concrete application objects, to which they are assigned later.

Full screen

The maintenance dialog can be called using the parameterized transaction SADR (without parameterization such as field selection).

An address group must be specified. New R/3 standard address groups are put in the control table TSAD7 by the person responsible for the table at SAP (name conventions); customers can then make entries in the customer namespace.

Transaction MEAN.

Call the FM ADDR_DIALOG_PREPARE followed by the FM ADDR_SELECT_FOR_DIALOG instead, if the parameterization is application-specific.

Data are saved, and numbers assigned in the address dialog, as the application has no reference to the address number when it is created .


Put in the application with the function module ADDR_DIALOG.

Lock and unlock the addresses with the function module ADDR_ENQUEUE or ADDR_DEQUEUE.

Save, get number and register or delete applications: see above


Inclusion in main screen:
in the full screen editor:
Reserve an area <subscreen> of the static size of the screen SAPLSZA1 0300 (50 lines), in the main screen, for the address subscreen. If the area is defined too small, the bottom lines of the subscreen may be lost at runtime, as the complete screen is first assembled at runtime, and then compressed.
In the flow logic:
and call function modules ADDR_EXP_SUBSCREEN, ADDR_IMP_SUBSCREEN, ADDR_EXIT_SUBSCREEN (se example below).

Save, get number and register or delete applications: see above

Status SAPLSZA1 ADDR0300, which can also be included in the main menu, if there is still a menu entry free, is the reference for the address management function codes. The status cannot currently be included as a submenu.

The function module ADDR_EXP_SUBSCREEN must be called before calling the main screen (possibly in the PBO of the main screen, but the calling program may then not be able to respond to exceptions).

The function module ADDR_EXIT_SUBSCREEN must be called in a PAI module at the event AT EXIT-COMMAND (Cancel, F12), to determine whether the address management contains unsaved data, and to tell the address subscreen to continue with the unchecked data if the user cancelled the confirmation prompt POPUP_TO_CONFIRM_LOSS_OF_DATA.

Before processing the subscreen in PAI, the main screen OK code must be passed to the subscreen, if it is relevant for the address subscreen.

You must call the function module ADDR_SUBSCREEN_SET_OKCODE at the beginning of PAI.

All address subscreen OK codes begin with the dollar sign '$'.

The OK code $CHC (for 'CHECK') must also be passed to the function module ADDR_SUBSCREEN_SET_OKCODE whenever a general data check is to be made. This applies, e.g. for Enter (Check, Refresh, Continue, Copy), but also for most functions which further process the main object, which can generally only be processed when all checks including the address check were successful.

The address is also checked implicitly at all other $ OK codes in the address subscreen.

The function module ADDR_IMP_SUBSCREEN, which returns information from the subscreen to the application, must be called in a PAI module after processing the subscreen.

The parameter ERROR_IN_ADDRESS_DATA is significant for the dialog flow. If it has the value 'X', the address contents check found an error which is output by the address subscreen with an S message. To avoid this message being overwritten, the application program must process the screen again, without reprocessing PAI (e.g. "SET SCREEN SY-DYNNR. LEAVE SCREEN." in the PAI module).

Lock and unlock the addresses with the function module ADDR_ENQUEUE or ADDR_DEQUEUE.

Undo functions, e.g. for processing other applications without previously saving in the main screen, or processing several screens of objects of the same type, must be realized by the application using the function module ADDR_MEMORY_PUSH, ADDR_MEMORY_POP or ADDR_MEMORY_RESTORE.


The central address management terms are described in the documentation of the function group SZA0.


Subscreen example:

Call ADDR_EXP_SUBSCREEN before calling the main screen (e.g in the PAI of the previous screen)