Skip to Content

Wait time in SAP PI 7.31 ?

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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

6 Answers

  • Best Answer
    Posted on Sep 04, 2015 at 06:26 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 04, 2015 at 06:14 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

    • 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.

  • author's profile photo Former Member
    Former Member
    Posted on Sep 04, 2015 at 07:12 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 04, 2015 at 06:17 AM

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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 04, 2015 at 06:26 AM

    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


    SFTP_CC_sender.jpg (49.7 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 26, 2016 at 11:02 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded