SAP Function ADDRESS_INTO_PRINTFORM - Address Format According to Post Office Guidelines

Parameter Reference Type Length Default Optional Text
ADDRESS_1 ADRS1 u 767 X Transfer structure: Address data (type 1)
ADDRESS_2 ADRS2 u 687 X Transfer structure: Address data (type 2)
ADDRESS_3 ADRS3 u 957 X Transfer structure: Address data (type 3)
ADDRESS_HANDLE SZAD_FIELD-HANDLE C 140 SPACE X
ADDRESS_NUMBER ADRC-ADDRNUMBER C 10 SPACE X Address number (data is read directly)
ADDRESS_TYPE SZAD_FIELD-ADDR_TYPE C 1 SPACE X Address type: 1,2,3 or ' '(default)
ADRSWA_IN ADRS u 1466 X Structure: Address data/control parameter (type ' ')
COUNTRY_NAME_IN_RECEIVER_LANGU SZAD_FIELD-FLAG C 1 SPACE X Flag: Output country in recipient language
IS_BUPA_TIME_DEPENDENCY ADBUPA_TD u 39 SPACE X Transfer Structure for Time Dependency BUT000
IV_LANGU_CREA T002-SPRAS C 1 SPACE X Language Key
IV_NATION ADRC-NATION C 1 SPACE X International Version for Formatting
IV_NATION_SPACE T_BOOLE 0 SPACE X Flag: Use international version SPACE in all cases
IV_PERSON_ABOVE_ORGANIZATION T_BOOLE 0 SPACE X Print Person Above Organization
LANGUAGE_FOR_COUNTRY_NAME T002-SPRAS C 1 SPACE X Country name language
LINE_PRIORITY SZAD_FIELD-PRIORITY C 25 SPACE X Line suppresion sequence
NO_UPPER_CASE_FOR_CITY SZAD_FIELD-FLAG C 1 SPACE X Flag: No upper case letters for District and Country
NUMBER_OF_LINES ADRS-ANZZL P 2 10 X Max. line length for the formatting (type 1,2,3)
PERSON_HANDLE SZAD_FIELD-HANDLE C 140 SPACE X
PERSON_NUMBER ADRP-PERSNUMBER C 10 SPACE X Person number (data are read directly)
RECEIVER_LANGUAGE T002-SPRAS C 1 SPACE X Recipient language (for type 1,2,3)
SENDER_COUNTRY SZAD_FIELD-SEND_CNTRY C 3 SPACE X Sender country (for type 1,2,3) - important !
STREET_HAS_PRIORITY SZAD_FIELD-STREETPRIO C 1 SPACE X Flag: Street has priority over PO Box

Parameter Reference Type Length Text
ADDRESS_DATA_CARRIER SZAD_FIELD-ADDR_DC C 80 Data carrier address (type 1,2,3)
ADDRESS_DATA_CARRIER_0 SZAD_FIELD-ADDR_DC C 80 Second line for the data medium (type 1,2,3)
ADDRESS_NOT_FOUND SZAD_FIELD-FLAG C 1 Address not found (when entering address no.)
ADDRESS_PRINTFORM ADRS_PRINT u 800 Formatted address (type 1,2,3)
ADDRESS_PRINTFORM_TABLE SZADR_PRINTFORM_TABLE 0 Formatted address in table form
ADDRESS_SHORT_FORM SZAD_FIELD-ADDR_SHORT C 80 Short form of the formatted address (type 1,2,3)
ADDRESS_SHORT_FORM_S SZAD_FIELD-ADDR_SHORT C 80 Short form incl. street (type 1,2,3)
ADDRESS_SHORT_FORM_WO_NAME SZAD_FIELD-ADDR_SHORT C 80 Short Form Street and City (Type 1,2,3)
ADRSWA_OUT ADRS u 1466 Transfer record: formatted address (type ' ')
EV_NATION ADRC-NATION C 1 Actual version used if IV_NATION was transmitted
NAME_IS_EMPTY SZAD_FIELD-FLAG C 1 Flag: Name fields empty, no formatting
NUMBER_OF_USED_LINES ADRS-ANZZL P 2 Number of lines occupied (type 1,2,3)

Functionality
The Function module ADDRESS_INTO_PRINTFORM formats an address forprinting.
It formats a correct postal address with the required number of linesfrom your input.
It also returns a one-line short address (name and city) and a one-lineshort address for the data carrier (payment without document by datacarrier exchange (DCE)).
A number of country-specific formats are supported which correspond tothe postal regulations of recipient countries.
These are based on various national and international guidelines andnorms, including:
ISO 11180,
World postal association contracts (Seoul 1994),
World postal association international address templates
and various national guidelines.
An overview of the country-specific layout formats which are currentlysupported is given below.
Customers can program their own format routines via a customer exitusing the SAP enhancement SZAD0001 in the package SZAD (transactionCMOD).

