Skip to content

Latest commit

 

History

History
576 lines (365 loc) · 4.83 KB

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

File metadata and controls

576 lines (365 loc) · 4.83 KB

Getting Numbers from an Interval

The CL_NUMBERRANGE_RUNTIME 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

NUMBER_ALPHA

 

Obsolete. Please use the parameter NUMBER

LENGTH_CHECK

 

Check of number length

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

Export 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).
…

Use the NUMBER_STATUS method to determine the number status of a number range interval.

Import Parameters

Parameter Name

Field Name

Value Help

NR_RANGE_NR

 

Interval number

OBJECT

 

Number range object

SUBOBJECT

 

Sub-object

TOYEAR

 

To Fiscal Year

Export parameter

Parameter Name

Field Name

Value Help

NUMBER

 

Number status of the interval