Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Shabarish_Nair
Active Contributor
0 Kudos

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.

Scenario:

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.

Solution:

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 !!! 

5 Comments
Labels in this area