2006 Mar 21 10:00 AM
hi,
I have a requirement to generate external number range for sales document. I tried this user exit (MV45AFZZ) to generate external number.
FORM USEREXIT_NUMBER_RANGE USING US_RANGE_INTERN.
Endform.
between these form and enform i written my logic and passing to US_RANGE_INTERN. But can one suggest where to write to generate external number range.
Can any one help me out.
Thanks and regards,
Vijay.
hi,
I have a requirement to generate external number range for sales document. I tried this user exit (MV45AFZZ) to generate external number.
FORM USEREXIT_NUMBER_RANGE USING US_RANGE_INTERN.
Endform.
between these form and enform i written my logic and passing to US_RANGE_INTERN. But can one suggest where to write to generate external number range.
Can any one help me out.
Thanks and regards,
Vijay.
2006 Mar 21 10:11 AM
Vijay,
As far as my knowledge goes, external number range means, you can manually key in the Sales order number.
Regards,
Ravi
Note : Please mark the helpful answers.
2006 Mar 21 10:19 AM
If you have explicitly use a Serial number range, create one in SNRO, get the next number using function NUMBER_GET_NEXT and use that number.
Regards,
Ravi
2006 Mar 30 4:58 PM
hi ravi,
Yes ur right. But i unbale find and to put my logic in User Exit. Here i need pass external number in runtime. I want to generate external according sales organization and year.
Ex: if sales org = 'SG0' and 2 last charecter of year 06. Then external number is 'SG00600001'. Then for the next sales document 1 wil be get added. Then external number will be 'SG00600002'.
charecters total <b>10</b> divide like this.
Sales organization SG0 3
Year 06 2
Number 00001 5
-
TOTAL 10
-
So pls anybody know about how to generate external number according based some custom logic.
Thank u.
Vijay.
2006 Mar 30 5:08 PM
Vijju,
Assume, ORDER is a variable for the Order number.
Get what ever data you want to concatenation like Sales Org, Year and use NUMBER_GET_NEXT for getting the serial number.
CONCATENATE SORG YEAR NUMBER INTO ORDER.
Now you this value to the variable in the user exit.
Hope this helps you.
Regards,
Ravi
2006 Mar 30 6:19 PM
Dear ravi,
This function module NUMBER_GET_NEXT checking in internal number range. So it's saying Number range not find. So another solution. If i am making u any trouble pls don't mind.
Thanks a lot friend.
2006 Mar 30 6:25 PM
Vijju,
For that have you created a Number range object in SNRO transaction, there you will specify what is starting and ending number of the range and by what number it will increment.
Once that is done, your function will give you back a number from that range.
Regards,
Ravi
2006 Mar 21 10:12 AM
Hi
Here you can assign a different number range for your sales order.
The number range is linked to the order type (field VBAK-AUART), this link is done in customizing.
It usually uses this routine if it can't assign the range in customzing because (for example) for different sales area it need have different number ranges for the same order type.
So you should create an external range by trx SNRO and then assign the number before entering in the main screen of va01 or saving the document.
When you need to assign the number depends on how you want to manage your range.
If you assign the number in entering you has to make sure to not assign the same number document to severals order to be created in the same time by several useers.
Max
2006 Mar 30 4:42 PM
hi,
Thank a lot.
Exatly these problems i am facing. So can u tel which userexit can we use for generating external number.
2006 Mar 30 4:56 PM
Hi
You could use userexit_save_document or userexit_save_document_prepare (MV45AFZZ).
These exit are called before saving the document, I think you should generate the number in this step, in this way you don't miss a number if the user don't save document.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |