Restricting polling in sender file adapter

Hi friends,
I have a requirement where I need to poll a file from an FTP server. But, if the file is being edited (some other application is writing to it) I need to avoid picking that file. Plz tell me how i can achieve this...waiting for ur replies.
Regards,
  Shilpa

Shilpa,
Check out this sap note :
[https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=821267|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=821267]
File Locking / Incomplete Processing
Q: I sometimes observe that files are processed only partially, i.e., only a fragment from the file's start is converted into an XI message. Nevertheless, the file is usually archived completely. Does the File Sender Adapter honor if another process has locked a file for exclusive use?
A: Unfortunately, the J2EE 1.3 technology the File Adapter is built upon does not support file locking. This limitation affects the File Adapter's operation. Depending on whether the JRE implementation for the operating system under which the adapter runs uses mandatory file locking or advisory file locking, opening a file that is currently being written to by another process will fail or not.
If opening the file fails, no problem exists and the adapter will try to open the file each poll interval until it succeeds.
However, if opening the file is not prevented by the operating system, the adapter starts to process the file although it is still being modified. Since XI 3.0 SP11 / PI 7.0 there is a parameter named "Msecs to Wait Before Modification Check" in the advanced settings of the File Sender channel configuration to work around this issue. This setting causes the File Adapter to wait a certain time after reading, but before sending a file to the Adapter Engine. If the file has been modified (which is basically determined by comparing the size of the read data with the current file size of the input file) after the configured interval has elapsed, the adapter aborts the processing of the file and tries to process the file again after the retry interval has elapsed.
If this option is not available for the settings you would like to use, the following algorithm (to be implemented in your application) may be used to ensure that the File Adapter only processes completely written files:
Create the file using an extension, which does not get processed by the File Adapter, e.g., ".tmp"
Write the file content
Rename the file to its final name, so the File Adapter will notice its existence and pick it up
Hope this will help.
Thanks,
Nilesh

