cancel
Showing results for 
Search instead for 
Did you mean: 

Number Range for billing documents

Former Member
0 Kudos

Hi gurus

Can i define number ranges for billing documents based on year for example

for current year the document number range should be like 91yyyyy0000 to 91yyyyy9999

where yyyyy is the current year , so that new number range is assigned new year and my number ranges is not exausted

regards

afzal

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

Define a number range with interval in Vn01 t-code.

No From Number To number

01 9*********** 9*********

022 9********** 9***********

Create a ztable with billing type (FKART) and fiscal year (GJHAR) and number range (NARRANGENR).

With entries as explained below.

F2 - 2010 01

F2 2011 02

in program RV60AFZZ use the user exit FORM USEREXIT_NUMBER_RANGE USING US_RANGE_INTERN.

DATA: V_NRNR TYPE NRNR,

V_GJAHR TYPE GJAHR.

        • Get Fiscal Year

CLEAR: V_GJAHR.

CALL FUNCTION 'FI_PERIOD_DETERMINE'

EXPORTING

i_budat = VBRK-FKDAT

IMPORTING

E_GJAHR = V_GJAHR.

IF NOT V_GJAHR IS INITIAL.

SELECT SINGLE NRRANGENR FROM ztable

INTO V_NRNR

WHERE

GJAHR = V_GJAHR

AND FKART = VBRK-FKART.

IF SY-SUBRC = 0.

US_RANGE_INTERN = V_NRNR.

ENDIF.

ENDIF.

Thanks,

Vaishnavi

jpfriends079
Active Contributor
0 Kudos

As per your requirement, you need to redefine whole number range.

There can be some point sto be kept in mind before going for such kind of adjustment.

1. Number range number, will be from 01 - 99, also, A0 to Z9.

2. Your total number of billing should be less then 9999.

3. Every year you have to change number range in your billing doc type.

For understanding follow the following link:

[Number range in |http://www.sap-img.com/sap-sd/number-ranges-in-sales-order.htm|You can follow the same for Bill]

Or rasie ticket to SAP.

Try and share your feedback.

Thanks & Regards

JP