Start of Content Area

Process documentation Creation of Addresses  Locate the document in its SAP Library structure

Prerequisites

See Maintenance of Addresses.

Process Flow

  1. Define a new handle for the address:

Note

The glossary of the documentation for function group SZA0 contains a recommendation concerning the convention according to which you should set up your handle.

  1. If required, lock your application objects and the associated address/person (see also: Notes on Lock Management).
  2. If you use a BAS standard dialog, set the access mode to CREATE when you call the dialog. Otherwise, you use the function module <type>_INSERT that is appropriate for the address type (see function module overview in Working with the BAS). In both cases, you pass the handle that you defined in the first step to the BAS.
  3. Note

    If you want to enter more than one address (before saving the data to the database), start again with step one.

    Note

    There are function modules for address type 2 and 3 that you can use to create an entirely new address or maintain additional address data for a person.

    Having entered and checked the address and application data, you convert the address/person handle into an address/person number:

  4. Fill a structure of type ADDR_REF for the where-used list of the address and assign an address number using function module ADDR_NUMBER_GET.
  5. If you use an address of type 2 or 3, also fill a structure of type PERS_REF for the where-used list of the person. You assign the person number using function module ADDR_PERSON_NUMBER_GET.
  6. You now update the address data together with the application data.

  7. Fill the fields that contain the address/person references (in your application table) with the numbers assigned and save your application data.
  8. If on account of your dialog handling, you can change only one address, call function module ADDR_SINGLE_SAVE. In all other cases, you have to use function module ADDR_MEMORY_SAVE. Then use COMMIT WORK to update the address data together with the application data.
  9. Note

    You can use function modules ADDR_MEMORY_PUSH, ADDR_MEMORY_POP and ADDR_MEMORY_RESTORE to implement an undo function. You use ADDR_MEMORY_CLEAR to initialize the local memory.

  10. If you have set any locks in the second step, do not forget to remove them.

 

Result

Depending on the address type, you find the saved address records and the associated where-used lists in the corresponding tables.

 

 

 

 

End of Content Area