Similar Messages

  • Sender File Adapter - Restrict number of file polled at each poll interval

    Hi all,
    PI  7.0 SPS16.
    We would like to know whether it is possible to configure a sender file adapter (file conversion mode) in order to restrain the number of file taken at each poll interval and if yes how ?
    Thanks for your future answers.
    Jean-Charles

    Hi Jean
    Standard adapter do not provide functionality to take an input like number of files to be taken at poll interval. But using adapter module you can achieve this.
    SAP PI is having the function to set poll timings and scheduling. You can write adapter module and execute this module using File adapter type communication channel before the standard bean and you can restrict the number of files.
    Check the link given above as well as this How to Guide
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3bdc14e1-0901-0010-b5a9-a01e29d75a6a
    Thanks
    Gaurav

  • Sender File Adapter always "Polling interval started" without complete

    Hi,
    I have problem with sender file adapter suddenlty the status from Communication Channel Log monitoring always with polling started without completed.
    4/25/11 11:40:33 AM   Polling interval started. Length: 10.0 seconds
    4/25/11 11:40:23 AM   Polling interval started. Length: 10.0 seconds
    4/25/11 11:40:13 AM   Polling interval started. Length: 10.0 seconds
    4/25/11 11:40:03 AM   Polling interval started. Length: 10.0 seconds
    Normal :
    4/25/11 11:41:50 AM   Polling interval started. Length: 10.0 seconds
    4/25/11 11:41:50 AM   Processing finished successfully
    4/25/11 11:41:50 AM   Processing started
    4/25/11 11:41:40 AM   Polling interval started. Length: 10.0 seconds
    4/25/11 11:41:40 AM   Processing finished successfully
    4/25/11 11:41:40 AM   Processing started
    I have tried to stop and start the channel but still no luck. This problem only happen for this particular communication channel others channel is working fine.
    Please advise other solution before i need to restart the java engine since this in the production environment. The problem is some of the process was delayed because this issue. CC was delayed to pickup the file.
    Thank You in advance.
    FL

    Hi Abhistek,
    Thank you for your correction. It was typo.
    Which assumption is correct ?
    1. All 3 instance running together in the same time ?  or
    2. Either 1 of the instance running once time manage by clustering setting.
    Example :
    15:01:00   ---> A
    15:02:00  -
    > A
    15:03:00  -
    > B
    15:04:00   -
    > B
    Currently :
    15:01:00   -
    > A    
    15:01:00   -
    > B (lock)
    15:02:00  -
    > A
    15:02:00  -
    > B (lock)
    It seems all 3 instance lose control from clustering ?
    Regards
    FL

  • Sender file adapter is not polling the file.

    Dear all,
       Sender file adapter is not polling the file.(But Receiver file adapter is getting the file)
    we have installed SP15.
    It was worked fine for previous SP14.
    I have cheked in Adapter monioring also.
    Can you help me out of this problem
    Regards
    Dhanabal

    Hi Dhanabal,
    Is the XI system running on a unix machine ?
    If yes, from the OS level for the folder you are using in the file comm. channel, execute the command
    <b>chmod 777 <folder_name></b>
    The reason for the file to show up in receiver side and not get deleted might be that the xi user mighht be having only read access to the folder...
    Thanks,
    Renjith.

  • Poll interval for sender file adapter.

    I have a 1_sender file NFS file adapter which picks a trigger file from X location in PI application server, this trigger file initiates the unix script present in the sender file adapter.
    Unix script brings all the file which starts with 25588* from bank FTP and places in Y location in PI application server then script deletes the "trigger file".
    another NFS File adapter  1_receiver file adapter places the trigger file in the X location of PI.
    for 1_sender file poll interval given as 86400, that means it should trigger only once a day @ 1:30pm.
    But today same sender file adapter had triggered 4 times, could any one let me know the reason why it had triggered 4 times instead of single time.

    Vidya,
    There are two things :-
    1. The polling interval should be 24 hrs;
    2. The polling interval should be 24 hrs and it should poll at 1:30 pm every day.
    For any reason if the channel is re-started, then with your present configuration, you will never be able to achieve # 2.
    So, better use ATP.
    But today same sender file adapter had triggered 4 times, could any one let me know the reason why it had triggered 4 times instead of single time.
    Might be the connection dropped / failed at the time of polling and the channel re-tried. If you give more details (what time and with how much interval it triggered), someone might be able to help.
    Regards,
    Neetesh

  • Selective Polling in the Sender File Adapter

    Hi,
    I have the following requirement
    1) File X is placed in the directory which is the source file for the sender adapter to poll
    2) File X is appended regulary with data until it is polled. During this appending the sender adapter should not poll this file
    3) Current process (without PI) they use a control file to stop this happening. i.e. they place a File Y in the directory to show the file is being updated and not to be touched. Once The file is appended File Y is removed and the file should be polled
    So ultimately I have to configure the sender adapter to poll for File X (say every minute) except when there is File Y in the directory.
    Any ideas?

    Hello,
    You can use the "Msec to wait before modification check" feature in sender file adapter to achieve the requirement.
    No need to place the "File Y"...i.e step 3 to perform.
    Check the below link for more details:
    http://help.sap.com/saphelp_nwpi711/helpdata/en/44/658ac3344a4de0e10000000a1553f7/frameset.htm
    -Rahul

  • Multiple directory locations in Sender File adapter

    Hi All,
              I have a scenario where my single adapter needs to poll from 7 different directory locations. Is it posible to configure all seven sorce directory location in single sender file adapter.
    Regards,
    Xier

    Hi,
    I apologize for wrong information, actually I never tried but it's possible after seeing this.
    Note:821267
    11. File Sender: Processing Multiple Source Directories
    Q: Can the File Sender Adapter be configured to poll multiple source directories from a single channel?
    A: This functionality is available starting with XI 3.0 Support Package 14 as well as PI 7.0.
    raj.

  • Problem facing in sender file adapter

    Hi XI gurus,
    I am facing a problem in sender file adapter communcation channel
    Is there any restriction in XI that XI picks max of 100 at a time .
    Actaully probolem here is My XI sender file adapter need to pick 2800 file from ftp.
    adapter need to file pick files ranging SAP_OUT_066581_280_INV.xml to SAP_OUT_SZ22TXN066581_2800_INV.xml
    to pick these we have given file name as u201CSAP_OUT_*_INV.xmlu201D when ever given this XI is coming with no messges.
    when ever file name is given as SAP_OUT_SZ22TXN066581_3*_INV.xml it XI has picked file from 300 to 399
    when eve tried with the options to pick all the message
    SAP_OUT_SZ22TXN066581_*_INV.xml  Failed with no messaege
    even atleast tried to pick 1000 mesaanges from 1000 to 1999
    i have given like this
    SAP_OUT_SZ22TXN066581_1*_INV.xml failed with no messages
    while trying with option xi picking file max 100 at a time
    SAP_OUT_SZ22TXN066581_1*_INV.xml
    SAP_OUT_SZ22TXN066581_11*_INV.xml
    SAP_OUT_SZ22TXN066581_12*_INV.xml
    like this I am increaing the number and picking maximum of 100 messages only
    Is there any way to auto mate this or nny file names need to be required
    waiting for your reply

    Check SAP Note 821267 - FAQ: XI 3.0 / PI 7.0/ PI 7.1 File Adapter.
    I guess point 8 might relate to your problem if the FTP adapter timeout occurs.
    check the note 849089 as well.
    Also check point 13 and 26.
    Gaurav Jain
    Points if answer is useful
    Edited by: Gaurav Jain on Jun 6, 2008 4:20 PM

  • Sender File Adapter Not Picking Any File

    Dear Expert,
    I am newbie in PI. Just tried to create File Content Conversion Scenario. Details as follow :
    1. Source Directory ..\file\log\test_q.txt
    2. Target Directory  ..\file\log\xml\test_q.xml
    Transport Protocol : NFS
    Message Protocol : File Content Conversion
    Adapter Engine    : Integration Engine
    I have completed all the design and configuration in IR and ID. However, when I produce the log file in the directory, nothing happen.
    Hacing checked in the RWB as well, I could not find any clue. simply nothing happen.
    Would you please advise me on how to trigger the interface? As per my understanding, sender file adapter will be activated directly once the file is created.
    Thank you very much in advance.
    Best Regards,
    Y

    Hi Yonisiwa,
       Things you should check here are:
    1) If the sender file adapter is active or not.
    2) If the source directory is correctly spelt or not. (Check if you are using the correct slash \ or /)
    3) The file name/mask is correct or not.
    4) The polling interval is too long.
    Alternatively, you can check the message monitoring in RWB at the adapter level and go into the audit log if the message.
    There you can see the reason for the file not being picked up.
    Also check the Communication Channel status in the Component Monitoring link in RWB.
    Regards,
    Ravi Kanth Talagana

  • Sender File Adapter is not reading anything

    Hi,
    I have a really strange problem here. I'm tyring to read a file using file adapter (FTP) and the adapter doesn't read anything and it does not throw any error in the communication channel monitoring.
    I'm using a receiver file adapter to write files to the same FTP folder, so it can't be a connectivity problem. And I tried to get the file using Filezilla and it works fine...
    In the sender file adapter I tried to simplify the maximum to solve the problem:
    - NO File Content Conversion
    - NO advanced attributes
    - I used the "*" in the file name to read any file
    - I've only configured the FTP connection, the folder and the file name. I don't understand why it isn't working...

    Yes I got this message:
    Polling interval started. Length: 5,0 seconds
    Now I tried something... In the FTP Connection parameters, I set as the server a random and unexisting name, and I get the same result...
    I'm starting to thing that some firewall is blocking the connection, but I have to wait until next monday to know this. But I don't understand why the receiver FTP channel is working...
    PD: The cache is correctly refreshed because I changed the polling interval time, and it has been updated on the monitoring

  • Production issue - Sender File adapter not picking up the files from folder

    Hi Guys,
    Ever since the upgrade from XI 3.0 to PI 7.1, we have come acrossinstances of weird error.
    Thsi time again - now the 3rd time - tandom basis, in our production PI server, we have teh file slying in the source directory folder in the server.
    I can see the files lying there in AL11.
    However, it looks like that the file polling has just stopped and the channel is going blank in channel monitoring.
    I have checked in SXMB_MONI and there are no messages since the morning.
    I have tried craeting a replica of the current channel but it is not working.
    This is teh production server and thsi has alraedy created production issues.
    I ahve checked in the SDN forum but am not able to find the details.
    Plaese help me.
    I am anyway going to raise the issue with SAP now.
    Regards,
    Archana
    <REMOVED BY MODERATOR>
    Edited by: Prateek Raj Srivastava on Jun 8, 2010 4:50 PM

    Hi Prateek,
    I have trying all sorts since the morning and then just checked teh file permissions.
    The file permissions were incorrect as compared ot the other files that were processed successfully today.
    Somehow the permissions were changed on the server and the interface channel was not able to poll the files.
    I got teh permissions changed back to 666 and all the files were pikced up in a minute.
    I got the folder checked and it seems like that the permissions were changed somewhere very early in the morning and we are trying to find out how it happened and who did that.
    However, another question i had - this sender file adapter was polling the source directory and deleting the files from there.
    I would have expected that if the channel had issues with the file permission because of which it was not able to access the file, it would have thrown an error something like the file permissions error.
    But there was not a single error in the channel monitoring.
    How can we configure it in a beter way so that we at least soem kind of error indication?
    Please advice.
    Regards,
    Archana

  • Sender File Adapter  not able to get file via FTP from an external system

    Hi,
    I have a Sender File Adapter using FTP which polls a server every 10 seconds looking for a file ".xml".  The adapter will connect and pick up the waiting file, but sometimes the adapter not able to get file via FTP from an external system. The file is on the server, but despite the polling, the adapter does not pick up it. There is no return error.
    The connect mode is Permanently and the transfer mode is Binary.
    Can you help me?
    Thanks.
    T.

    Hi Teresa,
    does this case appears with a file size higher the others?
    Personally, I do not recommend to have a polling under 1min.
    10s could be too just, if the file is not small and/or if the file server is far (several kilometers) to where the Adapter Engine is, and/or this file server is beside a firewall. Do not forget also that, with previous points, you could have like a conflict, betwen the 1st polling and the 2nd polling, if in less 10s PI adapter has not enough time: to connect to the FTP server (several Km), find the file (perhaps among 100 other files in the directory), go back to the file to Adapter Engine server (several Km again), convert your file to XML message (with a complex Content Conversion), then check the XML structure, and when all that is done, return back to FTP server (several Km), to archive the source file... Well It's my understanding of a FTP exchange with FILE adapter...
    If you really need a 10s polling, that's mean your have a pseudo real time interface. In that case, in my mind file should not be used! but we should use a Web service, JDBC JMS (any exchange without a physical object like a file). For me, it's a non-sens to have a file in that case.
    regards.
    mickael

  • Sender File Adapter Not Showing in Decentral Adapter Engine

    Hi,
    We have recently implemented a Decentral Adapter Engine on a windows box. The adapter engine seems to be working fine because my adapters show and seem to work fine in it.
    However, when I define a Sender File Adapter that uses File Content Conversion message protocol instead of just File messaeg protocol, the adapter does not show up in the decentral adapter engine.
    I made sure that Adapter Engine parameter in the Sender File Adapter shows the new adapter engine but that does not seem to be working. If change the Adapter Enginer parameter to show the Central Adapter Engine, then I can see the Sender File Adapter on the Central Adapter engine and it works fine. (Note: The Central Adapter Engine is installed on a Unix box) 
    Here are the paramters I defined for the Sender File Adapter:
    - Transport Protocol: File System (NFS)
    - Message Protocol: File Content Conversion
    - Adapter Engine: (new Adapter Name)
    Source Directory: (
    server/drive/path)
    File Name: purchaseOrder.txt
    Quality of Service: Exactly Once
    Poll Interval (secs): 60000
    Poll Interval (msecs):
    Retry Interval (secs):
    Processing Mode: Archive
    Add Time Stamp (checked)
    Archive Direcotry: (
    server/drive/path/archive)
    Process Read-Only files: (not checked)
    Processing Sequence: By Name
    Fiel Type: Text
    File Encoding:
    Operating System Command:
    Additional Files (not checked)
    Content Conversion Parameters
    Document Name: MT_Request_File_Data
    Document Namespace: http://nxy.tots/fg_admin
    Document Offset:
    RecordSet Name: Purchasing
    RecordSet Namespace:
    RecordSet Structure: Purchase_Record,*
    RecordSet Sequence: Ascending
    RecordSets per Message: 1
    Key Field Name:
    Key Field Type: String(Case-Insensitive)
    Purchase_Record.fieldFixedLengths: 8,4,2,10,10,12,18,12
    Purchase_Record.fieldFixedType: char
    Purchase_Record.fieldNames: Request_Action,Request_PO_Num,Request_PO_LN,Request_PO_Date,Request_Purchasing_Org,Request_Purchasing_GName,Request_Created_By,Request_Vendor_Name
    Purchase_Record.fileContentFormatting: trim
    Adapter Status: Active
    Advanced Mode: (not checked)
    Your help is much appreciated.

    Hi Alaa,
    look into this document:
    http://service.sap.com/nw-howtoguides -> Exchange Infrastructure -> Troubleshooting: Adapter Engine 3.0 (Expert Call slides)
    If the File Adapter works without conversion, then you should count the number of fields in a row. If it differs from the configuration, then it runs on error.
    Another idea is to check the content type of the file. When you do not enter a File Encoding, then the file adapter assumes utf-8. If the file is for example latin-1, then the number of characters in a row are not counted correctly.
    Regards
    Stefan

  • Sender File Adapter: Picking of Files

    Hi,
    I have a requirement where in my file adapter has to pick files from a FTP server after 10 minutes of its creaion on the FTP server. Some application will place file on this FTP server exactly after 10 minutes of its creation on this FTP server only it should be picked by the sender File Adapter. Is there any way to achieve this? Please provide me your thoughts on resolving this.
    Thanks,
    Vijay Kumar T.

    >
    Vijay Kumar Thirumareddi wrote:
    > Hi,
    >
    > I have a requirement where in my file adapter has to pick files from a FTP server after 10 minutes of its creaion on the FTP server. Some application will place file on this FTP server exactly after 10 minutes of its creation on this FTP server only it should be picked by the sender File Adapter. Is there any way to achieve this? Please provide me your thoughts on resolving this.
    >
    > Thanks,
    > Vijay Kumar T.
    as mentioned by suraj, the ideal way is to have a spearate folder where the files will be moved after the 10 minutes of its creation.
    PI/XI will poll this folder and pick files.
    out of curiosity, can i know why there is such a requirement of 10 min?

  • Read uniquely named file. Sender File Adapter unsuitable for synchronous

    Hi All,
    We have a requirement to read a specific file that has a unique name based on a transaction ID. The transaction ID will be passed from the source application.
    The communication is required to be synchronous. There could be multiple requests/files generated and present at the directory at any given time but each corresponding to a specific transaction ID. If the file is not yet generated for that transaction ID we return back an error to the calling system.
    I think we can not use Sender File Adapter - because of the dynamic naming and also because we have to return a synchronous response back depending on the file availability. i.e. We can not have a defined pattern in the file name nor can we specify a wild card as there could be more than one files in the location.
    In theory we could use the File Sender adapter to read all the files in the directory and a BPM with correlation set based on the transaction ID and let the process wait for the request. But as far as possible I want to avoid this unnecessary wait or extra demand on the system. More so because the files could get big.
    If I were using a tool like SAP Business Connector or webMethods then I would I used a readFile Java service and given it a filename to return the required bytes in a synchronous read.
    Is something like this possible in XI? If someone has written a synchronous Java to read file can they share the code? Or do you suggest I write a ABAP server proxy to read the file?  The problem however will be how do we map the data to a XML within the code.
    All suggestions welcome. There has to be a simple and effective solution to this mundane requirement !
    Wishing all SDNers a bright start to this new year,
    Thanks,
    Charu
    Message was edited by:
            Charu Kulkarni
    "The transaction ID will be passed from the source application so we know what file to pick"

    Hi,
    You could make the scenario a little simple and avoid custom development if the logic can be put into scripts(out of XI).
    Say all the files are coming into a directory called D1.
    Here, you could use a script to arrange all these in an order (say ascending) and move the first file into another directory D2.
    The sender file adapter would poll this directory D2. The adapter can have a wild card character for the filename field now.
    Once the file is in XI, you could check this against the transactionId present(I am not sure how you get this though!), and determine whether to send a mail, or to send a file back.
    Here, I have assumed that there is somekind of order present in the files placed in the directory D1.
    Again, this is just a suggestion.. I might be wrong with all the assumptions.
    Regards,
    Smitha.

