Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

auto number generation

Former Member
0 Likes
374

Hi,

Please give full details about auto number generation ,

Thanks,

Suresh.m

Hi,

Please give full details about auto number generation ,

Thanks,

Suresh.m

2 REPLIES 2
Read only

Former Member
0 Likes
349

Hi Suresh

SEARCH IN SCN

Try FM GET_NEXT_NUMBERS

see https://www.sdn.sap.com/irj/scn/wiki?path=/pages/viewpage.action%3fpageid=50004015

regards

Sachin

Read only

Former Member
0 Likes
349

dear.

use fm NUMBER_GET_NEXT.

CALL FUNCTION 'NUMBER_GET_NEXT'

EXPORTING

nr_range_nr = w_range_nr

object = 'ZNO'

quantity = '000000000001'

  • SUBOBJECT = ' '

  • toyear =

  • IGNORE_BUFFER = ' '

IMPORTING

number = w_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

.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

Regards

vijay