Extend customer invoice forms with additional fields

This page describes a sample business scenario to print custom fields created on forms such as billing documents, and how such an extension is possible on SAP S/4HANA Cloud.

Sample Scenario

In your organization billing documents must have a fax number on it. You can include this field by creating a custom field for the fax number in the Sales Billing Document business context and then implementing a Business Add-In (BAdI) for business context Sales: Billing Document. Write the logic in the BAdI to push the fax number field into the billing document form.

Note: Information provided here is as per features available on SAP S/4HANA Cloud release 1905. There might be variations to screen and field names in other release versions.

Prerequisites

  • You have administrative access to SAP S/4HANA Cloud.
  • You have implementation experience on SAP S/4HANA Cloud and BAdIs.
  • You have coding experience, since this extensibility solution requires implementation of coding logic.

Authorizations

Business RoleBusiness Role ID
Configuration Expert - Business Network Integration   
SAP _BR _ CONF _ EXPERT _ BUS _ NET_ INT
Master Data Specialist - Business Partner Data   
MASTER _ SPECIALIST

Implementation of the Extension

SAP S/4HANA Cloud Launchpad - > Custom Fields and Logic application

Assign Custom Field to a Form template

  1. Create a New Custom Field.
  2. Select the newly created custom field and navigate to Form Templates.
  3. Select the form within which, you wish to put in the new custom field. For example, choose the Customer Invoice form.

Write a logic for the Custom Field BAdI

  1. Create a new Enhancement Implementation using the Custom Logic option.
  2. Open the newly created Enhancement Implementation.
  3. In the Draft Logic section, enter the logic to print the custom field on the billing document form.
  4. Save and publish the newly implemented logic for the custom field BAdI.
  1. Download the form containing the new custom field. Add the custom field logic to it and upload the form back to the system.
  2. Open Manage Billing Document app on the FIORI launchpad.
  3. Select your billing document and choose the display option.
  4. Under Output Items, preview the newly defined form template. The newly created custom field should now be visible on the form.