Skip to Content
Author's profile photo Shabarish V Nair

SourceFileTimeStamp – An useful ASMA?

If you would have noticed, there is an Adapter Specific Message Attribute (ASMA), SourceFileTimeStamp for the sender file adapter. This attribute can many a time actually be the core component of solutions to some ‘odd’ scenarios.

Lets take the below use cases;

1. In a source directory we have a file which has to be transmitted to a target directory. The source file has a specific name and needs to be send to the target whenever it is created/modified in the source directory. The catch here is, the customer is not willing to give delete/modify access on the source directory.

2. A file has to be read and processed into a target message format. The file is/maybe updated at specific intervals and only the updated content needs to be processed.

In such above scenarios, the ASMA SourceFileTimeStamp can come quite handy. 

Whenever a file is edited/modified, the file property called ‘Modified’ (In windows, right click a file -> properties -> general tab) will be changed to the latest timestamp. This is what we can use to check if the file is a new / updated one.

There are many ways in which you can design a solution in XI/PI when the above case scenarios come into play. Below I will try to explain one of the various approaches that you can adopt.


A text file is placed in a directory by the customer. This file needs to be transmitted to another directory. No mapping. The condition is that only if the file is a new/updated one, the file must be posted in the target directory. The customer is not willing to give you any kind of modify or delete access to his source directory.


The below diagram will give you an idea on the design approach.




Here we have used a DB to store the timestamp and we use a DB call to retrieve the timestamp. Similarly we can also have a RFC call which can help achieve the same result. If the file was modified, the timestamp will be different from the one that was earlier. This is what that will help us identify the file’s status. In the above, I have stopped the process at the Receiver determination level in case the file is not new. It can be designed to stop the process inside the BPM also once the check on the timestamps is done. 

I am sure we can redesign the whole concept to accommodate a better performance centric process. But the objective of this blog is just to give you an idea of the usage of that specific ASMA that can help save the day 🙂

Hope this was an interesting read !!! 

Assigned tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member
      We had a similar requirement for one of my earlier client and we followed ABAP mapping to store the values in XI tables.the advantage was that we could run a ABAP report at the end of the day and were able to avoid BPM.
      Nice to see it can be done at java level too:)
      Your blogs are always helpful
      Author's profile photo Shabarish Vijayakumar
      Shabarish Vijayakumar
      Blog Post Author
      good to know 🙂
      thanks !!!
      Author's profile photo Former Member
      Former Member
      Hi Sabarish,

      Nice article. I may use this in my current project. Have you thought about using Checksum to compare the file content change? Wouldn't this be more reliable approach on all OS?


      Author's profile photo Shabarish Vijayakumar
      Shabarish Vijayakumar
      Blog Post Author
      i feel checksum would be an additional logic overhead. If using existing standard provided by sap can be used, i would always recommend going with it than having to introduce and additional logic.

      What do u think about the same?

      ~~ Shabz

      Author's profile photo Ashutosh R
      Ashutosh R
      you mentioned

      "The file is/maybe updated at specific intervals and only the updated content needs to be processed."

      did'nt got how you achieve "only the updated content needs to be processed" . I think the whole file content is again sent to target directory. Is it possible to transfer only Delta/updated/added content of file. i.e