cancel
Showing results for 
Search instead for 
Did you mean: 

Random Number

Former Member
0 Kudos

Hi,

Anybody have some easy sample code to generate a random number which can be assigned to payloadID attribute of a cXML message? It should be unique per message so I was thinking of using the current timestamp along with a random number and the sender and receiver interface name to identify the message.

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

bhavesh_kantilal
Active Contributor
0 Kudos

James,

One option ~~ Store a number in a ZTABLE and then access it in your mapping using RFC lookup API, increment the value and then restore it in your ZTABLE.

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-code-samples...

Regards,

Bhavesh

MichalKrawczyk
Active Contributor
0 Kudos

calling API for GUID ?

there are so many java classes available

for guid creation

no need to use any API lookup

Regards,

michal

bhavesh_kantilal
Active Contributor
0 Kudos

Michal,

Saw your reply for this thread and realised the same too

Regards,

Bhavesh