‎2005 Sep 16 11:36 AM
Hi all,
In my code I check if a number range subobject exists in table NRIV and when not existing I would like to add the subobject to the table. I know that the tables NRIV, TNRO and TNROT hold the data for the number range objects and subobjects.
I would like to know if someone has ever created a new number range subobject from code and what the minimum of entries to the tables (NRIV, TNRO and TNROT) are to get a new (working) subitem.
greetz Fred.
‎2005 Sep 16 11:54 AM
Hi Fred,
Try using function module NUMBER_RANGE_INTERVAL_UPDATE.
Sri
‎2005 Sep 16 1:21 PM
I would like to add a subobject to an existing number range without extra user input.
The system gets the subobject name and checks if it already exists of not existing I need to add an extra subobject with standard values with the name of the given subobject.
I can not find a Function (wihout dialog) to realize this, so I think I can add an entry to the tables through code. But I am not sure if the system accepts this (recognizes the new subobject) and which fields I need to fill.
All help on this subject is welcome.
greetings Fred.
‎2005 Sep 16 2:20 PM
Hello,
Do you mean this i am not sure.
select * from t003o where auart = x_bncom-auart.
endselect.
if sy-subrc = 0.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
NR_RANGE_NR = t003o-numkr
OBJECT = 'AUFTRAG'
QUANTITY = '1'
SUBOBJECT = ' '
TOYEAR = '0000'
IGNORE_BUFFER = ' '
IMPORTING
NUMBER = next_number
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.
Regards,
Shekhar Kulkarni
‎2005 Sep 16 2:57 PM
I would indeed like to use the function 'NUMBER_GET_NEXT' but when the subobject does not exist it will not work.
That's why I first check if the subobject exist and when not, than I must create one from source code.
I do not know how to create a subobject from source code.
greetings Fred
‎2005 Sep 16 3:59 PM
Hello,
Try using transaction snro. In this transaction you can create number range object and there are function module that are associated with that.
http://help.sap.com/saphelp_47x200/helpdata/en/1f/8311204bc511d189750000e8322d00/frameset.htm
http://help.sap.com/saphelp_47x200/helpdata/en/2a/fa0365493111d182b70000e829fbfe/frameset.htm
Hope this helps.
Regards,
Shekhar Kulkarni