Number Range Programs
*********************************************************************************
* Program Name : ZGET_NUMBER_RANGES Object ID: *
* Description : Number range programa *
* Create Date : 16.06.2018 *
* FO Owner : Rohini Kumar *
* Tech Owner : Rohini Kumar *
* Project Module : SD *
*********************************************************************** *
* Change Log *
*********************************************************************** *
* REQ# DATE WHO CHANGE_ID DESCR *
*---------------------------------------------------------------------- *
* 001 Initial *
******************************************************************************** *
REPORT zget_number_ranges.
DATA:
number TYPE i.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = '01'
object = 'ZRKNUMB1'
IMPORTING
number = 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.
WRITE :/ 'Next available number is: ', number.
* Program Name : ZGET_NUMBER_RANGES Object ID: *
* Description : Number range programa *
* Create Date : 16.06.2018 *
* FO Owner : Rohini Kumar *
* Tech Owner : Rohini Kumar *
* Project Module : SD *
*********************************************************************** *
* Change Log *
*********************************************************************** *
* REQ# DATE WHO CHANGE_ID DESCR *
*---------------------------------------------------------------------- *
* 001 Initial *
******************************************************************************** *
REPORT zget_number_ranges.
DATA:
number TYPE i.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = '01'
object = 'ZRKNUMB1'
IMPORTING
number = 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.
WRITE :/ 'Next available number is: ', number.
Comments
Post a Comment