Wednesday, 22 December 2021

Flexible Billing document numbering – State wise number range (without use of FIORI App)

This blog is to handle the requirement in SAP S/4 HANA 2020 On-Premise version for different billing document number prefixes based on the state (region) and the different number range for the billing type as different billing types are used. Few billing types are GST relevant, few are VAT relevant, and others.

Solution scope based on the new concept of SAP S/4 HANA 2020 – Flexible billing document numbering.

Prefix should be defined based on the region (state) and different number range intervals will be used for configured billing types. If flexible document numbering is not configured for any particular billing type then it will pick the standard number range interval assigned to that billing type.

Configuration would be done by following below SPRO path:

SAP HANA Exam, SAP HANA Exam Preparation, SAP HANA Learning, SAP HANA Certification, SAP HANA Career, SAP HANA Material

Required prefixes would be configured in the below screen:

SAP HANA Exam, SAP HANA Exam Preparation, SAP HANA Learning, SAP HANA Certification, SAP HANA Career, SAP HANA Material

After the creation of prefixes, we have to create the number ranges from the below path based on the configured prefixes:

SAP HANA Exam, SAP HANA Exam Preparation, SAP HANA Learning, SAP HANA Certification, SAP HANA Career, SAP HANA Material

In the below screen, we have to enter the prefix which we defined in the above configuration path and have to create NR intervals:

SAP HANA Exam, SAP HANA Exam Preparation, SAP HANA Learning, SAP HANA Certification, SAP HANA Career, SAP HANA Material

SAP HANA Exam, SAP HANA Exam Preparation, SAP HANA Learning, SAP HANA Certification, SAP HANA Career, SAP HANA Material

Note: Total length given by SAP for billing document number is 10, so if you have used the prefix of 2 characters then you can only use the running number range of length: 8.

After creation of the NR prefix and intervals, we have to write the logic in BADI released by SAP.

There are 2 ways to do it:

1. Through the SAP FIORI – Custom Fields and Logic App (not able to take the ss as FIORI is not working currently) – Steps are given in SAP help support portal.
2. By writing logic in SAP provided BADI: SD_BIL_FLEX_NUMBERING

SE18:

An example given by SAP in the given BADI to refer:

SAP HANA Exam, SAP HANA Exam Preparation, SAP HANA Learning, SAP HANA Certification, SAP HANA Career, SAP HANA Material

In the given example which is provided by SAP where number range prefix and interval has been picked up based on Billing document type, company code.

SAP HANA Exam, SAP HANA Exam Preparation, SAP HANA Learning, SAP HANA Certification, SAP HANA Career, SAP HANA Material

SAP HANA Exam, SAP HANA Exam Preparation, SAP HANA Learning, SAP HANA Certification, SAP HANA Career, SAP HANA Material

SAP HANA Exam, SAP HANA Exam Preparation, SAP HANA Learning, SAP HANA Certification, SAP HANA Career, SAP HANA Material

In the scenario which we have used to pick the NR prefix as ‘TN’ based on the state code and NR interval based on the billing type, we have to write the below logic:

SAP HANA Exam, SAP HANA Exam Preparation, SAP HANA Learning, SAP HANA Certification, SAP HANA Career, SAP HANA Material

SAP HANA Exam, SAP HANA Exam Preparation, SAP HANA Learning, SAP HANA Certification, SAP HANA Career, SAP HANA Material

Create the enhancement ID for the enhancement:

SAP HANA Exam, SAP HANA Exam Preparation, SAP HANA Learning, SAP HANA Certification, SAP HANA Career, SAP HANA Material

Note: we can create separate enhancement IDs for every billing type or can use the same enhancements ID for multiple billing types.

After that, we have to define the custom routine, and assignment of routine needs to be done with billing type from below SPRO path:

SAP HANA Exam, SAP HANA Exam Preparation, SAP HANA Learning, SAP HANA Certification, SAP HANA Career, SAP HANA Material

SAP HANA Exam, SAP HANA Exam Preparation, SAP HANA Learning, SAP HANA Certification, SAP HANA Career, SAP HANA Material

After creation of routine number, we have to assign the enhancement ID created under BADI:

SAP HANA Exam, SAP HANA Exam Preparation, SAP HANA Learning, SAP HANA Certification, SAP HANA Career, SAP HANA Material

After that, we have to assign the routine number to the billing type from below SPRO path:

SAP HANA Exam, SAP HANA Exam Preparation, SAP HANA Learning, SAP HANA Certification, SAP HANA Career, SAP HANA Material

SAP HANA Exam, SAP HANA Exam Preparation, SAP HANA Learning, SAP HANA Certification, SAP HANA Career, SAP HANA Material

Note: If you have used different enhancement IDs and assigned to the different custom routine then assign the respective routine to their billing type or use the same routine to multiple billing types.

Billing Document:

SAP HANA Exam, SAP HANA Exam Preparation, SAP HANA Learning, SAP HANA Certification, SAP HANA Career, SAP HANA Material

The same feature is available for sales document (Sales order) numbering as well in SAP S/4 HANA 2020.

No comments:

Post a Comment