cancel
Showing results for 
Search instead for 
Did you mean: 

What is the structure of MsgID or how it is generated?

Former Member
0 Kudos

Hi Everyone,

I want to create unique file name using Msg ID, but there is a limitation regarding the length of filename. So i want to know what is the structure or how Msg ID is generated? Is there any part of MsgID using which i can create unique filename? If yes which part(which characters/substring out of 32 characters) of MsgID?

Thanks in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Bharat,

For every message having unique message ID generated,

Based upon the Message ID u can find the status of the message in Message Monitoring.

If u want to check the MSG ID, Open the SXI_Monitor and check any message of the all coloumns.

Regards,

Skumar

Former Member
0 Kudos

Hi,

You can use the TimeStamp feature with file name to create the Unique file name each time in the file adapter.

If you wish to capture the messageID thne you have to do it in mapping and have to pass filename with dynamic configuration.

But its difficult to capture the just part of MessageID, as you are not considering the message ID then it can't assure you about the consistancy and uniquness.

Its better to go for TimeStamp for Uniqness

Thanks

Swarup

Former Member
0 Kudos

Hi Swarup,

Thanks for your quick reply.

I am generating filename in mapping and using it with variable substitution. So just adding time stamp is not sufficient in our case b'se so many messages are processed at the same time is generating the same timestamp and ultimately same filename.Right now i am using the timestamp with mili seconds but its not enough to generate unique filename.

Regards,

Bharat

Former Member
0 Kudos

Hi,

Then you can try to create the unique no including the few part of messageID + time in milisec

That will help to have more consitancy. I have already shared the link where you can use the MessageID.

But if this is the IDOC to file scenario then you can add the IDOC no with the filename...that will be also unique.

also refer -

Thanks

swarup

Edited by: Swarup Sawant on Aug 26, 2008 4:50 AM

Former Member
0 Kudos

Hi Swarup,

As you have mentioned that i can use part of MsgID + time in Milisec to generate a unique filename. This is exactly what i want to do.

Can you please tell me what part of MsgID will be unique, which i can use?

Thanks & Regards,

Bharat

Edited by: Bharat Rathod on Aug 27, 2008 3:39 AM

Former Member
0 Kudos

Hi,

The called RPC program will receive the unique message ID of the XI message in the first parameter. The format of this parameter has to be A36. The RPC program may use this parameter for duplicate message detection. The Message direction information and the message ID together form the MessageKey. The MessageKey is used in the MessageException and for the audit log

Thus you may take the initial/last few part of Message ID + timestamp.

Refer

http://help.sap.com/saphelp_nw04/helpdata/EN/17/50d440e14f8431e10000000a1550b0/content.htm

Thanks

swarup

Former Member
0 Kudos

Hey

Why not simply use the "Add counter" option in the receiver file adapter.

Thanx

Aamir

Former Member
0 Kudos

Hi Amir,

I think Add Counter option is available only for the File System (NFS) transport protocol.

And if in case you re-start the J2ee engine, this counter will be reset...and may have chances to create the filenames with same counter no...

Here he need to develop the file name with Unique identifier.

The Message ID has the format: xxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

So you may take 1st or last part.

Thanks

swarup

Edited by: Swarup Sawant on Aug 27, 2008 4:45 AM