‎2008 Jun 19 11:12 AM
Hi,
I want to know if there is a FM or craft to manage incremental numbers like 'VBLNR' or 'BELNR' in program
Thanks
F000000001
F000000002
F000000003
.
.
.
.
.
F000000010
‎2008 Jun 19 11:15 AM
ur requirement is not clear..wat do u mean by managing incremental numbers?
‎2008 Jun 19 11:20 AM
I select the max of 'VBLNR' in table 'REGUH' for insering the next number of 'VBLNR':
For example the max is 'F000000009' i should add
'F000000010'
‎2008 Jun 19 11:37 AM
declare a constant
co_con(7) type c value 'F000000'.
wf_temp(10) type c.
wf_c type c.
wf_int type i .
wf_int = wf_int+1.
wf_c = wf_int.
concatenate co_con wf_c into wf_temp.
wf_ebeln = wf_temp.
then wf_ebeln will contain the incremented value.
Reward points if its useful....
‎2008 Jun 19 11:43 AM
what will be the next number for F999999999?
If it is going to be G000000001, then what will be the next number for Z999999999
‎2008 Jun 19 11:47 AM
the only way out is to catch the last two digits of the numuber....and increment the same..
‎2008 Jun 19 11:16 AM
It is not possible to increment an alpha numbering number directly.
We have to split the character and the numeric part seperately and concatenate them again
Hope this helps,
Janani
‎2008 Jun 19 11:18 AM
‎2008 Jun 19 11:28 AM
Hi
Check this link
http://www.saptechnical.com/Tutorials/ABAP/SNRO/SNRO.htm
if want prefix with , u concatnate F with no coming from NUMBER_GET_NEXT.
thanks
sitaram
‎2008 Jun 19 11:37 AM
Steps to create Incremental Numbers
1)Create a number range through transaction SNRO like Z_DISPO
2)Define Number Ranges through SNUM as you like
3)Call the FM "NUMBER_GET_NEXT" to get the next free number.
call function 'NUMBER_GET_NEXT'
exporting
nr_range_nr = '01'
object = 'Z_DISPO'
importing
number = v_disposition_no
* QUANTITY =
* RETURNCODE =
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 .
‎2011 Feb 08 8:21 PM