‎2011 Apr 18 11:38 AM
Hi,
When I park a document using FV60, how the document number is generated?
I want to know the program name and function(subroutine) which will generate this number.
If any one knows please let me know.
It will be very helpful.
Thank you in advance,
With Regards,
Vimal
‎2011 Apr 18 11:46 AM
SAP uses number ranges. So you need to find out the number range object and interval (transaction SNRO).
With function NUMBER_GET_NEXT a new number is taken from the number range object and interval.
‎2011 Apr 18 11:46 AM
SAP uses number ranges. So you need to find out the number range object and interval (transaction SNRO).
With function NUMBER_GET_NEXT a new number is taken from the number range object and interval.
‎2011 Apr 18 2:45 PM
You will find the call in function PRELIMINARY_POSTING_FB01 which in turn calls RF_GET_DOCUMENT_NUMBER. The number range object is RF_BELEG. Normally, I would tell posters to use SE30 to find it but SE30 doesn't do a very good job of capturing the FV60 transaction completely.
‎2011 Apr 18 12:07 PM
Hi Vimal,
Try below logic!!!!!!
Create your number range through transaction (SNRO / SNUM). Over there in the domain level pass the variable (say vbeln) and give your interval.
Now in your report where you want to generate a new document number, use the FM NUMBER_GET_NEXT .
DATA: l_no TYPE inri-nrrangenr,
l_obj TYPE inri-object VALUE 'ZSDIDA'.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = l_no
object = l_obj
IMPORTING
number = g_number
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.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Over here l_no is the range sl no. & l_obj is the name of range which is created through transaction SNRO/SNUM.
Hope this will help you to resolve the issue & close the thread.
BR,
Vinit