SAP Knowledge Base Article - Public

2899660 - What is the CDS view to display plant address in the billing document printout - SAP S/4HANA Cloud

Symptom

You want to make the plant address visible on the billing document printout.

Environment

SAP S/4HANA Cloud

Sales and Distribution (SD)

Cause

Plant address is not contained in the standard billing document form template.

Resolution

Follow the steps described on SAP Help Portal on How to Extend a Custom Form Template for Billing Output with Custom Fields.

Read the address ID from CDS view I_PLANT and then get the address via:

cl_address_format=>get_instance( )->printform_postal_addr(
EXPORTING
* iv_address_type = '1'
iv_address_number = lv_addressid
* iv_person_number =
iv_language_of_country_field = 'E'
* 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)
).

See Also

KBA 2679030 - Extensibility for Billing Document Printout - SAP S/4HANA Cloud

Keywords

Custom logic, BAdi, Billing Standard Output, Custom Fields and Logic, Extensibility, Form Templates,  SDBIL_CI_STANDARD_*, , KBA , SD-BIL-GF-OC , Output Control Billing , SD-BIL-GF-OC-2CL , Output Control Billing (Public Cloud) , How To

Product

SAP S/4HANA Cloud Public Edition all versions ; SAP S/4HANA Cloud all versions