cancel
Showing results for 
Search instead for 
Did you mean: 

number range

Former Member
0 Kudos

the clients requirement is such that, he wants a z document type for he wants different number ranges as per the different sales offices

kindly help me, as i know that one sales document type will have one number range and how can i get a different number range for different sales offices

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi,

u need to put a logic in vf01 user exit that checks the sales office against each bill and basis the bill type and sales office u can choose the numebr range. you will ahe to create a custom table for this which will ahve the following field---bill type, sales office, number range. mainain this table in sm30

saurabh

Former Member
0 Kudos

Hi Alekhya,

For sales order processing, include MV45AFZZ features the following user exit: USEREXIT_NUMBER_RANGE.

In this exit, the variable US_RANGE_INTERN always has the internal number range interval that is applicable for the document. You can create a Z table with just 2 fields - sales office and number range interval and assign interval numbers (after they are created in transaction VN01) to sales offices. Add code in this exit, which checks the sales office of document being created and accordingly picks the associated interval from the Z table and copies it to the variable US_RANGE_INTERN.

If you have the same requirement for billing types too, then you can use a similiar user exit (with the same name USEREXIT_NUMBER_RANGE), which is available in include RV60AFZZ. Alternatively you can use another exit USEREXIT_NUMBER_RANGE_INV_DATE in the same include; this one has higher priority; if you code in this, automatically

USEREXIT_NUMBER_RANGE in RV60AFZZ will not be processed.

For both sales orders and invoices, you can use the same Z table but in that case, you may have to add other fields like document type or an document category to differentiate between order and invoice.

Please reward with points if useful.

Regards,

KC

SAP SD

Former Member
0 Kudos

Aplogies. The higher priority exit USEREXIT_NUMBER_RANGE_INV_DATE can be found in the include RV60AFZC and not in RV60AFZZ as mentioned in my earlier post.