Skip to Content

Files getting picked up early from SAP PI directory and from the source directory

The inbound (file to IDoc scenario) is such that:

1. Legacy application would place file (with some specific file name schema)in in its specified file folder.
2. IM would pick the file from the above folder with the help of some event and place file in folder /abc
3. PI would raise the above event with the help of specific job(run once a day) and hence it picks the file and place file from /abc and place in X3 folder /xyz
3. PI would pick the file from /xyz of bussiness service to PI X3 Server.
4. PI(X3) would receive the IDoc using Message.IDoc.Basictype and process it and generated iDoc


5. IDoc Message.IDoc.Basictype would be posted in ECC systems.

I am facing problem from the 4th step onwards, incomplete file is getting received by PI and thus failing at PI processing level.

Can anyone help me what level do I need to investigate to find tha actual root cause or why is this happening?

Please come up with your valuable suggestions and discussions.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    Posted on Jan 01, 2018 at 11:26 PM

    Hi Aishvar,

    Based on what you have described it sounds like your file sender polling is running too frequently (probably the default of 60 seconds which IMO is way too often) and you have not handled the potential for file writing & reading/deletion collision occurring by using the file modification check. The other possible method to solve the problem is to dial back the file polling frequency to decrease the chances of such a collision from occurring, which can also be further enhanced with the channel availability option.


    Ryan Crosby

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Aishvar,

      I would guess that the total file writing time for 1MB does not take very long but when you are polling so frequently you have a higher probability that your PI system will poll right as the file is in the process of getting created. We had an instance of this where invoices were getting picked up while the file was incomplete and causing the contents to never get sent (I don't care for the 60 second default because if it needs to get sent that often it probably shouldn't be file based). If you dial back the time to say 5, 10, 15 minutes or more then you start decreasing that probability with each step. The question is related to how critical this asynchronous integration is for the business and how long you can go without sending the data once it is ready. The channel availability option allows you to designate schedules for the channel so that when the schedule is not active the channel will be "stopped" which means it is not polling. You could use this option to set a specific schedule during each day, week or month for the channel to be running (polling).


      Ryan Crosby

  • Posted on Dec 27, 2017 at 11:49 AM

    Please let me know if you need more clarity in understanding the query

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 27, 2017 at 12:07 PM


    Can you tells us, is file at /xyz location is XML or csv and do u check the format of file?


    Anoop Rai

    Add a comment
    10|10000 characters needed characters exceeded

    • Thanks for the interaction Apu.

      I am aware of the functionality Modification check and I am using the same on my interface channel level.

      What I want to know is why is this happening ?

      At OS level, there might be scripts written, on which 1st ID is for job processing and then PI ID comes into picture

      Once PI ID is processed which triggers the functionality of file deletion after processing the file.

      Need to investigate on what basis is this script triggering this deletion functionality..does it check for complete file? or it has any time constraint after which it executes this functionality..

      If it checks for complete file, is there any concept of locks which is used ? means it cant delete the complete file once it is completely written.

      Your thoughts would be valuable and appreciated..

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.