SAP Function ADDRESS_SHOW_PRINTFORM - Display a formatted address in a popup

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 for special cases (Japan; type 1,SPACE)
ADDRESS_TYPE SZAD_FIELD-ADDR_TYPE C 1 SPACE X Address type: 1,2,3 or ' '(default)
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
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
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
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)
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_NOT_FOUND SZAD_FIELD-FLAG C 1
ADDRESS_PRINTFORM ADRS_PRINT u 800 Formatted address (type 1,2,3)
ADDRESS_SHORT_FORM SZAD_FIELD-ADDR_SHORT C 80 Short form of the formatted address (type 1,2,3)
EV_EXIT_CAUSED_BY_CALLER CHAR1 C 1 Delete list in CALLBACK_USER_COMMAND
EV_EXIT_CAUSED_BY_USER SLIS_EXIT_BY_USER 0 How the user left the list
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.
The address is formatted according to your entries and postalguidelinesin the correct number of lines. A one-line short address(name and city) and a one-line short address for the data carrier(payment without documents per data carrier exchange (DCE)) are alsoreturned.
Country-specific formats, which depend on the recipient land, aresupported.
These are based on international address formats from the officialFederal German Post Office postal code book.
An overview of the currently-implemented country-specific formatsfollows below.
Customers can program their own formatting routines in Customer exitsusing the SAP enhancement SZAD0001 in the development class SZAD (->transaction CMOD).

Control parameters
See also the appropriate parameter documentation.
ADDRESS_TYPE - Address type (from 3.0C)
There are three different address types:
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 living person
Address type '3': company address, usually the address of a contactperson in a company
The default value SPACE for the address type is handled as type '1' andis required for the upwards-compatibility of the function module.
Address type SPACE uses the interface parameters ADRSWA_IN, ADRSWA_OUTand ADDRESS_NUMBER, the other address types use the remaining interfaceparameters and ADDRESS_NUMBER.
The following parameters correspond:
ADDRESS_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
NUMBER_OF_USED_LINES - ADRSWA_OUT-ANZZL
NAME_IS_EMPTY - no equivalent
The meanings of the parameters are explained in the parameterdocumentation.
The three-character recipient country "
Address format key" (LAND1) controls which of the existingcountry-specific address formatting routines in that country is to beused. This key is in the field T005-ADDRS, and is entered incustomizing in the detail screen of Global settings -> Countries ->Define countries under "Address format key".
Keys for user 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 adress attributes are passed in the structures ADDRESS1 (type 1),ADDRESS2 (type 2), ADDRESS3 (type 3) or ADRSWA_IN (type SPACE)depending on the address type.
NUMBER_OF_LINES (ADRSWA_IN-ANZZL)
Number of lines available for the address format. If the number oflinesis not enough for the complete address format, lines areconsecutively suppressed, according to the rules of the country. Theparameter LINE_PRIORITY (ADRSWA_IN-PRIOR) overrules the standardline-suppression sequence.
LINE_PRIORITY (ADRSWA_IN-PRIOR)
If not SPACE, this field overrules the standard line-suppressionsequence when the number of lines available ANZZL is insufficient.
The standard sequence is as follows:
Type 1: 'AP43RTLC2BSIO' (GB: 'APRT432CBSLIO')
Type 2: 'APRTLCBSIO' (GB: 'PRTCBSLIO')
Type 3: 'AP43RTLC2BSNDIO' (GB: 'APRT432CBSLNDIO')
where (if they occupy a line of their own):
A = title
P = compulsory empty line
4 = name 4
3 = name 3
R = region
T = district
D = department
L = country
C = postal code
2 = name 2
B = PO box
S = street or postbox
N = name (and title) of a living person
I = location
O = city
STREET_HAS_PRIORITY (ADRSWA_IN-WAREN)
'X': street has priority over PO box (e.g. delivery address)
' ': PO box has priority over street. This is the default value.
SENDER_COUNTRY (ADRSWA_IN-INLND)
Sender country key to determine whether the address is domestic orforeign.
RECEIVER_LANGUAGE (ADRSWA_IN-SPRAS)
Recipient language (if different from the language set for therecipient country; example Switzerland)
COUNTRY_NAME_IN_RECEIVER_LANGUAGE
Use recipient language for country name flag.
LANGUAGE_FOR_COUNTRY_NAME
Explicit specification of a language for the country name (e.g. alwaysEnglish for customs transit papers).
ADDRESS_NUMBER
Address number for the addresses for which there is an additionalcharacter set version in the central address table SADR (Japan). If theparameter is set, the address is reread and formatted instead of theactual address (e.g. customer).

