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

Message.IDoc.Basictype

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 comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Jan 01 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.

    Regards,

    Ryan Crosby

    Add 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).

      Regards,

      Ryan Crosby

  • Dec 27, 2017 at 11:49 AM

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

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 27, 2017 at 12:07 PM

    Hi,

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

    Regards,

    Anoop Rai

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