Skip to Content
Technical Articles

Print Billing Document Forms with Custom Field

This blog post describes a sample business scenario to extend a customer invoice form with additional fields, and explains how such an extension is possible on the SAP S/4HANA Cloud.

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 and have implementation experience on the system. This extension requires implementation of a coding logic, therefore, coding experience is also necessary.

Authorizations

Business Role Business Role ID
Configuration Expert – Business Network Integration  SAP_BR_CONF_EXPERT_BUS_NET_INT
Master Data Specialist – Business Partner Data  MASTER_SPECIALIST

Implementation

For example, the company’s customer invoice must contain a fax number field, and you can include it by extending the customer invoice form.

  1. Assign custom field to a form template (Custom Fields and Logic app)
    • Create a new custom field for the fax number.
    • Select the newly created custom field and navigate to Form Templates.
    • Select the form in which the custom field needs to be included. For example, enable usage of the custom field for the Customer Invoice Form.
  2. Write a custom logic
    • Create a new Enhancement Implementation using the Custom Logic option.
      Since this is a billing document form, you need to include the custom field to the output form by implementing the Business Add-In (BAdI) for business context Sales: Billing Document and BAdI description Billing Standard Output Header Adaption.
    • Write the logic in the BAdI to push the fax number field value into the billing document form.

      Sample Code
      :

      select FaxNumber from I_Customer
      WHERE Customer = @billingdoc-soldtoparty
      into @billingdoc_extension_out-yy1_fax_bdh
      endselect. ​
  3. Print Billing Document
    • Download the form template.
    • Edit the form using AdobeLiveCycle, include the custom field and upload the form back to the system.
    • Open Manage Billing Document app on the FIORI launchpad.
    • Select your billing document and choose the display option.
    • Under Output Items, preview the newly defined form template. The newly created fax number field should now be visible on the form.
Be the first to leave a comment
You must be Logged on to comment or reply to a post.