2007 Dec 28 9:07 AM
what will this code get melst_exchdr TYPE J_1IEXCHDR.
lst_exchdr-EXNUM = J_1IEXCHDR-EXNUM.
DATA: BEGIN OF j1ii300,
sergrp LIKE j_1isrgrps-j_1isergrp,
END OF j1ii300.
DATA: BEGIN OF idata,
excnum LIKE j_1iexchdr-exnum,
exyear LIKE bkpf-gjahr,
END OF idata.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = '01'
object = 'J_1IEXCLOC'
QUANTITY = '1'
SUBOBJECT = j1ii300-sergrp
TOYEAR = idata-exyear
IGNORE_BUFFER = ' '
IMPORTING
NUMBER = idata-excnum
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.
IF idata-excnum <> lst_exchdr-exnum.
will it get the next number range for the object
or the next invoice number in the table j_1iexchdr
2007 Dec 28 2:49 PM
It will give the next number of the object.
Vinodh Balakrishnan