Skip to Content
avatar image
Former Member

Number Range for billing documents

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Jun 30, 2010 at 10:08 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 01, 2010 at 06:34 AM

    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

          Add comment
          10|10000 characters needed characters exceeded