Control Parameters
See also the parameter documentation.
ADDRESS_TYPE - Address type (from 3.0C)
There are three types of address:
Address type '1': addresses of firms or organizations; the addressstructure which is used in most SAP applications as 'Address'.
Address type '2': address of a person
Address type '3': work address, usually the address of a contact personin a company
The default value SPACE for the address type is handled like type '1',and is needed for the upwards-compatibility of the function module.
Which parameters are used for which address type is explained in theADDRESS_TYPE parameter documentation.
The three character "address layout key" of the recipient country(LAND1) controls which of the available country-specific routines isused to format addresses for the country in question. This key is storedin field T005-ADDRS and is entered in Customizing under Global settings-> Set countries -> Define countries, on the detail screen under"Address layout key".
Keys for customer routines in the SAP enhancement SZAD0001 can bemaintained via the transaction SM30 (extended table maintenance),tablename T005A, in the customer name range, and be assigned in countrycustomizing.
The address attributes are passed in the structures ADDRESS1 (type 1),ADDRESS2 (type 2), ADDRESS3 (type 3) or ADRSWA_IN (type SPACE).
NUMBER_OF_LINES (ADRSWA_IN-ANZZL)
The number of lines available for the address layout. If the number oflines is not sufficient for the complete layout of an address, thenlines are consecutively suppressed according to the rules of the countryin question. Use the parameter LINE_PRIORITY (ADRSWA_IN-PRIOR) overrulesthe standard sequence in which the output lines are to be suppressed.
LINE_PRIORITY (ADRSWA_IN-PRIOR)
If not equal to SPACE, this field overwrites the standard sequence inwhich the lines are suppressed if the available number of lines ANZZL isinsufficient.
The standard sequence is defined as follows:
Type 1: 'AP43HRT7I86LC2BS5O' (GB: 'APRT4327I86CBS5LO')
Type 2: 'APHRT7I86LCBS5O' (GB: 'PRT7I86CBS5LO')
Type 3: 'APF43HR7I86TLC2BSND5O' (GB: 'APRT4327I86CBS5LNDIO')
where (if they occupy a line of their own):
A = Title
P = Mandatory empty line 1
F = Function of the contact person in the company
4 = Name 4
3 = Name 3
H = Different city
R = Region
T = District
L = Name of country
C = Postal code
T = District
7 = Street 3 (field STR_SUPPL2)
I = Street 5 (field LOCATION)
8 = Street 4 (field STR_SUPPL3)
6 = Street 2 (field STR_SUPPL1)
L = Country
C = Postal code
2 = Name 2
B = PO Box
S = Street or PO Box
5 = c/o name
N = Name (and title) of a person
D = Department
O = City
Which of these attributes are available for maintenance can vary. Allfields exist in Business Address Services.
STREET_HAS_PRIORITY (ADRSWA_IN-WAREN)
'X': Street has priority over PO Box (delivery address for example)
' ': PO Box has priority over street. This is the default value.
SENDER_COUNTRY (ADRSWA_IN-INLND)
Country key of the sender country so that you can determine whether theaddress is domestic or foreign.
RECEIVER_LANGUAGE (ADRSWA_IN-SPRAS)
Recipient language (if different from the country language for thedestination country; example Switzerland)
COUNTRY_NAME_IN_RECEIVER_LANGUAGE
Use recipient language for the country code flag.
LANGUAGE_FOR_COUNTRY_NAME
Explicit specification of a permanent language for the country code(e.g. always English for customs transit papers).
NO_UPPER_CASE_FOR_CITY
The letters in the City and Country in foreign addresses are not to beoutput in upper-case letters (as specified in the international postguidelines). Their case is unchanged (e.g. for outputting the addresslines in a text string).
ADDRESS_NUMBER
Address number for addresses with an other character set version in thecentral address table SADR (Japan). If the parameter is set, thisaddress is read and formatted instead of the actual address (e.g. of acustomer).

