on 09-04-2015 6:38 AM
Hi Experts,
We have SFTP--->PI--->Proxy.
We are picking XML file from SFTP and sending the same file to proxy as an attachment with help of javamapping.
FileNaming Schema : 01_US_DDMMYYSS.xml where US is common for all the files
like eg : 01_US_DDMMYYSS.xml , 02_US_DDMMYYSS.xml, 03_US_DDMMYYSS.xml etc..
So for this i have mentioned in SFTP sender comm channel in filename as *US*.xml .
Now assuming there are 10 files with above naming convention ,SFTP adapter will pick all these 10 files at a time process it and send it to ECC at once.
Now my question is:
1.Instead of picking all 10 files at one time can i pick one file with time interval of 3 min or something ?
2.If its not possible to pick one file at a time can i pick all at once but send to ECC one by one ??
I have got answer for my second option i.e with going for CCBPM and also i have found a blog where you can insert udf as below to wait in mapping.
UDF:
try{ Tread.sleep(3000) ;} catch (){}
But it doesn't seem a good idea to go fro BPM / Waiting in Mapping.
So can you please suggest any other approach to handle this ?
System : 7.31 , Dual Stack.
Hi Guys,
I got this solved :
1st approach :
using Modification check option with EOIO enabled .
By this way we can pick file one by one from SFTP server only.
2nd Approach :
Pick the file all at once and in mapping u need to write a UDF to wait for certain time but in this case also u need to have EOIO enabled.
Br,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Experts,
My scenario is File to IDoc where each line item should be posted as IDoc to SAP ECC but each IDoc with a wait time of say 60 sec, I tried with below UDF but all the IDocs are getting triggered at the same time.
public String timeDelay(String var1, Container container) throws StreamTransformationException{
{
try
{ Thread.sleep(30000);
}
catch (InterruptedException ie){}
return var1;
}
}
It is working in case of receiver file adapter[File to File] but not in case of File to IDoc scenario.
Thanks,
Nithin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Manoj,
Use the "Quality of Service" as Exactly Once in Order (Asynchronous), "Process Sequence" as Ascending by date and "Poll Interval" of 3 minutes.
With these setting, files should get processed one by one as you need.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Manoj,
Multiple Files will get picked up at a time, but they will remain in the internal queue of SAP PI. These files will get processed exactly in the order defined by "Process Sequence" parameter. Multiple files will not get processed in parallel.
You can refer the link below:
Guaranteeing Exactly Once In Order - Proxy Programming - SAP Library
Hi Manoj,
AFAIK - there is no standard config available in Channel to pick the files in interval.
Please check : Why does the Proxy receiver need the files in specific time Interval?
Also in the Sender SFTP CC, you have the option to process the files in particular order (as shown in screenshot)..i believe this should suffice to pick files in correct order (you can set it to pick wrt to Date or Name of the file)
Hope it helps
Regards,
Azhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Azhar,
1st thing : Proxy needs time gap because in case the first message is bit big and in ECC it it getting processed then what happens is at the same time if second messages come they wont be loaded and causes in failure.
2nd thing : Sequence is not my question ...file can be picked by name/ by date this doesn't matter but they will get picked all at once which should not happen in my case?
Br,
Manoj
Why dont you increase the sender file adapters polling time to 3 minutes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Manoj,
I don't know any standard way i consider a very interesting situation your question. The only that i think now is to do a batch file to rename the files and setting the oldest with a name that it will be the unique name accepted by the sender file poll.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Other then batch file what about file Modification ?
Because when i try this it behavior is quite different ..i had placed 4 files in SFTP and have mentioned d modification check as 1 min so whats happening is some times it picks one by one file and some times it picks 2 or more at once.
just need a clarification on how does the field modification works actually ?
and also i have mentioned EOIO.
Br,
Manoj
Hi Manoj,
It's only an idea, i haven't tried it. For example you have three files to be picked:
Example1.txt -> 00:00:10 (time the file was written)
Example2.txt -> 00:00:15
Example3.txt -> 00:00:20
Instead of take Example*.txt, you can try to do a batch file (OS execute before) to rename the oldest file and you will have:
OldestFile.txt -> 00:00:40 (time the file was written)
Example2.txt -> 00:00:15
Example3.txt -> 00:00:20
You can poll only OldestFile.txt.
Regards.
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.