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

Reg: function module for number range

Former Member
0 Likes
4,337

Hi,

I need to create number range using the Function Modules.

For that i am using the Fm "NUMBER_RANGE_OBJECT_UPDATE".

Could you please tell me what i need to give in the import parameters and export parameters.

Thanks in Advance,

Regards,

Kalyani.

5 REPLIES 5
Read only

Former Member
0 Likes
2,586

For creating number ranges you dont need function module.

You can go to Transaction Code : SNRO and create the number range and intervals.

For getting the increment number you can use FM : Number_GET_NEXT.

Read only

Former Member
0 Likes
2,586

hi ,

in the IMPORTING parameter

INDICATOR = V_INDICATOR<variable>

OBJECT_ATTRIBUTES = it_OBJECT_ATTRIBUTES <internal table>

OBJECT_TEXT = it_OBJECT_TEXT <internal table>

in the EXPORTING parameter

RETURNCODE = V_RETURN<variable>

in the TABLE you have to pass.

ERRORS = it_error <internal table>

Hope this helps

Regards

Ritesh J

Read only

0 Likes
2,586

Hi Ritesh,

Thank you for the response.

Could you please specify what values i need to pass in the internal tables 'it_OBJECT_ATTRIBUTES ' and 'it_OBJECT_TEXT ' and how do i need to declare this in the Data declarations.

Regards,

kalyani.

Read only

0 Likes
2,586

Hello Kalyani,

Use this:-

FORM UPDATE_OBJECT TABLES ERROR STRUCTURE INOER

USING INRO STRUCTURE TNRO

INROT STRUCTURE TNROT.

DATA: DUMMY(1) TYPE C.

CALL FUNCTION 'NUMBER_RANGE_OBJECT_UPDATE'

EXPORTING INDICATOR = 'U'

OBJECT_ATTRIBUTES = INRO

OBJECT_TEXT = INROT

IMPORTING RETURNCODE = DUMMY

TABLES ERRORS = ERROR.

ENDFORM.

hope this helps you..revert back incase of issues.

Re,Manas

Read only

viquar_iqbal
Active Contributor
0 Likes
2,586

Hi

Go to SE37

and check the FM " NUMBER_RANGE_OBJECT_UPDATE "

on the top right hand side youll find function module documentation it would give you a complete overview with an example.

  • Example taken from the documentation.

TABLES: TNRO,TNROT.
 DATA: BEGIN OF ERRORS OCCURS 10.
         INCLUDE STRUCTURE INOER.
 DATA: END OF ERRORS.
 DATA: RET_CODE(1)    TYPE C.

 * fill TNRO
 * fill TNROT

   CALL FUNCTION 'NUMBER_RANGE_OBJECT_UPDATE'
        EXPORTING  OBJECT_ATTRIBUTES  = TNRO
                   OBJECT_TEXT        = TNROT
        IMPORTING  RETURNCODE         = RET_CODE
        TABLES     ERRORS             = ERRORS.
   CASE RET_CODE.
     WHEN SPACE.
 *      Changes made without errors
     WHEN 'E'.
 *     Changes contained errors
 *     Process error
       LOOP AT ERRORS.
       ENDLOOP.
     WHEN 'W'.
 *     Warning messages occurred
 *     Process warning messages
       LOOP AT ERRORS.
       ENDLOOP.
   ENDCASE.

Thanks

Viquar Iqbal