Return parameters
The formatted address is returned in the 10 fields LINE0 to LINE9 ofreturn structure ADDRESS_PRINTFORM (or the structure ADRSWA_OUT foraddress type SPACE).
A one line short address, consisting of Name and City, is returned inthe parameter ADDRESS_SHORT_FORM (field ADRSWA_OUT-LINEK). The format isNAME1 / City (of the formatted address).
Similarly, ADDRESS_SHORT_FORM_S is a single-line short address with theformat Name / Street / City.
The two-line short address for the data carrier is returned in theparameters ADDRESS_DATA_CARRIER and ADDRESS_DATA_CARRIER_0 (in the fieldADRSWA_OUT-LINED and ADRSWA_OUT-LINED0).
The parameter ADDRESS_DATA_CARRIER (field ADRSWA_OUT-LINED) usuallycomprises the postal code, City and country code, the parameterADDRESS_DATA_CARRIER_0 (field ADRSWA_OUT-LINED0) is identical to theaddress line which contains the street or PO Box.
NUMBER_OF_USED_LINES (ADRSWA_OUT-ANZZL)
The number of lines used for the address is returned here.
NAME_IS_EMPTY
Return code which indicates that no formatting has been performedbecause some name fields were not filled.
ADDRESS_NOT_FOUND
Return code which indicates that the address was not found in the BASdatabase tables when the address number (address and person number foraddress types 2/3) was transferred.

Business Add-In ADDR_PRINTFORM_SHORT
The Business Add-In ADDR_PRINTFORM_SHORT is country-independent. Itoverrides the short forms (ADDRESS_SHORT_FORM, ADDRESS_SHORT_FORM_S andADDRESS_SHORT_FORM_WO_NAME) and the data carrier (ADDRESS_DATA_CARRIERund ADDRESS_DATA_CARRIER_0).

General formatting rules
INCLUDE 'ADDRESS_PRINTFORM_RULES' OBJECT DOKU ID TX

Overview of the currently implemented country-specific formats
INCLUDE 'ADDRESS_COUNTRY_PRINTFORM' OBJECT DOKU ID TX

Description
This line is part of the two-line data medium address. The line is thesame as the address line which contains Street or PO Box.

Description
This parameter has the value 'X' if the address was not found in theBusiness Address Services database tables when the address number(address and person number for address type 2/3) was entered.

Description
The formatted address is returned in an internal table. LINE_TYPEspecifies the line type (Name, City, Street, etc.) per line.

Value range
The values for LINE_TYPE are the constants of the domain AD_LINE_TP.
This parameter is only used in address type SPACE.
The formatted address is returned in the 10 fields LINE0 to LINE9 inthereturn structure ADRSWA_OUT.
A one-line short address comprising Name and City is returned in thefield LINEK. The format is NAME1 / City line (from the formattedaddress).
A one-line short address for "Payment without documents by data carrierexchange (DCE)" is returned in the field LINED. This usually comprisesPostal code, City and Country, and is formatted country-specifically.

