cancel
Showing results for 
Search instead for 
Did you mean: 

Wait time in SAP PI 7.31 ?

manoj_khavatkopp
Active Contributor
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

manoj_khavatkopp
Active Contributor
0 Kudos

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

former_member213558
Active Participant
0 Kudos

Hi Monoj.

good to know that you found a solution.

but Can you please elaborate.

using Modification check option with EOIO enabled . means quality of service which is available in SFTP adapter's processing tab.



manoj_khavatkopp
Active Contributor
0 Kudos

Ramesh,

Under processing tab you have modification check use this and give the time interval i.e time gap interval required between each file to get processed from server and along with this you need to enable Qos= EOIO.

Answers (5)

Answers (5)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

manoj_khavatkopp
Active Contributor
0 Kudos

Hi Shreyansh,

I tried this but no result all files are getting picked at a time and getting processed at same time.

Br,

Manoj

Former Member
0 Kudos

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

azharshaikh
Active Contributor
0 Kudos

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

manoj_khavatkopp
Active Contributor
0 Kudos

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

azharshaikh
Active Contributor
0 Kudos

Hi Manoj,

AFAIK - It should not be an issue when you post multiple messages to Proxy..it will get processed (without getting stuck).

Are you facing any issues with this Config at runtime?

Regards,
Azhar

manoj_khavatkopp
Active Contributor
0 Kudos

Hi Azhar,

Their is no issue the scenario is working fine , all i need is a time gap to send message to ECC.

Br,

Manoj

vinaymittal
Contributor
0 Kudos

Why dont you increase the sender file adapters polling time to 3 minutes

manoj_khavatkopp
Active Contributor
0 Kudos

Hi Vinay,

Pool interval don't t help in my condition  , considering their are 10 files in SFTP server with naming convention *US*.xml all will be picked by once.

Br,

Manoj

iaki_vila
Active Contributor
0 Kudos

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.

manoj_khavatkopp
Active Contributor
0 Kudos

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

iaki_vila
Active Contributor
0 Kudos

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.