Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Number Range Depend On Invoice Document Type

madhu_vadlamani
Active Contributor
0 Kudos

Hi All,

i have one requirement to generate number range plant wise for commertial invoice.for this requirement i am using user exit RV60AFZZ.i created one ztable in i am maintaining plant wise number range.i have created one Zobject eg."ZTEST'using SNUM and for this object i maintain number range interval.my pbrobelm is how to pass my zobjet .

insted of standard object. i want to pass my zobject. please help me on this......

I tried with this FORM USEREXIT_NUMBER_RANGE USING US_RANGE_INTERN.I inserted code in that but how to by pass that ob to zobject.

Regards,

Madhu.

Edited by: madhurao123 on Apr 13, 2011 11:25 AM

Edited by: madhurao123 on Apr 13, 2011 11:35 AM

12 REPLIES 12

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

Where have you created the z-object? in SNRO? If you want to use, for instance, the object ZRV_BELEG as a copy of RV_BELEG, you cannot use in invoice because the use of RV_BELEG is hardcoded in includes LV60AU02 and LV60AU11 in the funcition module NUMBER_GET_NEXT. The only option that you have with the userexit is change the value of DA_NUMKI instead of the default that you have in tcode VOFA for the invoice type.

I'm sorry. I hope this helps you

Regards

Eduardo

Edited by: E_Hinojosa on Apr 13, 2011 1:04 PM

0 Kudos

HI Hinojosa,

Thanks for your reply. Please give me some idea how to use DA_NUMKI.

Regards,

Madhu.

0 Kudos

HI Hinojosa,

Thanks for your reply.I did that and i passed that value to us_range_itern. It is not working for me. Please share me your ideas .

Regards,

Madhu.

Edited by: madhurao123 on Apr 13, 2011 6:18 PM

0 Kudos

Hi

DA_NUMKI is the range that you populate in VOFA, that you can replace in the userexit and that you can create in SRNO for object RV_BELEG.

Regards

Eduardo

brad_bohn
Active Contributor
0 Kudos

Why do you need the Z-object? Why don't you just set up the range intervals in the standard object, then maintain those intervals by plant in a custom table. Set the appropriate range based on the table selection in the exit...

0 Kudos

Hi Brand,

Thanks for your valuable reply. Please give me some idea on that how to proceed with that.

Regards,

Madhu.

brad_bohn
Active Contributor
0 Kudos

Please give me some idea on that how to proceed with that.

What did you not understand about my previous reply? The config, code and table setup should be fairly straightforward.

0 Kudos

Hi Brad,

Thanks for your reply. If i use the standard object then that will only valid for number ranges . We have four plants and 20 document types and all different ranges. If i used the standard one then number ranges will exhaust. Then how to proceed further. Thats why we planned to maintain a zobject.If this is a situation how to go a head with this. Suggest me a suitable method i will inform to my functional consultants.

Regards,

Madhu.

brad_bohn
Active Contributor
0 Kudos

If i used the standard one then number ranges will exhaust.

I seriously doubt that no matter what company. It sounds like your standard number range intervals are not configured well. I could easily set up that solution and provide access to billions of invoice numbers, not to mention hundreds of intervals, within the RV_BELEG object.

0 Kudos

Hi Brad,

Following is my requirement described in full detail. Please suggest me accordingly.

My client has 4 plans for which I have defined 4 billing document types and assigned 4 different number ranges.

Now the client is asking that this number range that i have assigned to these 4 billing documents have to be off set and come back to zero upon change of financial year. (for ex: the number range i am using is 90100000-90199999 for billing document type zf2. Invoices would be generated and in the next financial year this number range should again start from 90100000.)

For this I am trying to do the following. I will make this 8digit number range to 10 digits and prefix it with financial year and mask it for my smartform. (for ex: for the year 2011, the NR would be 1190100000-1190199999, for year 2012 the NR would be 1290100000-1290199999 and in smartform only 90100000 will be printed). This NR I am planning to maintain in a z number range object and trying to bypass RV_BELEG with this number range object. (I have already informed the client that this is not a standard and they would not be getting support from SAP for VF01 T.COde and they are ok with that)

Please suggest me if there is a better way to achieve this.

Regards,

Madhu

0 Kudos

Hi Madhu,

I suggest to create a ZZ-field with an append in VBRK. You can create your algorithm with the rule that you describe. With the usual userexit you can populate it and print it in SMARTFORM. If you can use this field in FI interface you can see the userexits in Note 301077 - User exits for the interface to accounting. If all character are numeric you can try to populate with NUMBER_GET_NEXT after built your own Z-object in SNRO, as a manner to ensure that the ZZ-field is unique.

The danger is that field VBELN is a key in a lot of tables. Try to understand who have this need in your customer (finance people?)

I hope this helps you

Regards

Eduardo

madhu_vadlamani
Active Contributor
0 Kudos

Solved with standard sap method.

Regards,

Madhu.