Description
The address fields (Name, Street, City, etc.) for formatting can eitherbe passed in the appropriate structure (ADDRESS1/2/3 or ADRSWA_IN), orbe read from the Business Address Services database tables, if thisaddress is there, using the address key.
To read the database tables, the key is:

  • for address type 1: ADDRESS_NUMBER

  • for address type 2: ADDRESS_NUMBER and PERSON_NUMBER

  • for address type 3: ADDRESS_NUMBER and PERSON_NUMBER

  • If the sender or recipient country is Japan, there is another specialcaese for address type 1 or SPACE, in which the ADDRESS_NUMBER is used:
    For customers, vendors or banks, an additional character set version ofthe address can be put in the table SADR (in the master datatransaction menu under Extras -> Address versions). If the parameterADDRESS_NUMBER is set and no address was found for this number in theCentral Address Management (new table ADRC from 4.0), the character setversion with the specified address number is read in the table SADR andformatted instead of the standard address.
    This function is currently only supported for mail to or from Japan.
    The appropriate version flag must be put in the SAP Include LSADRI00for the address for the parameter ADDRESS_NUMBER to be found in theaddress table SADR.

    Description
    There are three address types:

    • Address type '1': 'Normal' address (company or organization); the
    • address structure used in most SAP applications as 'Address'.
      • Address type '2': Address of a person

      • Address type '3': Work address, usually the address of a contact person
      • in a company
        The default address type SPACE is treated as type '1' and is requiredfor the upwards compatibility of the function module.
        The interface parameters ADRSWA_IN and ADRSWA_OUT are only used inaddress type SPACE.
        The other address types use:
        ADDRESS_1 or ADDRESS_2 or ADDRESS_3 for the attributes, and
        SENDER_COUNTRY, RECEIVER_LANGUAGE, NUMBER_OF_LINES, STREET_HAS_PRIORITYand LINE_PRIORITY for control.
        The parameters COUNTRY_NAME_IN_RECEIVER_LANGU,LANGUAGE_FOR_COUNTRY_NAME and NO_UPPER_CASE_FOR_CITY are addresstype-independent.
        The address attributes can be read directly instead of being passed inthe structures ADDRESS1/2/3, if the address is in the Central AddressManagement tables.
        The Business Address Services keys must be passed instead of thestructures ADDRESS1/2/3:
        Address type 1: ADDRESS_NUMBER
        Address type 2: ADDRESS_NUMBER and PERSON_NUMBER
        Address type 3: ADDRESS_NUMBER and PERSON_NUMBER
        The following parameters are used (Import) or filled (Export):
        Address type 1
        • Import parameters:

        • ADDRESS_1
          ADDRESS_TYPE
          ADDRESS_NUMBER
          SENDER_COUNTRY
          RECEIVER_LANGUAGE
          NUMBER_OF_LINES
          STREET_HAS_PRIORITY
          LINE_PRIORITY
          COUNTRY_NAME_IN_RECEIVER_LANGU
          LANGUAGE_FOR_COUNTRY_NAME
          NO_UPPER_CASE_FOR_CITY
          • Export parameters:

          • ADDRESS_PRINTFORM
            ADDRESS_SHORT_FORM
            ADDRESS_SHORT_FORM_S
            ADDRESS_DATA_CARRIER
            ADDRESS_DATA_CARRIER_0
            NUMBER_OF_USED_LINES
            NAME_IS_EMPTY
            ADDRESS_NOT_FOUND
            ADDRESS_PRINTFORM_TABLE
            Address type 2
            • Import parameters:

            • ADDRESS_2
              ADDRESS_TYPE
              ADDRESS_NUMBER und PERSON_NUMBER
              SENDER_COUNTRY
              RECEIVER_LANGUAGE
              NUMBER_OF_LINES
              STREET_HAS_PRIORITY
              LINE_PRIORITY
              COUNTRY_NAME_IN_RECEIVER_LANGU
              LANGUAGE_FOR_COUNTRY_NAME
              NO_UPPER_CASE_FOR_CITY
              • Export parameters:

              • ADDRESS_PRINTFORM
                ADDRESS_SHORT_FORM
                ADDRESS_SHORT_FORM_S
                ADDRESS_DATA_CARRIER
                ADDRESS_DATA_CARRIER_0
                NUMBER_OF_USED_LINES
                NAME_IS_EMPTY
                ADDRESS_NOT_FOUND
                ADDRESS_PRINTFORM_TABLE
                Address type 3
                • Import parameters:

                • ADDRESS_3
                  ADDRESS_TYPE
                  ADDRESS_NUMBER und PERSON_NUMBER
                  SENDER_COUNTRY
                  RECEIVER_LANGUAGE
                  NUMBER_OF_LINES
                  STREET_HAS_PRIORITY
                  LINE_PRIORITY
                  COUNTRY_NAME_IN_RECEIVER_LANGU
                  LANGUAGE_FOR_COUNTRY_NAME
                  NO_UPPER_CASE_FOR_CITY
                  • Export parameters:

                  • ADDRESS_PRINTFORM
                    ADDRESS_SHORT_FORM
                    ADDRESS_SHORT_FORM_S
                    ADDRESS_DATA_CARRIER
                    ADDRESS_DATA_CARRIER_0
                    NUMBER_OF_USED_LINES
                    NAME_IS_EMPTY
                    ADDRESS_NOT_FOUND
                    ADDRESS_PRINTFORM_TABLE
                    Address type SPACE (default value; the previous interface up to Release3.0B):
                    • Import parameters:

                    • ADRSWA_IN
                      ADDRESS_TYPE
                      ADDRESS_NUMBER (only for special cases such as Japan)
                      COUNTRY_NAME_IN_RECEIVER_LANGU
                      LANGUAGE_FOR_COUNTRY_NAME
                      NO_UPPER_CASE_FOR_CITY
                      • Export parameters:

                      • ADRSWA_OUT
                        NAME_IS_EMPTY
                        ADDRESS_PRINTFORM_TABLE
                        The following parameters correspond to each other (on the left theindividual parameter - on the right the fields in the old interfacestructures ADRSWA_IN and ADRSWA_OUT):
                        ADDRESS_NUMBER - no equivalent
                        PERSON_NUMBER - no equivalent
                        SENDER_COUNTRY - ADRSWA_IN-INLND
                        RECEIVER_LANGUAGE - ADRSWA_IN-SPRAS
                        NUMBER_OF_LINES - ADRSWA_IN-ANZZL
                        STREET_HAS_PRIORITY - ADRSWA_IN-WAREN
                        LINE_PRIORITY - ADRSWA_IN-PRIOR
                        COUNTRY_NAME_IN_RECEIVER_LANGU - no equivalent
                        LANGUAGE_FOR_COUNTRY_NAME - no equivalent
                        NO_UPPER_CASE_FOR_CITY - no equivalent
                        ADDRESS_SHORT_FORM - ADRSWA_OUT-LINEK
                        ADDRESS_SHORT_FORM_S - no equivalent
                        ADDRESS_DATA_CARRIER - ADRSWA_OUT-LINED
                        ADDRESS_DATA_CARRIER_0 - ADRSWA_OUT-LINED0
                        NUMBER_OF_USED_LINES - ADRSWA_OUT-ANZZL
                        NAME_IS_EMPTY - no equivalent
                        ADDRESS_NOT_FOUND - no equivalent
                        ADDRESS_PRINTFORM_TABLE - no equivalent
                        The parameters are described in the parameter documentation.

                        Value range
                        Possible values are 1,2,3 and SPACE (see above)

                        Default
                        SPACE.
                        This parameter is only used in address type SPACE.
                        All address attributes and the following control fields are passed inthe structure ADRSWA_IN:
                        ANZZL
                        Number of lines available for formatting the address. If this number oflines is not sufficient to completely format an address, lines aresuccessively suppressed according to national rules. The field PRIORcan overrule the standard output line suppression sequence.
                        PRIOR
                        If not SPACE, this field overrules the standard line suppressionsequence when the number of lines in ANZZL is not sufficient.
                        WAREN
                        'X': Street has priority over PO Box (e.g. delivery address)
                        ' ': PO Box has priority over Street
                        INLND
                        Country key of sender country, for determining whether the address isdomestic or foreign.

                        Description
                        This parameter specifies the country output language for a foreignaddress. Otherwise, the sender country language is used.

                        Default
                        SPACE. The parameter is optional.

                        Description
                        International post guidelines specify that the city and country inforeign addresses are output in upper case.
                        This parameter can insist that they are output with the case unchanged.This can be necessary, e.g. if the address lines are to be output in acharacter string.

                        Value range
                        The following values are possible:
                        'X' - no conversion to upper case.
                        SPACE - city and country in foreign addresses are converted to uppercase.

                        Default
                        SPACE.

                        Description
                        See ADDRESS_NUMBER parameter documentation

                        Description
                        This parameter is used in address types 1, 2, and 3.
                        It determines the language in which literals are output. This currentlyonly applies to the word 'PO Box'.

                        Value range
                        All language keys defined in the SAP System are valid (language tableT002).

                        Default
                        SPACE. The recipient country language is used.

                        Example
                        Switzerland has several language regions, but the SAP country tableonly contains one language per country.

