Skip to content

Latest commit

 

History

History
523 lines (257 loc) · 3.81 KB

getting-numbers-from-an-interval-c9b48a1.md

File metadata and controls

523 lines (257 loc) · 3.81 KB

Getting Numbers from an Interval

The CL_NUMBERRANGE_INTERVALS class provides methods for getting numbers from an interval at runtime.

Use the NUMBER_CHECK method to check whether a number is within an external interval.

Import Parameters

Parameter Name

Field Name

Value Help

NR_RANGE_NR

 

Interval number

NUMBER

 

Number to be checked

NUMERIC_CHECK

 

Numeric check (for numeric intervals only)

OBJECT

 

Number range object

SUBOBJECT

 

Sub-object

TOYEAR

 

To fiscal year

Export Parameter

Parameter Name

Field Name

Value Help

RETURNCODE

 

Return code

Use the NUMBER_GET method to determine the next number of a number range interval.

Import Parameters

Parameter Name

Field Name

Value Help

IGNORE_BUFFER

 

Ignore Buffer

NR_RANGE_NR

 

Interval Number

OBJECT

 

Number Range Object

QUANTITY

 

Number of Numbers in Buffer

SUBOBJECT

 

Sub-object

TOYEAR

 

To Fiscal Year

External Parameters

Parameter Name

Field Name

Value Help

NUMBER

 

Returned number

RETURNCODE

 

Return code

RETURNED_QUANTITY

 

Number of returned numbers

Sample Code:


…
  lv_object = 'Z_TEST_03'.
…
  CALL METHOD cl_numberrange_runtime=>number_get
       EXPORTING
         nr_range_nr = '01'
         object      = lv_object
       IMPORTING
         number      = DATA(lv_number)
         returncode  = DATA(lv_rcode).
…