Ansicht
Dokumentation

SAPLSZA5 - Dialogs: Address of Person in Company

SAPLSZA5 - Dialogs: Address of Person in Company

RFUMSV00 - Advance Return for Tax on Sales/Purchases   Vendor Master (General Section)  
This documentation is copyright by SAP AG.
SAP E-Book

Description

This function group contains function modules for using standard address maintenance dialogs flexibly for contact person addresses in applications.

The address maintenance dialog is available as a dialog box, a subscreen or a full screen (like a transaction).

The use of the various dialog types is described below.

The function module ADDR_PERS_COMP_DIALOG_PREPARE controls the field selection, some keywords and the exclusion of functions application-specifically for all dialog techniques.

The function modules ADDR_PERSON_NUMBER_GET, ADDR_MEMORY_SAVE and ADDR_MEMORY_CLEAR are used for saving and number assignment (= register first use) for subscreen and dialog box. For further information see the documentation of function group SZA0 or the function modules.

Other uses must be registered or deleted with the function modules ADDR_PERSON_REFERENCE_INSERT and ADDR_PERSON_REFERENCE_DELETE for all dialog techniques. Further information is in the SZA0 or function module documentation.

Which dialog technique?

Subscreen - if the address is an integral or central part of an application object and is usually maintained;

Dialog box - if the address is one application object attribute among others and the maintenance is optional;

Fullscreen - if the addresses are entered without reference to a concrete application object, and may be assigned later.

These addresses cannot be distributed by ALE.

Fullscreen

The maintenance dialog can be called by the parameterized transaction SADP (without parameterization such as field selection, etc.).

A person group and an address group must be specified. New person and address groups for solutions and components delivered by SAP are put in the control tables TSAD8 and TSAD7 respectively (naming conventions) by the SAP person responsible for the tables; the customer can make entries in the customer namespace.

Example: Transaction SOCP

If application-specific parameterization is to be made (or there are several address groups for the contact person company addresses), call the FM ADDR_PERS_COMP_DIALOG_PREPARE first, followed by the FM ADDR_PERS_COMP_SELECT_DIALOG.

Numbers are assigned and saved in the address dialog, as the application has no reference to the address number when addresses are created.

The fields ADGRP_P (person group) and ACTVT (activity) of authorization object S_ADDRESS3 are checked.

The pre-defined authorizations S_ADDR3_SHOW (display only), S_ADDR3_MAIN (maintenance, no delete) and S_ADDR3_ALL (all authorizations) can be put in a profile for all person groups. All these authorizations aren in the profile S_ADDR_ALL.

Dialog box

Used in the application via the function module ADDR_PERS_COMP_DIALOG.

Addresses are locked and unlocked by the application using the function modules ADDR_PERSON_ENQUEUE and ADDR_PERSON_DEQUEUE.

Saving, number assignment and registration and deletion of uses: see above

No authorization check is made.

Subscreen

use in the main screen:
reserve an area <subscreen> in the main screen in the static size of the screen SAPLSZA5 0900 (40 lines) for the address subscreen. If the size of the area is too small, the bottom lines in the subscreen may be cut off at runtime, as the whole screen is first assembled statically and then compressed.
Flow logic:
CALL SUBSCREEN <subscreen> INCLUDING 'SAPLSZA5' '0900'
call function modules ADDR_PERS_COMP_EXP_SUBSCREEN, ADDR_PERS_COMP_IMP_SUBSCREEN, ADDR_PERS_COMP_EXIT_SUBSCREEN (see example below).

Saving, number assignment and registration and deletion of uses: see above

No authorization check is made. Usually the calling application checks the object of which the address is an attribute.

The status SAPLSZA5 ADDR0900 serves as a reference for the address management function codes which can be included in the main menu if there is still a menu entry free. The status cannot currently be included as a submenu for technical reasons.

The function module ADDR_PERS_COMP_EXP_SUBSCREEN must be called before the main screen (or in the main screen PBO, although the calling program may then not be able to react appropriately to exceptions).

The function module ADDR_PERS_COMP_EXIT_SUBSCREEN must be called in a PAI module at the event AT EXIT-COMMAND (Cancel, F12), to determine whether there are unsaved data in the address management, and to tell the address subscreen to continue with unchecked data if the user cancelled the confirmation prompt in POPUP_TO_CONFIRM_LOSS_OF_DATA. This applies if the address subscreen is part of a screen which is not a modal dialog box (popup).

If the subscreen is part of a modal dialog box (popup)(e.g. the order delivery address ), do not call the function module ADDR_PERS_COMP_EXIT_SUBSCREEN. You do not need to determine whether data has been changed because no confirmation prompt is sent, and the subscreen could be called again after cancellation with the same address (e.g. the same address number in several document items). Data entered but discarded by cancellation must not be displayed again.

The main screen OK code must be passed to the subscreen in PAI before it is processed if it is relevant for the address subscreen.

Call the function module ADDR_PERS_COMP_SUB_SET_OKCODE at the beginning of PAI.

The OK codes for the address subscreen all begin with the dollar sign '$'.

If the chosen OK code does not start with '$', the OK code $CHC ('CHECK') must also always be passed to the function module ADDR_PERS_COMP_SUB_SET_OKCODE instead. The address data are then copied into the local memory of the function group SZA0 and a general data check is made. This always applies, e.g. for Enter (check, refresh, continue, copy), but also for most main object processing functions, which can usually only proceed when all checks including the address check were successful. If $CHC or another $ OK code, the user entries in the address subscreen are not copied.

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

The function module ADDR_PERS_COMP_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_DATAW is important for the dialog flow. The value 'X' for this flag means that the address check found an error, which is output by the address subscreen with an S message. In this case, the application program must process the screen again, without PAI processing (e.g. "SET SCREEN SY-DYNNR. LEAVE SCREEN." in the PAI module) so that this message is not overwritten.

Addresses must be locked and unlocked by the application using the function modules ADDR_PERSON_ENQUEUE and ADDR_PERSON_DEQUEUE respectively.

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

Requirements

The SZA0 function group documentation contains information about general terms used in Business Address Services.

Output

Example

Subscreen:

Call ADDR_PERS_COMP_EXP_SUBSCREEN before calling the main screen (e.g im PAI of the previous screen)

PROCESS BEFORE OUTPUT. "main screen
MODULE PBO_MODULE.
CALL SUBSCREEN SUB1 INCLUDING 'SAPLSZA5' '0900'.
*
PROCESS AFTER INPUT.
MODULE EXIT_MODULE AT EXIT-COMMAND. "ADDR_PERS_COMP_EXIT_SUBSCREEN
MODULE SET_OK_CODE. "ADDR_PERS_COMP_SUB_SET_OKCODE
CALL SUBSCREEN SUB1.
MODULE PAI_MODULE. "ADDR_PERS_COMP_IMP_SUBSCREEN






PERFORM Short Reference   General Data in Customer Master  
This documentation is copyright by SAP AG.

Length: 8325 Date: 20240601 Time: 103452     sap01-206 ( 146 ms )