1578535MIRO: Using the international address version
1109142City district is not printed
839466Template for implementing Customer Exit SZAD0001
1425517LAW 2005: Address w/ district (BAdI example implementation)
1140526Form of address and Academic Title displayed on same line.
614663BP_ADU: Addresses in overview indistinguishable
940504Manual address: No address display in overview screen II
773320Name of employee responsible is not displayed
734660International address versions: Smart Form LE_SHP_DELNOTE
795147Country names in T005T-LANDX50
639035Japanese Address Screen Layout Release Information
146050Address data on dunning notices is incorrect or incomplete
847446SZRS0003: Name not displayed in Address Print Preview
316331International address versions
751345MIRO: Japanese address screen layout is incorrect
821029Format of Japanese postal codes
622966Korean address format: Street fields 2 to 5
734669Address format for Germany: District
790309CORR: No country name in the address format
804255HR_MAKE_ADDRESS does not work with customized address format
784080Formatting switches Irish address lines 3 and 4
610289International address versions always used in sales orders
748584HR_MAKE_ADDRESS:New address format "113" for Japan
444054Country name in table T005T is too short
670034BP_ZZZ: Incorrect formatting of addresses
677072RFZALI20: Japanese address screen layout incorrect
660897ENJOYSAP: Japanese address screen layout incorrect
35931Collective note: Formatting/printing addresses
622508Address formatting for Austria: Place of residence
29062Switzerland: 'PO Box' in address is always German
594894Office correspondence: Domestic address with country ID
399851Address in remuneration statement
337281Use of international address version for plants
140130Illegible character in address
376206Incorrect address display in FB60 and FB70
317265Japan address format printing by other countries