Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
Showing results for 
Search instead for 
Did you mean: 

Have you ever come across a business requirement to have different Billing Document number Prefixes/Number ranges as per Country/Company code.

Good news!  This blog illustrates the steps to configure S/4HANA Flexible Billing Document Numbering to meet custom business requirements for determining billing document numbers based on set conditions (e.g. Company code and Billing Type)

As a business expert, you can smoothly implement it and experience great functionality within CPF.

The following steps take you through all the required configuration steps:

  1. Create Number range Prefixes and Number range Intervals

  2. Create a CPF formula based on the decision table that contains defined numbering rules

  3. Define Custom Routines for Flexible Billing Document Numbering and assign it your CPF formula

  4. Assign Custom Routines to Billing Types

Configuration can also be done with a few clicks in the Manage Your Solution app (from Implementation Cockpit tab)

Customizing for Sales and Distribution:

1. Under Sales and Distribution > Billing > Billing Documents > Define Number Ranges for Billing Documents, create number ranges. If Prefix is required, define them in the Define Number Range Prefixes for SD Documents activity (same path as previous activity)

Example : Prefix = BA / Number range = 01

2. Under Sales and Distribution > Billing > Configurable Parameters and Formulas in Billing, create a CPF formula (including a decision table) to define Formulas for Flexible Billing Document Numbering as per business requirements and make a note of your formula ID

Example: Formula ID =_Flex_Billing_Formula

Assign desired parameters in your Formula

Define Decision Table with mapping of desired parameters to numbering rule

3. Under Sales and Distribution > Billing > Routines > Define Custom Routines for Flexible Billing Document Numbering, define a Routine number

Example: Routine Number 300001 defined and assigned to formula _Flex_Billing_Formula

Assign a Routine number to your formula by selecting the implementation type Configurable Parameters and Formulas (CPF) and entering the formula ID as the enhancement ID

4. Under Sales and Distribution > Billing > Billing Documents > Assign Custom Routines to Billing Type, select the billing document type for which Flexible Billing Numbering is required and enter the routine number

Example: Routine 300001 assigned to Billing type ZF1


On generating a billing document, the system calls the assigned CPF formula to show custom Billing Numbering.

Example: Billing document number BA0000002 was created successfully with the prefix BAHappy viewing!

Thank you for reading this blog post, please feel free to share your feedback or collaboration in the comments section below.

If you enjoyed this article, share it with your friends and colleagues!

Related Links on SAP Help Portal:

Flexible Billing Document Numbering

Using Configurable Parameters and Formulas (CPF) to Implement Flexible Billing Document Numbering
Labels in this area