To access an address, you can identify it using either:
- The address handle that you have passed to BAS, or
- The address number that you assigned before you saved the address.
You then pass either the handle or the number to the function module (the interface supports both methods).
The prerequisites described in Maintenance of Addresses apply.
If required, lock your application objects and the associated address/person (see also: Notes on Lock Management).
If you use a BAS standard dialog, set the access mode to CHANGE when you call the dialog. Otherwise, you use the function module <type>_GET that is appropriate for the address type (see function module overview in Working with the BAS). In both cases, you pass the associated address/person number. The dialog displays the current address data, whereas the function module returns a structure with the current data.
If you want to change more than one address (before saving the data to the database), start again with step one.
Having changed and verified the address and application data, you update the data together with the application data:
If you did not use a dialog, you use the function module <type>_UPDATE that is appropriate for the address type to pass the address data changed.
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.
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.
If you have set any locks in the first step, do not forget to remove them.
Depending on the address type, you find the address records changed in the corresponding tables.