on 10-02-2007 9:17 AM
Hello All,
Is it possible to have Invoice series based on Year state / Company
Code/ plant / billing type.. As we need to maintained numerous number
range for all the states / Company Codes / plant / billing type.
At present we are assigning the same through user exit for Delivery /
Invoices and via a separate tables But all number ranges are in
continuation of each other other and which are defined and maintained
is SAP standard T.C VN01 which is common for all SD documents i.e.
Order / Delivery / Invoice .
Our requirement is we want to define i.e. from 1 to 10000 for each
plant / state for delivery / Invoice and want to<b> initialize every
year.</b>
Thanks in advance.
Bharat
the best way to achieve this is to let assign the number range from FI.
so set the accounting document number range to internal (the accounting number ranges are company and year dependent and start from 1 every year), and then make a user exit to determine the right accounting document: for this use enhacement SDVFX001 and write a code similar to this one:
CLEAR l_blart.
SELECT SINGLE blart INTO l_blart
FROM zdetdocfi
WHERE vkorg = vbrk-vkorg
AND fkart = vbrk-fkart.
CHECK sy-subrc = 0.
IF l_blart NE w_blart AND NOT w_blart IS INITIAL.
MESSAGE e001(zsd).
ENDIF.
w_blart = l_blart.
zdetdocfi is a buffered custom table that contains fields MANDT, VKORG, FKART as keys and BLART as field for accounting doc.
Roberto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Roberto,
Thanks for your reply.
My requirement is in connection with billing documents created in VF01.
Billing documents in SAP are not year specific but accounting docs are.
I do not require seperate accounting doc. number range per State. I need year wise / branch/ state wise wise billing range. I am even ready to create seperate billing types for branches/States but how to acheive year specific number ranges ?
Bharat
you cannot do it in SD by standard because SD number ranges don't have year. You have to create Z number range object in SNRO and manage it into RV60AFZC - FORM USEREXIT_NUMBER_RANGE_INV_DATE and get numbers with FM:
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = zv_nrrangenr
object = zc_object
quantity = '1'
subobject = ' '
toyear = vbrk-fkdat(4)
ignore_buffer = ' '
IMPORTING
number = US_RANGE_INTERN
EXCEPTIONS
interval_not_found = 1
number_range_not_intern = 2
object_not_found = 3
quantity_is_0 = 4
quantity_is_not_1 = 5
interval_overflow = 6
buffer_overflow = 7
OTHERS = 8.
Roberto
User | Count |
---|---|
97 | |
10 | |
9 | |
6 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.