Enterprise Resource Planning Blog Posts by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
califf
Product and Topic Expert
Product and Topic Expert
473

In Sales, you often need to create output for sales documents (for example, printed sales orders) or share document output via email. To meet these requirements, SAP S/4HANA Public Cloud provides the Output Management Framework, which enables documents to be printed as PDFs or sent electronically. SAP delivers preconfigured form templates and gateway services for each type of sales document. 

However, the fields available in the predelivered form templates may not always fulfill specific customer needs. In such cases, you can enhance the services to include additional fields and customize form templates accordingly. Before implementing any enhancement, check whether the desired field already exists in the predelivered form templates in the Maintain Form Templates app. 

Here are some examples of form template customization: 

  • Extend predelivered forms with additional partner functions 
  • Extend predelivered forms with additional condition types 
  • Extend predelivered forms with additional standard fields 
  • Extend predelivered forms with custom fields 

 

Extend Predelivered Forms with Additional Partner Functions 

The predelivered form templates support four partner functions:  

  • AG: Sold-to party 
  • WE: Ship-to party 
  • RE: Bill-to party 
  • RG: Payer 

Output data includes the country, address, language of correspondence for the address, and the partner's full name. 

You can include additional partner functions (e.g., sales employee) in your custom form templates (that is, copies of the predelivered form templates). For more information, see How to Enable Printing of Partner Function-Specific Information. 

Note: The fields available for the output are hardcoded and fixed. 

 

Extend Predelivered Forms with Additional Condition Types 

You can enable additional condition types in your custom form templates. Complete the following steps: 

Identify the relevant pricing procedure used in the sales document. 

Open the sales document and check the information in the document header. 

califf_0-1763362395178.png

In your configuration environment, open the configuration activity Set Pricing Procedures (101117) and make settings for the target condition types in "Procedures-Control Data". 

Example: For condition type PPR0, enter a or A in the Print Type column.  

  • Lowercase (a): Item-Level condition data is relevant. 
  • Uppercase (A): Header-Level condition data is relevant. 

califf_1-1763362395180.png

(Optional) Add calculation logic in the form template using scripting. 

For example, to get a subtotal of two condition types, you can add a script to perform this calculation within the custom form template. This allows for dynamic adjustments and tailored outputs based on specific business needs. 

 

Extend Predelivered Forms with Additional Standard Fields 

Some standard fields (for example, customer group) are not available in the predelivered form templates by default. You can enable these standard fields in your custom form templates via data source extension in the Custom Fields app. 

For example, for sales orders, you can create a data source extension for the Sales: Sales Order Confirmation Form (FDP_V1_ORDER_CONFIRM_SRV) form service in the Custom Fields app. As shown below, you can select fields from the list. 

califf_2-1763362395181.png

Note:  

  • This extension approach does not support the fields on schedule line level. 
  • Some fields added via data source extension may not appear in PDF preview but will show in the final output.  

For more information, see How to Extend a Custom Form Template with Standard Fields. 

 

Extend Predelivered Forms with Custom Fields 

You can extend your custom forms templates (that is, copies of the predelivered form templates) with custom fields created in the Custom Fields app. 

Complete the following steps in the Custom Fields app: 

Create custom fields in the following business contexts: 

  • Sales: Sales Document 
  • Sales: Sales Document Item 

Enable usage of the custom fields under Form Templates for the respective form templates. 

Note: When you use the following BAdIs to set or change values of custom fields in sales documents, do not use CDS views as input data in your custom logic: 

  • Modification of Header Custom Fields in Sales Documents (SD_SLS_MODIFY_ITEM) 
  • Modification of Header Custom Fields in Sales Documents (SD_SLS_MODIFY_HEAD) 

Instead, you should use the input parameters of the BAdIs in your custom logic. This ensures real-time transactional data in document output. 

For more information, see How to Extend a Custom Form Template with Custom Fields.