SAP Knowledge Base Article - Public

2721635 - Statistical pricing conditions not available in the billing output

Symptom

You are using Sales Kits Variant LUMF and want to print the amount on the header position.

Reproducing the Issue

Generate billing output. Amount on header position is missing.

Cause

  • In LUMF the price is on the components.
  • There is a statistical price condition PCUM, which sums up the prices on the components, but as it is statistical it is not printed automatically.

Resolution

  1. Creation of an extension field at Billing Document Item
    Use app Custom Fields and Logic, tab Custom Fields, in the Extensibility business catalog. Create a new extension field in Business Context ‘Billing Document Item’.
    Creation of an extension field at Billing Document Item.png

    This extension field is intended to store the value of statistical price condition PCUM.
    Remark: The extension field will only be filled when triggering the output request.

  2. Extend the Form Template with the Extension Field
    Within the same App (Custom Fields and Logic) and tab (Custom Field) extend the Form Templates for the billing document with the extension field.
    Extend the Form Template with the Extension Field.png

    Save and publish the extension field.

  3. Creation of an extension logic
    Use app Custom Fields and Logic, tab Custom Logic, in the Extensibility business catalog. Create a new Enhancement Implementation in Business Context ‘Billing Document Item’ with Definition Description ‘Billing Standard Output Item Adaption’ and an appropriate Implementation Description.
    Creation of an extension logic.png

    Please Note: If you are using the FormTemplate for Professional Service please use Enhancement Implementation ‘Billing Professional Services Output Item Adaption’

Add the following example code to the Draft:

*   First of all assign existing extension field values to output parameter:

   billingdocitem_ext_out = billingdocitem_ext_in.

   billingdocitemdescr_ext_out = billingdocitemdescr_ext_in.

*   Read PCUM value for specific billing document item:

SELECT SINGLE ConditionAmount, TransactionCurrency

    FROM   i_billingdocitemprcgelmntbasic

    WHERE billingdocument = @billingdocitem-billingdocument

    AND   billingdocumentitem = @billingdocitem-billingdocumentitem

    AND   conditiontype = 'PCUM'

    INTO (@billingdocitem_ext_out-yy1_conditionvalue_pcu_bdi, @billingdocitem_ext_out-yy1_conditionvalue_pcu_bdic) .

Save and publish the extension Logic.

Remark: To see the new created extension field in the Billing Document Printout, it is necessary to create a new Form Template. 

Keywords

Statistical pricing conditions, billing, output, extensibility, fields, LUMF, SalesKits, Sales, Kits , KBA , SD-BIL-GF-OC , Output Control Billing , Problem

Product

SAP S/4HANA Cloud 1808