Skip to Content
Author's profile photo Fariha Kazi

Multimapping and creating unique file name in SFTP Adapter

There may be numerous ways to get unique file name in case of multi-mapping for 1..n scenario.

 

 

The way I did it was using %TIME parameter in Filename .

 

The %TIME parameter specifies time in milliseconds.

 

 

Here the last 13 characters i.e. 1507752503785 is time specified in milliseconds which when converted to date becomes 

 

 

 

Although SAP help has specified it to be used in Archiving section, but all these parameters do work for the main filename too..

 

 

 

Regards

Hope it will save you some time… 😉

Assigned Tags

      5 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Evgeniy Kolmakov
      Evgeniy Kolmakov

      Hi Fariha!

      And why simply not to use "Add TimeStamp to file name" option in adapter's properties?

      Regards, Evgeniy.

      Author's profile photo Fariha Kazi
      Fariha Kazi
      Blog Post Author

      There was a filelength restriction due to which I had to truncate the uniqueness .

      Author's profile photo Fariha Kazi
      Fariha Kazi
      Blog Post Author

      Also to add you could see  we have other parameters that can be used too , like %SEQNUM giving unique sequential number to each file during multimapping,

      Author's profile photo Evgeniy Kolmakov
      Evgeniy Kolmakov

      Hi Fariha!

      As far as I remember, %SEQNUM will work if B2B Add-on is installed.

      Regards, Evgeniy.

      Author's profile photo Fariha Kazi
      Fariha Kazi
      Blog Post Author

      Too Late to reply , but yes thanks for pointing that . We do have a B2B add on.

      This, too, did not help as few files were overwritten due to same timestamp and I ended up writing an adapter module instead as here each message had there own XI header.

      Regards