Return parameters
The formatted address is returned in the 10 fields LINE0 - LINE9 of thereturn structure ADDRESS_PRINTFORM (or the structure ADRSWA_OUT).
A one-line short address consisting of the name and city is returned inthe parameter ADDRESS_SHORT_FORM (field ADRSWA_OUT-LINEK). The formatis NAME1/city (from the formatted address).
A one-line data carrier short address is returned in the parameterADDRESS_DATA_CARRIER (in the field ADRSWA_OUT-LINED). This usuallyconsists of the postal code, city and country ID, formattedcountry-specifically.
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 was performed becausesome name fields were not filled.

General formatting rules
INCLUDE 'ADDRESS_PRINTFORM_RULES' OBJECT DOKU ID TX
It is intended to take account of other internationally-required,(above all in Asia) address attributes such as street supplement,building, floor, room.

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

Description
Address number for the addresses for which an additional character setversion is stored in the address table SADR (Japan). If the parameteris filled, the character set version is checked and instead the actualaddress (for example, of a customer) is formatted.
Currently, this is only supported when sending to or from Japan.
So that the address for parameter ADDRESS_NUMBER is found in theaddress file, the relevant version indicator must be made known bymodifying the SAP include LSADRI00.

Description
There are three types of address:
Address type '1': 'Normal' addresses (company or organization); is theaddress structure which is used as 'Address' in most SAP applications.
Address type '2': Address of a natural person
Address type '3': Office address, the address of a contact person in acompany
The default address type SPACE is handled as type '1' and is requiredfor the forward-compatibility of the function module.
Address type SPACE uses the interface parameters ADRSWA_IN, ADRSWA_OUT,ADDRESS_NUMBER and COUNTRY_NAME_IN_RECEIVER_LANGU, the other addresstypes use the remaining interface parameters and ADDRESS_NUMBER andCOUNTRY_NAME_IN_RECEIVER_LANGU.
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
    • Export parameters:

    • ADDRESS_PRINTFORM
      ADDRESS_SHORT_FORM
      ADDRESS_DATA_CARRIER
      NUMBER_OF_USED_LINES
      NAME_IS_EMPTY
      Address type 2
      • Import parameters:

      • ADDRESS_2
        ADDRESS_TYPE
        ADDRESS_NUMBER
        SENDER_COUNTRY
        RECEIVER_LANGUAGE
        NUMBER_OF_LINES
        STREET_HAS_PRIORITY
        LINE_PRIORITY
        COUNTRY_NAME_IN_RECEIVER_LANGU
        • Export parameters:

        • ADDRESS_PRINTFORM
          ADDRESS_SHORT_FORM
          ADDRESS_DATA_CARRIER
          NUMBER_OF_USED_LINES
          NAME_IS_EMPTY
          Address type 3
          • Import parameters:

          • ADDRESS_3
            ADDRESS_TYPE
            ADDRESS_NUMBER
            SENDER_COUNTRY
            RECEIVER_LANGUAGE
            NUMBER_OF_LINES
            STREET_HAS_PRIORITY
            LINE_PRIORITY
            COUNTRY_NAME_IN_RECEIVER_LANGU
            • Export parameters:

            • ADDRESS_PRINTFORM
              ADDRESS_SHORT_FORM
              ADDRESS_DATA_CARRIER
              NUMBER_OF_USED_LINES
              NAME_IS_EMPTY
              Address type SPACE (default value with the interface which was validuntil Release 3.0B):
              • Import parameters:

              • ADRSWA_IN
                ADDRESS_TYPE
                ADDRESS_NUMBER
                COUNTRY_NAME_IN_RECEIVER_LANGU
                • Export parameters:

                • ADRSWA_OUT
                  NAME_IS_EMPTY
                  The following parameters correspond to each other:
                  ADDRESS_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 -
                  noequivalent
                  NUMBER_OF_USED_LINES - ADRSWA_OUT-ANZZL
                  NAME_IS_EMPTY - no equivalent
                  The meaning of the parameters explained in the parameter documentation.

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

                  Default
                  SPACE

                  Description
                  Using this parameter, the language, in which the country name isoutputted (for a foreign address) can be set. Otherwise the language ofthe country of departure applies.

                  Default
                  The default value is SPACE because the parameter is optional.

                  Description
                  The parameter is used for address type 1, 2, and 3.
                  The parameter can be used to control in which language literals areoutputted. This currently only affects the word 'P.O. box'.

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

                  Default
                  The parameter is preallocated the value SPACE. In the case of thedefault, the language of the recipient country is determined instead.

                  Example
                  In Switzerland there are several languages (depending on region) thatSAP country tables recognize, but at first only one language is offeredfor each country.