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!
cancel
Showing results for 
Search instead for 
Did you mean: 
prashanthgoud
Participant
3,659


Please read my previous Blog on Configuring flexible number range prefixes for Sales Documents using CPF.

Easier way to configure flexible number ranges with prefixes for Sales Documents using CPF in S4 HAN...

Objective.


The main objective of this blog is to have a prefix of Country ISO code for Delivery documents created for different Sales Organizations belonging to different countries.

Business Requirement.


The following example illustrates a typical use case for flexible sales document numbering.

Example

Consider a multinational company that consists of five companies, each based in a different country, including Switzerland, Germany, India, US, and Great Britain.

When a new Delivery document of type ZSLF (Delivery document) is created by the German company DE11, the custom routine and formula implemented by us tells the system to use the next available number in number range interval 17 within number range prefix DE.

While, on the other instance, if an ZSLF delivery is created by the Great Britain company GB11, the custom routine and formula tells the system to use the next available number in number range interval 17 with number range prefix GB.

Just by looking at the document numbers of Sales, Delivery or Billing document, one can easily identify to which Sales organization or Company the document belongs. This can be easily achieved by Using Configurable Parameters and Formulas (CPF) to Implement Flexible Sales Document Numbering without any ABAP help.

We can use this Flexible document number ranges to Sales documents, Delivery and Billing documents.

Let’s dive deep into this feature in SAP S4 HANA 2022 how we can achieve this to our Delivery documents as per the requirement.

Configuration Procedure for Delivery Documents (Customizing)


We must perform the following steps in Customizing for Logistics Execution:

Step: 1

To use prefixes, we should define them in the Define Number Range Prefixes for Delivery Documents activity in Customizing for Logistics Execution.

IMG > Logistics Execution > Shipping > Basic Shipping Functions > Configurable Parameters and Formulas in Shipping > Define Number Range Prefixes for SD Documents


On the screen change view "Number Range Prefix for SD document", maintain the No range prefixes and description.

For this scenario, we have taken the Country names of the Sales organization as prefix.

































Prefix

Sales

Organization Code
Country & ISO Code
CH CH11 CH - Switzerland
DE DE11 DE - Germany
GB GB11 GB - United Kingdom
IN IN11 IN - India
US US11 US - USA

 


After the prefixes are defined, we must refer them in our decision table in the step 3.

Step 2:

We need to create custom number range intervals that the system can assign dynamically. The path is,

IMG > Logistics Execution > Deliveries > Define Number Ranges for Deliveries

Here we have defined the number range for the prefix DE. Like this we must define the number ranges for all the prefixes we have defined.

Prefixes: CH, DE, GB, IN & US.

No Range: 17 – for all the prefixes.


 

 


 


 


 


(Optional) If we want to include custom fields as additional formula parameters, we can enable these custom fields as parameters in the Define Parameter Catalog for Flexible Sales Document Numbering activity.

IMG > Logistics Execution > Shipping > Basic Shipping Functions > Configurable Parameters and Formulas in Shipping > Define Parameter Catalog for Flexible Delivery Document Numbering.


 


Step 3:

In this step we Define Formulas for Flexible Delivery Document Numbering activity under Logistics Execution

IMG > Logistics Execution > Shipping > Basic Shipping Functions > Configurable Parameters and Formulas in Shipping > Define Formulas for Flexible Delivery Document Numbering.

We will create a CPF formula (including a decision table) that fulfils our business requirements. Save the formula and make a note of the formula ID.


Define the formula.


Select the formula and double click on Assign Formula Parameters. Enter the required parameters and save.


Double click on Formula tasks and select the SET­_NUMBER_RANGE and double click on Assign Parameter Priority to maintain the parameters.


Maintain the parameters and priority and save. Depending on the priority we give here, the parameters will be displayed as per the priority in the Define decision table.


Now double click on Define Decision Table and main the formula as shown below.



















































Operator Delivery Type Operator Sales Organization Number Range Interval Number Range Prefix
= ZSLF = CH11 17 CH
= ZSLF = DE11 17 DE
= ZSLF = GB11 17 GB
= ZSLF = IN11 17 IN
= ZSLF = US11 17 US

 


This completes our formula definition.

Step 4:

In this step we will perform the Define Custom Routines for Flexible Delivery Document Numbering activity under

IMG > Logistics Execution > Shipping > System Modifications > Routines > Define Custom Routines for Flexible Delivery Document Numbering

Here, we must register a routine number and assign it to our formula by selecting the implementation type Configurable Parameters and Formulas (CPF) and entering the formula ID as the enhancement ID.  Our formula (including its decision table) is now mapped to the routine number.


Click on New entries and define a routine number.


Select the routine number and double click on Assign Enhancement IDs to a Routine number.

Select New entries and maintain the entries as below and assign the formula which we have created in our earlier steps.


Step 5:

In this step we need to Assign Custom Routines to Delivery Document Types.

IMG > Logistics Execution > Shipping >  Basic Shipping Functions > Configurable Parameters and Formulas in Shipping > Assign Custom Routines to Delivery Document Types.

Choose the Delivery document type (in our case, ZSLF for which we want to trigger the formula that we have created. Then, enter the routine number that we registered in the previous step to assign the chosen sales document type to the target formula.


 


If everything is configured correctly, when a delivery document of the relevant delivery document type is created, the system now calls the assigned CPF formula to determine the number range interval (and, if applicable, the prefix) from which the new sales document number is drawn.

Now let’s create the delivery documents for different sales orders belonging to different Sales organizations and check.

DE11 Sales Organization.



For CH11 Sales Organization.

 


 

 


For IN11 Sales Organization.

 


 


For US11 Sales Organization.

 


 

 


For GB11 Sales Organization.

 


 


As we did CPF configuration successfully, all our delivery documents got prefixes the way we configured.

This ends my blog post, and in my next blog we will configure the flexible number ranges for Billing documents as per the business requirement.

I hope you found this blog post helpful, Please do provide your valuable feedback on this post in comments section, this will help me in improving my content and share more knowledge with this community.

Please contact me for any questions or comments!

 

Related Blogs:

Blogs on Flexible Sales Document Numbering.

Related Links on SAP Help Portal:

Flexible Sales Document Numbering

Flexible Billing Document Numbering

Using Configurable Parameters and Formulas (CPF) to Implement Flexible Billing Document Numbering

 

Thanks & Regards

Prashanth Gaddam.
Labels in this area