Maybe you are looking for

  • Can you look at my code?

    Ok, Murray was kind enough to help me but then I managed to mangle everything so I'm starting from scratch. I work in graphics but not in web design, so html and css are fairly new to me. I put together a simple set of images and I successfully got t

  • Problem validating an XML document with a schema containing xs:include

    I have a problem using an include statement in xsd. I try to include another schema by using the include statement: <xsd:include schemaLocation="../../XXX.xsd"/> and get the xjc error: s4s-att-invalid-value: Invalid attribute value for 'schemaLocatio

  • I-Trigue 3400 (No Sound Problem)

    I was listening to music through winamp. Not loud at all. Suddenly the sound just stop coming out for no reason. My winamp is still playing though. First thing I do is check all the connections. Everything is in place. After trying to go from my ipod

  • ITunes Mac or Windows

    I have a question about iTunes and whether or not it is better to "manage" your iTunes library on a Mac or Windows.  Maybe, the answer is there isn't really a difference.  However, I would think that since iTunes is a Apple product and a Mac is an Ap

  • Skype 7.4 has stopped working.

    I have made sure that all my drivers are up to date and that windows is also all up to date. I've uninstalled Skype and rebooted and installed Skype again and nothing seems to work. I'm at a lose as to what to do. Here is my error message: Faulting a