Address Paramters
Use
Specific reference structures are defined for address parameters in BAPIs. You should copy these structures to use in your BAPI, especially if the underlying object type uses the central address management (CAM).
Use one of the following structures as a copy reference for addresses in BAPIs:
|
Reference Structure |
Use |
|---|---|
|
BAPIADDR1 |
Addresses of companies and organizations |
|
BAPIADDR2 |
Addresses of individuals |
|
BAPIADDR3 |
Addresses of contact persons within an organization |
|
BAPIADDR1X |
Change reference structures for addresses of companies and organizations |
|
BAPIADDR2X |
Change reference structures for addresses of individuals |
|
BAPIADDR3X |
Change reference structures for contact persons within an organization |
Keep in mind the following points when you use these reference structures:
-
All the fields of the reference structures refer to the central address management (UWL). Only use fields that can also be processed in your application context. If the UWL is already included, then all the fields are relevant.
-
Contrary to the standard guidelines, for some coded name parts the text formats (for example, CHAR 20 or CHAR 39) are included as fields in these structures, rather than the internal database keys.
These fields are:
-
Address text (fields TITLE_P, TITLE and FORMOFADDRESS)
-
Academic title (fields TITLE_ACA1 and TITLE_ACA2)
-
Name prefixes, for example "von", "van der" (fields PREFIX1 and PREFIX2)
-
Names affixes, for example, titles (field TITLE_SPPL)
You cannot expect in these cases that a calling program converts the internal database keys into the external readable form and vice versa. In these cases you can use the function modules below which enter values in these structures or accept changes made to the structures and then assign the correct keys internally.
|
Function module |
Meaning |
|---|---|
|
ADDR_CONVERT_FROM_BAPIADDR1 |
Converts the fields in the structure from the internal format into the external format. |
|
ADDR_CONVERT_TO_BAPIADDR1 |
Converts the fields in the structure from the external format into the internal format. |
|
ADDR_CONVERT_FROM_BAPIADDR2 |
Converts the fields in the structure from the internal format into the external format. |
|
ADDR_CONVERT_TO_BAPIADDR2 |
Converts the fields in the structure from the external format into the internal format. |
|
ADDR_CONVERT_FROM_BAPIADDR3 |
Converts the fields in the structure from the internal format into the external format. |
|
ADDR_CONVERT_TO_BAPIADDR3 |
Converts the fields in the structure from the external format into the internal format. |
-
If fields are lengthened in the UWL, the associated field in the BAPI reference structure remains the same type and length. A new data element is assigned to this field that can be identified as obsolete in the description and/or short text. The obsolete field is still taken into account in the conversion modules described above.
For the new field length a new field with a new name is added to the end of the structure. Currently this affects the following fields:
|
Existing Field |
Length |
New Field |
Length |
In Structure |
|---|---|---|---|---|
|
FORMOFADDR |
Char 20 |
TITLE |
Char 30 |
BAPIADDR1 |
|
BUILDING |
Char 10 |
BUILD_LONG |
Char 20 |
BAPIADDR1, BAPIADDR2, BAPIADDR3 |
|
STREET |
Char 40 |
STREET_LNG |
Char 60 |
BAPIADDR1 |
Preferably, you should use the new, longer fields.
-
When using the reference structure BAPIADDR3, remember that read-only access is possible to all the fields in the company's address (check table ADRC). If you want to make changes to these fields you have to access the reference structure BAPIADDR1.