‎2009 Dec 17 1:05 PM
Hi SAP Guru's,
Can we provide new number range to be genrated daily,
for eg.NR should be like this DDMMYY+(NEW-SERIAL NO)
posting date 11.12.2009: NR genrated is 111209001 to 111209050
posting date 12.12.2009: NR genrated is 121209001 to 121209060
and if somebody post document for 11.12.2009: NR genrated Should be genrated 111209051.
I am on implementation project , this is client's requirement.
It looks to me that this is not poosible but Please do suggest, how we can provide a solution for this problem.
Thanks & kind regards,
Rahul
‎2009 Dec 17 1:15 PM
Hi Rahul,
Use the FM 'QF05_RANDOM_INTEGER' to generate a random number and concatenate the obtained value with sy-datum field.
data : l_rnd_numb type i.
CALL FUNCTION 'QF05_RANDOM_INTEGER'
EXPORTING
RAN_INT_MAX = '999'
RAN_INT_MIN = '000'
IMPORTING
RAN_INT = d_result
EXCEPTIONS
INVALID_INPUT = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
concatenate sy-datum d_result into l_rnd_numb.
‎2009 Dec 18 4:52 AM
Dear Vasuki S Patki ,
Thanks for reply.
But my problem is to post the document in back date, in that case the sy-date will be the current date and i want to pick the document date or posting date mention in the order or invoice.
Kind regards,
Rahul
‎2009 Dec 18 5:41 AM
Hi Rahul,
As you said want to pick the document date or posting date mention in the order or invoice. Exactly thats what you have to do.
You will get that posting date field by debugging program. You have to just some efforts for that.
‎2011 Feb 10 1:26 AM
It is recommended from sap not to change the auto generated number range as there could be a chance of missing the number range .. We have refused this scenario to client by explaining the complication which can be faced on implementing it.. Closing the old thread........