Symptom
After creating a sales/billing document and printing it's output at header level, the fields "AddressLine1Text" until "AddressLine8Text" are behaving differently and printing different information in the same fields depending from the country of the customer selected.
Environment
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
- Go to Create Sales Orders - VA01
- Choose a sold to party from a customer which is located in US (Just an example, it could be any other country).
- See that in the output, we will have the address informations as City, Postal Region, and Country appearing.
- Now, choose a customer from another country (for Example: Egipt)
- See that now, the fields are printed without the region.
Cause
This behavior is determined based in the configuration made in the configuration activity Define Countries/Regions, more specifically in the field "Address layout key".
Resolution
If we press the button F1 in the specific field, we can check the entire logic explanation of how the system process each layout keys differently, it is possible to check all the behaviors in the explanation below:
Keep in mind that the configurations mentioned in the field via transaction codes and table names are not able to be accessed by customers in the SAP S/4HANA Cloud Public Edition environment.
Below we have the explanation for the initial 19 values of the field, the other values can be seen in the documentation attached in the "See Also" section.
Formatting routine key for printing addresses
For printing addresses, there are country-specific routines which in each case copy the correct postal formatting of the address.
The three-character "Address Layout Key" for the recipient country controls which of the routines available for formatting addresses in the relevant country is used.
These routines are programmed into the ADDRESS_INTO_PRINTFORM function module.
They are based on different national and international guidelines and norms, including:
- ISO 11180,
- contracts of the World Postal Union (Seoul 1994),
- international address samples from the World Postal Union
- as well as the available rules of the individual countries.
Below you will find an overview of the country-specific formats currently implemented.
General formatting rules
The following parameters are used depending on the transaction:
-
- whether the company address (street/house number) or the P.O. Box address is printed if both exist,
- how many lines are available for printing,
- which is the sender country.
If there are not enough lines, then lines are left out according to a standard sequence.
The address format depends on whether the sender country is the same as, or different from, the recipient country. The country is always specified from abroad, either as a text name, or as an identification code of up to three characters (license plate code or country key).
Where the country name is written out in full, it is written in the language of the sender country. If a language is not specified for the sender country, or the sender country itself is not specified, the logon language is used instead.
Exceptions: In the print program, you can use a parameter to override the language for the country name explicitly (for example, if the country name is always to be printed in a fixed language, for example English, for customs documents). If the indicator 'Print country name in recipient language' is set in the print program, the recipient language is used.
Other language-dependent components such as the title and the word 'PO Box' are printed in the recipient language or the recipient country language. If this cannot be determined, the logon language is used here as well.
For all formats except Great Britain (006), Japan (013), and South Korea (017), the core of the address is formatted as follows (without empty lines, except for the compulsory empty line:)
-
- title line (if applicable)
- name block (differs depending on the address type, see below)
- street address or PO Box
- (compulsory empty line, if applicable)
- city line with postal code
- country name (if applicable)
The city line and the country name are always printed in upper case for foreign addresses (only for the complete address, not for short forms).
The name block generally consists of the following:
"Regular" addresses (address type SPACE and address type 1):
-
- NAME1
- NAME2
- NAME3
- NAME4
Personal addresses (address type 2):
-
- Title of person and name of person
Business address with department and contact person (address type 3):
-
- NAME1
- NAME2
- NAME3
- NAME4
- Department
- Title of person and name of person
In addresses entered using Business Address Services (central address management), the street address can comprise several lines, otherwise street and house number are maintaied in the Street field.
Some countries do not have a compulsory empty line. The city and district are printed in the city line, connected by a hyphen (exceptions: 004 USA, 006 Great Britain/Ireland, 013 Japan, 015 Germany, 017 South Korea, 019 Denmark), provided that the total length does not exceed 35 characters. If a different city is specified for the PO Box (PFORT), this is used in the PO Box address.
In all formats that use a country code (currently 001 European standard format 002 Italy, 011 Switzerland, and 014 Austria ), the license plate code for that country is used. If this is not maintained, the country key in table T005 is used.
If the "Print country name in foreign addresses" indicator is set for the sender country in table 005, the country code is not used; the country name is printed in the last line of the address.
Formats 004 (USA), 005 (Canada), and 008 (Singapore) contain a line ('F') for the function of the contact person in the company (only if address type = '3'). This line comes immediately after the line 'N' (Name (and title) of the natural person).
In formats 002 (Italy), 004 (USA), 005 (Canada), 006 (Great Britain), 007 (Brazil), and Australia (009), the REGIO field (Region, State, Province, County) is formatted. For Italy, the USA, Canada, Brazil, and Australia, the key from table T005S is used; for Great Britain the text name from table T005U is used.
For all countries for which no "Address structure key" is maintained, a standard format is used, which corresponds to format "010".
Overview of the country-specific formats currently implemented
An example of a domestic and a foreign address is given for each address format.
"Short form" is the one-line short form of the address (with street). The short form without the street is formed by omitting the middle part.
"DME" is the one-line form for the data medium (payment transactions without documents per data medium exchange (DME)). The second line for the data medium is the same as the street line (street/house number or PO box) and is not displayed separately.
- 001: European standard address
(valid e.g. for Belgium, The Czech Republic, Denmark, Finland, France, Greece, Hungary, Iceland, Liechtenstein, Luxemburg, Monaco, Norway, Portugal, Russia, San Marino, The Slovak Republic, Slovenia, Sweden, Turkey and Vatican City).
Special features: The country name is only printed instead of the license plate code if the "Print country name in foreign addresses" flag is set for the sender country in the country table.
For Slovenia, the code "SI" is used instead of the license plate code "SLO", for San Marino and the Vatican the code "I" (for Italy) instead of "RSM" and "SCV" respectively.
Liechtenstein and Switzerland have a common post office with a uniform postal code system (they handle each other as domestic).
Examples:
Belgium as the sender country:
SAP Belgium SA
Bld., de la Woluwe 2
1150 Brussels
Short form: SAP Belgium SA / Bld., de la Woluwe 2 / 1150 Brussels
DME: 1150 Brussels
Italy as the sender country ("Print country name in foreign addresses" flag is not set):
SAP Belgium SA
Bld., de la Woluwe 2
B-1150 BRUSSELS
Short form: SAP Belgium SA / Bld., de la Woluwe 2 / B-1150 Brussels
DME B-1150 Brussels Belgium
USA as the sender country ("Print country name in foreign addresses" flag is set):
SAP Belgium SA
Bld., de la Woluwe 2
1150 BRUSSELS
BELGIUM
Short form: SAP Belgium SA / Bld., de la Woluwe 2 / 1150 Brussels
DME: 1150 Brussels Belgium
- 002: Italy
The format is the European standard address format with the region code at the end of the city line.
- 003: Netherlands
Special features: if the LOCATION (Street 5 / Location) field is filled, the field contents are output in a line of their own above the street line (in combination with a PO Box address it is not output).
The city is always in uppercase letters.
There are two spaces between the postal code and the city.
Example:
SAP Nederland B.V.
Bruistensingel 400
5232 AG S'HERTOGENBOSCH
SAP Nederland B.V.
Bruistensingel 400
5232 AG S'HERTOGENBOSCH
NETHERLANDS
Short form:
SAP Nederland B.V. / Bruistensingel 400 / 5232 AG s'Hertogenbosch
DME:
5232 AG s'Hertogenbosch
5232 AG s'Hertogenbosch Netherlands
- 004: USA
Special features: The city line format is
'City State (key from T005S) ZIP code'.
If the length of this formatted line is greater than 35 characters, the state and ZIP code are moved to the next line, which then has the format This is then in the format
"USA State ZIP code" (from abroad) or
"State ZIP code" (from within the USA).
There are two spaces between State and ZIP code.
The district is not in the output.
The ZIP code is output as entered, i.e. either the 5-character ZIP code or ZIP+4 code (with hyphen).
Example:
Superintendent of Documents
U.S.Government Printing
Office
Washington DC 20402-1575
Superintendent of Documents
U.S.Government Printing
Office
WASHINGTON DC 20402-1575
USA
Short form:
Superintendent of Documents / Washington DC 20402-1575
DME: Washington DC 20402-1575
Washington DC 20402-1575 USA
- 005: Canada
Special features: The city line has the format
"City Province (key from T005S) Postal code". Domestically, the postal code and possibly the province are written on the next line if the city line is too long. From abroad, the city name is abbreviated if necessary, as the next line is occupied by the country name.
Example:
Societe canadienne des postes
Ottawa ON K1A 1H7
Societe canadienne des postes
Ottawa ON K1A 1H7
CANADA
Short form:
Societe canadienne des postes / Ottawa ON K1A 1H7
DME:
Ottawa, ON K1A 1H7
Ottawa, ON K1A 1H7 Canada
- 006: United Kingdom and Ireland
Special features: The order in which rows are suppressed differs from the standard. (See the documentation for the parameter LINE_PRIORITY of the function module ADDRESS_INTO_PRINTFORM.)
The format is as follows:
-
- Name block
- Street or PO box
- District
- 1 to 3 city lines
- Country name (if applicable)
If there is a district, it is output on a line of its own, below street/PO Box and above the city lines.
If it does not cause any other lines to be suppressed, the city is formatted in two or three lines, i.e. either:
City
County (text from T005U)
Zip/postal code
or:
City
County postal code
or:
City postal code
Example:
The Post Office
Post Office Headquarters
33 Grosvenor Place
London
SW1X 1PX
The Post Office
Post Office Headquarters
33 Grosvenor Place
LONDON
SW1X 1PX
GREAT BRITAIN
Short form:
The Post Office / 33 Grosvenor Place / SW1X 1PX
DME:
London SW1X 1PX
London SW1X 1PX Great Britain
- 007: Brazil
Special features: The state code (key from T005S) is added to the city line with a hyphen.
Example:
Entreprise bresilienne des
postes et telegraphes
SBN - Conjunto 3 - Bloco A
70002-Brasilia-DF
Entreprise bresilienne des
postes et telegraphes
SBN - Conjunto 3 - Bloco A
70002-BRASILIA-DF
BRAZIL
Short form:
Entreprise bresilienne des / SBN - Conjunto 3 - Bloco A / 70002 Brasilia - DF
DME:
70002 Brasilia
70002 Brasilia Brazil
- 008: Postal code after the city (e.g. Singapore)
Special features: The city line format is
"City Postal code".
Example:
Postal Services Group Telecoms
111 Somerset Road 05-06
Singapore 179433
Postal Services Group Telecoms
111 Somerset Road 05-06
SINGAPORE 179433
SINGAPORE
Short form:
Postal Services Group Telecoms / 111 Somerset Road 05-06 /
Singapore 179433
DME:
Singapore 179433
Singapore 179433 Singapore
- 009: Australia
Special features: The city line contains
'City Province (key from T005S) Postal code', or, if this line is more than 35 characters long, only
'City Province'.
The city is always in uppercase letters.
Example:
Australian Postal Commission
PO Box 302
CARLTON SOUTH VC 3053
Australian Postal Commission
PO Box 302
CARLTON SOUTH VC 3053
AUSTRALIA
Short form:
Australian Postal Commission / PO Box 302 / Carlton South VC 3053
DME:
Carlton South VC 3053
Carlton South VC 3053 Australia
- 010: Postal code before the city, without country code (e.g. China).
Example:
Direction generale des postes
et telegraphes
28070 Madrid
Direction generale des postes
et telegraphes
28070 MADRID
SPAIN
Short form:
Direction generale des postes / 28070 Madrid
DME:
28070 Madrid
28070 Madrid Spain
- 011: Switzerland
Special features: The country name is only printed instead of the license plate code if the "Print country name in foreign addresses" flag is set for the sender country in the country table.
No compulsory empty line. Switzerland and Liechtenstein have a common post office with a uniform postal code system (they handle each other as domestic).
Examples:
Switzerland as the sender country:
SAP (Schweiz) AG
Leugenestr.6
2500 Biel 6
Short form: SAP (Schweiz) AG / Leugenestr.6 / 2500 Biel 6
DME: 2500 Biel 6
Italy as the sender country ("Print country name in foreign addresses" flag is not set):
SAP (Schweiz) AG
Leugenestr.6
CH-2500 BIEL 6
Short form: SAP (Schweiz) AG / Leugenestr.6 / CH-2500 Biel 6
DME: CH-2500 Biel 6 Switzerland USA as the sender country:
USA as the sender country ("Print country name in foreign addresses" flag is set):
SAP (Schweiz) AG
Leugenestr.6
2500 BIEL 6
SWITZERLAND
Short form: SAP (Schweiz) AG / Leugenestr.6 / 2500 Biel 6
DME: 2500 Biel 6 Switzerland
- 012: South Africa
Special features: The postal code is in a new line below the city. In letters from abroad, the country name comes after the postal code.
Example:
Postmaster General
Private Bag X148
Pretoria
0001
Postmaster General
Private Bag X148
PRETORIA
0001 SOUTH AFRICA
Short form:
Postmaster General / Private Bag X148 / Pretoria
DME:
0001 Pretoria
0001 Pretoria South Africa
- 013: Japan (old)
As of SAP_BASIS 6.20 Support Package 28 (or SAP_BASIS 6.40) a new Japanese print format will be available.
Special features: The postal code of the PO box is ignored.
The following format applies to mail from abroad:
-
- Name block with title
- Street or PO box
- City
- District (if maintained)
- Country postal code
(If the postal code is longer than three characters, insert a hyphen unless there is already a hyphen at position 4.)
Example:
Ministere des postes et
telecommunications
3-2, Kasumigaseki 1 chome
CHIYODA-KU, TOKYO
JAPAN 100
Within Japan:
-
- Postal code (possibly with a hyphen as the fourth character) Job
- Street, City without space separator
- District
- P.O. box
- Blank line
- Name2 Title or Name1 Title (if Name2 is empty)
- Name3
- Name4
Short form:
Ministere des postes et / 3-2, Kasumigaseki 1 chome / Chiyoda-ku
DME:
Tokyo -
Tokyo - Japan
- 113: Japan (new)
The following format applies to mail from abroad:
-
- Name block with title
- (Title is always printed in English)
- c/o name (if maintained)
- Street with house number or PO box
- District (if maintained)
- City, prefecture (with space separator; name of prefecture always printed in English)
- Postal code, country
Example:
Mr Taro Tanaka
c/o SAP Japan
7-2 Otemachi 1-chome
Chiyoda-ku, TOKYO
100-0004 JAPAN
Short form: Mr Taro Tanaka / 7-2 Otemachi 1-chome / Chiyoda-ku, TOKYO
DME: DME:Chiyoda-ku, TOKYO Japan
Within Japan, the formatting follows the principle of "from the top to the bottom, the granularity increases":
-
- Postal code (possibly with a hyphen as the fourth character) Job
- Prefecture and city without a space as a separator
- District (if maintained)
- Street with house number or PO box
- c/o name (if maintained)
- Mandatory empty line
- Name1 Title
- Name2
- Name3
- Name4
Example:
100-0004
TOKYOChiyoda-ku
Otemachi 1-chome7-2
Tokyo Sankei Bldg
c/o SAP Japan
Tanaka Taro Mr
Short form: Tanaka Taro Mr / TOKYOChiyoda-kuOtemachi 1-chome7-2
DME: TOKYOChiyoda-ku
- 014: Austria
Note that When Austria is the sender country, the country name is always in the last line when letters are sent abroad, even if the indicator "Print country name in foreign addresses" is not set.
Examples:
Austria as the sender country:
SAP Ges.m.b.H.
Stadlauer Straße 54
1221 Vienna
Short form: SAP Ges.m.b.H. / Stadlauer Straße 54 / 1221 Vienna
DME: 1221 Vienna
Italy as the sender country ("Print country name in foreign addresses" flag is not set):
SAP Ges.m.b.H.
Stadlauer Straße 54
1221 VIENNA
AUSTRIA
Short form: SAP Ges.m.b.H. / Stadlauer Straße 54 / 1221 Vienna
DME: A-1221 Vienna Austria
USA as the sender country ("Print country name in foreign addresses" indicator is set):
Foreign Address"):
SAP Ges.m.b.H.
Stadlauer Straße 54
1221 VIENNA
AUSTRIA
Short form: SAP Ges.m.b.H. / Stadlauer Straße 54 / 1221 Vienna
DME: 1221 Vienna Austria
- 015: Germany (with license plate code)
Special features: The district is output on an individual line before the street line for the street address (house address). The district is not output in PO Box addresses or for large customers who have their own postal code.
Examples:
Germany as the sender country:
Firma
Meyer und Söhne
Riem
Hauptstr. 57
81829 Munich
Short form: Meyer und Söhne / Hauptstr. 57 / 81829 Munich
DME: 81829 Munich
USA as the sender country
Firma
Meyer und Söhne
Riem
Hauptstr. 57
81829 MUNICH
GERMANY
Short form: Meyer und Söhne / Hauptstr. 57 / 81829 Munich
DME: 81829 Munich Germany
- 017: South Korea
Special features: The PO Box postal code is ignored.
From abroad:
- Name block with title
- Street
- District
- City
- Country postal code
Example:
SAP Korea Ltd.
23-2, Youido-dong
Seoul
South Korea 150-010
If you use PO boxes, the address is structured as follows:
Name block
Street (the post office with the PO box)
is entered here)
'PO BOX' PO box
District
City
Country postal code
Example:
Samsung SDS Co. Ltd.
Chamshil Post Office
PO Box 123456
Songpa-gu
Seoul
South Korea 123-456
Within Korea:
- City, District
- Street
- Name 1
- Name 2
- Name 3
- Name 4
- Postal code
Example:
Seoul, Youngdeungpo-ku
23-2 Youido-dong
SAP Korea Ltd.
150-010
In the case of the use of PO boxes, the address is
structured as follows:
City, District
Street (the post office with the PO box)
is entered here)
'PO BOX' PO box
Name block
The Korean name for 'PO Box' is output.
Example:
Seoul Songpa-gu
Chamshil Post Office
PO Box 123456
Samsung SDS Co. Ltd.
123-456
Short form:
Samsung SDS Co. Ltd./Seoul
DME:
Seoul 123-456
- 019: Denmark
Special features: The country name is only used instead of the
license plate number if the flag
"Print country name in foreign addresses" is set for the sender country
in the country table.
The district is displayed in an extra line directly above the
city line. The district is not displayed in
P.O. box and large customer addresses.
Example:
Sender country Denmark:
SAPFuture Denmark A/S
Tietgensgade 23
Kastrup
1566 Copenhagen
Short form: SAPFuture Denmark A/S / Tietgensgade 23 / 1566 Copenhagen
DME: 1566 Copenhagen
See Also
Keywords
address, layout, key, output, sales, document, header, level, print, po box, different, behavior, USA, Egipt, Netherlands, , KBA , SD-SLS-GF-OC-2CL , S/4HANA: Output Control on Sales Documents (Public Cloud) , BC-SRV-ADR , Address Management / Business Address Services , Problem
SAP Knowledge Base Article - Public