Number Range Enhancement for Sales Order, Billing, Delivery and Shipment

In the previous blog Number Range Setting for Sales Order, Billing, Deliveries and Shipment I explained where in SPRO you can specify the number range for Sales Order, Billing, Delivery and Shipment. In this blog I will explain where you can change the number range values and if needed where you can implement enhancement to change standard SAP behaviour.

The Number range object for Sales Order, Billing and Deliveries is RV_BELEG. You can either use transaction SNRO with this object name RV_BELEG or use transaction created for this number range object, which is VN01.

Number Range Object for Shipment is RV_TRANSPO, which you can see in SNRO transaction or use special transaction VN07.

Configuration of Number range in SAP is can be only done on document types. This poses limitation that one can only have sequential number based on document types. In case, there is a legal requirement to maintain sequential number of documents based on other parameters for example, customer or country then this cannot be achieved using SAP standard configuration and needs enhancements. Fortunately, SAP has provides exits specifically for this purpose.

Enhancement


Sales Order

Main Program: SAPMV45A
Include: MV45AFZZ

*---------------------------------------------------------------------*
*       FORM USEREXIT_NUMBER_RANGE                                    *
*---------------------------------------------------------------------*
*       This userexit can be used to determine the numberranges for   *
*       the internal document number.                                 *
*                                                                     *
*       US_RANGE_INTERN - internal number range                       *
*                                                                     *
*       This form is called from form BELEG_SICHERN                   *
*                                                                     *
*---------------------------------------------------------------------*
FORM USEREXIT_NUMBER_RANGE USING US_RANGE_INTERN.

* Example: Numer range from TVAK like in standard
* US_RANGE_INTERN = TVAK-NUMKI.

ENDFORM.                    "USEREXIT_NUMBER_RANGE

Billing

Function Group: V60A
Include: RV60AFZZ

*---------------------------------------------------------------------*
*       FORM USEREXIT_NUMBER_RANGE                                    *
*---------------------------------------------------------------------*
*       This userexit can be used to determine the numberranges for   *
*       the internal document number.                                 *
*       US_RANGE_INTERN - internal number range                       *
*       This form is called from form LV60AU02                        *
*---------------------------------------------------------------------*
FORM USEREXIT_NUMBER_RANGE USING US_RANGE_INTERN.

* Example: Number range from TVFK like in standard
* US_RANGE_INTERN = TVFK-NUMKI.

ENDFORM.
*eject

Deliveries

Main Program: SAPMV50A
Include: MV50AFZ1

*---------------------------------------------------------------------*
*       FORM USEREXIT_NUMBER_RANGE                                    *
*---------------------------------------------------------------------*
*       This userexit can be used to determine the numberranges for   *
*       the internal document number.                                 *
*                                                                     *
*       US_RANGE_INTERN - internal number range                       *
*                                                                     *
*       This form is called from form BELEG_SICHERN                   *
*                                                                     *
*---------------------------------------------------------------------*
FORM USEREXIT_NUMBER_RANGE USING US_RANGE_INTERN.

* Example: Numer range from TVLK like in standard
* US_RANGE_INTERN = TVLK-NUMKI.

ENDFORM.
*eject

Shipment

Enhacement: V56UNUMB Shipment number allocation
EXIT_SAPLV56U_003

Leave a Reply