Creation of Addresses

Use

Prerequisites

See Maintaining Addresses

Process

  1. Define a new handle for the address:

    • Address type 1: An address handle

    • Address type 2: An address and a person handle

    • Address type 3: A person handle (and an address handle if the company address does not yet exist)

  2. If required, lock your application objects and the associated address/person (see also: Notes on Lock Management).

  3. 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.

  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.

    You now update the address data together with the application data:

  6. Fill the fields that contain the address/person references (in your application table) with the numbers assigned and save your application data.

  7. 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.

  8. 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.