SAP Knowledge Base Article - Public

2924014 - Address formatting - SAP S/4HANA Cloud

Symptom

Address data of the sales document is not printed according to your expectations.

Environment

SAP S/4HANA Cloud

Cause

Print formatting for addresses
Addresses are formatted based on valid national and international guidelines.

Basic Pattern:
For addresses where the recipient country and the sender country are different, the city and the country lines are printed in uppercase.

Country Formatting:
The format of the address depends on whether the sender and the recipient country are identical or not. If the countries are not identical, the country is always indicated, either by its full name or by its vehicle country key.
If the sender country and the receiver country differ, the system will always print the address in the language of the sending country since the delivering postal service needs to be able to read the country name.

Resolution

Extensibility allows the modification of the address on the sales document output.

The following class, containing the method for returning the address data, can be used in Cloud BAdIs (Custom Logic) for print:

cl_address_format=>get_instance( )->printform_postal_addr(

      EXPORTING
*        iv_address_type              = '1'
        iv_address_number            = address_number
*        iv_person_number             =
        iv_language_of_country_field = language
*        iv_number_of_lines           = 99
*        iv_sender_country            = space
      IMPORTING
        ev_formatted_to_one_line     = DATA(one_line)
        et_formatted_all_lines       = DATA(all_lines)
    ).

Prior to that,  'address_number' must be filled with the corresponding number and the 'language' with the language in which the country name shall be printed.
All_lines would then contain the formatted addess.

See Also

SAP Help - How to Extend a Custom Form Template for Billing Output with Custom Fields
2679030 - Extensibility for Billing Document Printout - SAP S/4HANA Cloud
2984817 - Form design in Adobe LiveCycle Designer
2899660 - What is the CDS view to display plant address in the billing document printout - SAP S/4HANA Cloud
3110331 - Ship to party address in the billing document printout - SAP S/4HANA Cloud 
2840204 - Get Sales Organization Address on Billing Document Output - SAP S/4HANA Cloud
3011127 - Phone number and email address of contact person is not printed on the billing document output form - SAP S/4HANA Cloud
2874680 - Address line is missing from Sales Order output

Keywords

country language, sender country, receiving country, communication language, master data language, output item language, form language, local language, country of the customer, ADRC, ADDRESS_INTO_PRINTFORM, FDP_V3_BD_STANDARD_SRV, CL_FDP_V3_BD_FORM_UTILITY, SDBIL_CI_STANDARD, S4_PC, billing document, invoice, preliminary billing document, output, , KBA , SD-BIL-GF-OC , Output Control Billing , SD-BF-OC , Output Determination , CA-GTF-OC , SAP S/4HANA output management , How To

Product

SAP S/4HANA Cloud all versions