Skip to Content
Technical Articles
Author's profile photo Rodrigo Sparrenberger

SAP S/4HANA Cloud: Document Type determination using CPF solution

This blog post describes the steps to configure a formula for document type determination of billing documents in SAP S/4HANA Cloud using the CPF solution. This extension scenario is implemented using basic Business Configuration (SSC UIs).


You have administrative access to SAP S/4HANA Cloud.

You have implementation and configuration experience on the SAP system.

Required Authorizations

Business Role Business Role ID
Configuration Expert – Business Process Configuration SAP_BR_BPC_EXPERT

Business Need

To allow you to assign a document type to a billing type, SAP delivered a country-specific SSC UI based on the Document Type Determination (GLO_ODN_DOC_TY_V) view, that overwrites the basic setting.


Document type determination SSCUI

To give you more flexibility, SAP has a new solution called Configurable Parameters and Formulas (CPF), that allows you to implement flexible billing document posting.

Step by step configuration example

Here we describe how to use the CPF solution to maintain a formula for the document type determination, that does not depend on the Assign Document Types to Billing Types SSC UI configuration.

To start, we need to determine which fields will be used as criteria for the determination of the document type. The following example is based on a Venezuela case.

Accessing the SSCUIs 

To start, you need to be logged on as a Configuration Expert.

  1. From the Implementation Cockpit tab, open the Manage Your Solution app.
  2. Set the country version to Venezuela (this applies to our example, you can set the country according to your business needs).
  3. Click on the Configure your Solution button.
  4. Filter by Sales (application area) and Sales Billing (sub application area).
  5. Click on the item named Custom Adaptations for Integration of Billing with Financial Account.
  6. You will see the four configurations steps that you need to go through to configure the solution, as in the following image.

Custom Adaptations for 
Integration of Billing with Financial Account screen

1 – Define Parameter Catalog for Flexible Billing Document Posting

  1. Click on the Configure button of the respective SSCUI.
  2. Here, you find a list of the available parameters under the selected usage (in our example, BF0).
  3. Go back to the Configuration Steps screen.

CPF%20Parameter%20Catalog%20screenCustom Adaptations for Integration of Billing with Financial Account screen

2 – Define Formulas for Flexible Billing Document Posting

  1. Click on the Configure button of the respective SSC UI.
  2. Click on the New Entries button.
  3. Choose a Formula ID and a Description and press Enter.
  4. Select the created formula line and double-click the Assign Formula Parameters tab, in the dialog structure.
  5. For this example, we are assigning the following fields:
  6. You can delete any other parameters, and the fields that you use as criteria for the document type determination can be different, these will depend on your business needs.
  7. Double-click on the Fomula Tasks tab in the dialog structure and select the usage task named SET_DOCUMENT_TYPE.
  8. Double-click Assign Parameter Priority. In this screen, you can choose the order of priority of the fields.
  9. Click on the New Entries button and enter the same fields you entered on step 5. You must also enter a priority for the fields.

  10. Double-click on the Define Decision Table in the dialog structure.
  11. On this screen, you will be able to assign the criteria that will be used to determine the document type. You can click on the Insert Row button (+) to do so.
  12. There, you can enter the values that are specific for your business. In this example, we have entered information specific for Venezuela.

  13. Save your entries and go back to the Configuration Steps screen.

3 – Define Custom Routines for Flexible Billing Document Posting

  1. Click on the Configure button of the respective SSCUI.
  2. Click on the New Entries button.
  3. Enter a Routine Number and give it a description.

  4. Select the created line and double-click the Assign Enhancement IDs to a Routine Number tab in the dialog structure.
  5. Click on the New Entries button and fill in the table as follows:
    • In the enter Process Enhancement Option Task field, enter GLO_BIL_FLEX_FI_INTEGRATION.
    • In the Implementation Type field, enter Configurable Parameters and Formula (CPF).
    • In the Enhancement Identifier field, enter the formula ID that you created in the previous step. In our case it is the “ZVE_DETERMINE_DOC_TYPE”
  6. Save you entries and go back to the Configuration Steps screen.

4 – Assign Custom Routines to Tax Departure Countries/Regions

  1. Click on the Configure button of the respective SSCUI.
  2. In this screen, you maintain the country for which the routine number that you just created is valid. To do so, click on the New Entries button.
  3. Save your entries.


You have just configured your own logic for the determination of the document type. This is especially good if you do not have the Document type determination SSCUI available in your country.

Further References

SAP S/4HANA Cloud: Flexible Billing Document Posting

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Ann Paul
      Ann Paul

      Great blog!! Rodrigo Sparrenberger It really helped me.