‎2008 Apr 11 9:49 AM
hi Guys,
Right now i am working in Dialog Programming.Material is transfered from PointA to PointB and at PointB they are scanning the material using the barcode scanner.
Once they scanned all the material and save i should create a Document No ( between a range of 40000-49999).
I need clarrifiacation on how to generate the document number ??*
is there any function module to read last document no ??
Regards,
Karthik.
‎2008 Apr 11 10:56 AM
Hi,
data : gexno(10).
call function 'NUMBER_GET_NEXT'
exporting
nr_range_nr = '01'
object = 'ZGPNO'
importing
number = gexno
exceptions
interval_not_found = 1
number_range_not_intern = 2
objec
t_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.tcode for creating Number range oblect : SNRO
CREATE OBLECT EX : ZGPNO
Create Number ranges as u wish like
ex.
01 - 400000 - 499999
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Apr 11, 2008 5:45 PM
‎2008 Apr 11 10:56 AM
Hi,
data : gexno(10).
call function 'NUMBER_GET_NEXT'
exporting
nr_range_nr = '01'
object = 'ZGPNO'
importing
number = gexno
exceptions
interval_not_found = 1
number_range_not_intern = 2
objec
t_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.tcode for creating Number range oblect : SNRO
CREATE OBLECT EX : ZGPNO
Create Number ranges as u wish like
ex.
01 - 400000 - 499999
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Apr 11, 2008 5:45 PM