‎2008 Nov 21 12:03 PM
HI All,
I have one ztable ZDESIGN having fields
NFDESIGN
DEPT
MACH_TYPE
MATNR
CODE
CUST_NM
MACH_NO
MAKTX
NETWORK_NO
QTY
MOD_CODE
STATUS
DVER
IMPL
PART_ST
RELBY
RELDT
i want to store the number in code field on save. but i want to add many records at one time.
while creating number range object(SNRO) , foll error is coming
Table ZDESIGN may have only the no.range el.field and the subobject as a key
how create number range object.
Thanks
‎2008 Nov 21 12:09 PM
hi kushi,
go to SNRO tcode and give data element as S_CARR_ID and give domain as ( take it from afru table the counter for confirmation number , that is the next field to the RUECK )
then give the warning percentage .
then maintain the number ranges.
here you need to add 01, 02 etc to the SCARR TABLE
WRITE A SMALL PROGRAM WHICH INSERTS THE CARRID values with 01 02 ETC.
now maintain the number ranges in the same SNRO tcode.
now call the FM NUMBER_GET_NEXT
regards
Ramchander Rao.K
‎2008 Nov 22 4:37 AM
Hi Ramchander,
Thanks for help.
Created number range.
but now how to use it in my module pool program. Please tell me.
Regards,
‎2008 Nov 22 4:56 AM
hi all,
Please tell me how this No.Range Object (ZABC) can be used in the program.
Thanks
‎2008 Nov 22 6:48 AM
‎2008 Nov 24 4:49 AM
Hi all,
I used CO_RUECK as Number length domain in SNRO tcode, will it affect the data in afru table ?
Another query is i use FM 'NUMBER_RANGE_INTERVAL_LIST' to get the first number in PAI .
How to increment it in next save. I want it monthwise, so i use subobject as 01,02, 03 etc.
Thanks
‎2008 Nov 24 4:53 AM
Hi Kushi,
it doesnt effect any other tables.
yes you need to use subobjects as you mentioned above.
Use FM NUMBER_GET_NEXT to get the next value.
regards
Ramchander Rao.K
‎2008 Nov 24 5:32 AM
hi Ramchander,
i write in PAI as follows
when 'SAVE'.
LOOP AT ITAB.
move itab-reldt+4(2) to sub. " date field' s month
CALL FUNCTION 'NUMBER_RANGE_INTERVAL_LIST'
EXPORTING
object = 'ZABC'
SUBOBJECT = sub
tables
interval = ZNRIV.
message W012(zdes) with ZNRIV-NRLEVEL.
MOVE ZNRIV-NRLEVEL TO ITAB-CODE.
MODIFY ITAB.
MODIFY ZDESIGN FROM TABLE ITAB.
CLEAR OK_CODE.
CLEAR ITAB.
SET SCREEN 1001.
ENDLOOP.
now how to increment it every month using FM 'NUMBER_GET_NEXT'.
thanks
‎2008 Nov 24 5:37 AM
hi,
check this.
[https://forums.sdn.sap.com/click.jspa?searchID=19051479&messageID=6400876]
‎2008 Nov 24 6:51 AM
hI,
But i am able to initialize it every month as 1st entry of every month may not done on 1st .
Thanks.
‎2008 Nov 24 7:07 AM
Hi Kushi,
Number ranges are not meant for initialization.
you need to use subobjects which allows you to create number range values for example based on the month.
you need not to increase the number every time.
the FM gives you increased number every time.
as i said earlier create entries in SCARR table. carrid values like 01 02 03 04 -- 10 11 12 ETC.
12 sub objects for 12 months.
then go to SNRO tcode and create the values for each month.
in the program
data date type sy-datum.
month(2) type c.
month = sy-datum+3(2) will give you the current month.
pass this to the FM NUMBER_GET_NEXT
along with other parameters.
hope this is clear to you.
regards
Ramchander Rao.K
‎2008 Nov 24 8:33 AM
Hi,
I understood the concept, but how to pass it intermediate table because my requirement is to pass the same number to all enteries in one transaction ta the time of save. What value should pass to nr_range_nr field of FM.
thanks.
Edited by: Khushi p on Nov 24, 2008 9:38 AM
‎2008 Nov 24 10:35 AM