cancel
Showing results for 
Search instead for 
Did you mean: 

USEREXIT_NUMBER_RANGE not performed in LV60AU02 Custom Billing Number Range

trisno_s
Explorer
0 Kudos
957

Dear Expert,

Per our company policies, every Sales Organization must have different format number for SO, DO and Billing document.

In case of Billing document, what we do, is to make a custom ztable which has column of Sales Organization and Number Range Number (NRIV-NRRANGENR) and put it in User Exit RV60AFZZ as many has suggested per standard User Exit for custom Billing number range.

Since the server is new (we use ECC 6.0 version), there's only one Sales Organization at the moment, which I have assigned from tcode VN01:

NRRANGENR = 45 for Sales Order

NRRANGENR = 46 for Delivery Order

NRRANGENR = 47 for Biling document.

However, when I did testing to make several Billing document, all of them has wrong format number (somehow the numbers got picked from Sales Order number instead).

Here's what I've found:

In program LV60AU02, there's a validation before performing userexit_number_range as follows:

      IF xvbrk-numki = tvfk-numki.

        PERFORM userexit_number_range USING da_numki.

        IF da_numki NE tvfk-numki.

          PERFORM tvfkd_lesen USING da_numki.

          IF NOT tvfkd-fkdat IS INITIAL AND

            xvbrk-fkdat NE tvfkd-fkdat.

            MESSAGE a145 WITH xvbrk-fkdat da_numki.

          ENDIF.

        ENDIF.

      ELSE.

* number_range changed in userexit number_range_inv_date

        da_numki = xvbrk-numki.

      ENDIF.

In the attachment lv60au02.png, XVBRK-NUMKI = 45, while TVFK-NUMKI = 47, thus userexit_number_range isn't performed, rendering my ztable in RV60AFZZ useless. When debugging, if we changed the value of XVBRK-NUMKI to 47 instead, RV60AFZZ is called and the Billing document saved uses correct format number.

We have another server (an old one, not sure of it's version, definitely not ECC 6.0), and in this server, value of XVBRK-NUMKI is always the same as TVFK-NUMKI, thus User Exit RV60AFZZ is being performed correctly.

My question:

How does XVBRK-NUMKI is populated? Did I miss something when doing Billing Type configuration?

Accepted Solutions (0)

Answers (1)

Answers (1)

VeselinaPeykova
Active Contributor
0 Kudos

Just a random idea - do you have any other billing exits active in the ECC6 system?

You can easily check this via transaction PRCAT or by using program SNIF.

The reason why I ask is that, for example, RV60AFZC, USEREXIT_NUMBER_RANGE_INV_DATE has a higher priority than RV60AFZZ, USEREXIT_NUMBER_RANGE.

trisno_s
Explorer
0 Kudos

Thanks for your suggestion. I did find another user exit about number range in RV60AFZC. However, even if the user exit is not there, the number range value in RV60AFZC is already wrong (in my case it's already 45). I'll take a look to remove this user exit, see if it affects the number range value.