Polling issue in File Adapter scenario

Hello Experts,
I have a scenario where in I am using a batch command to rename a file before processing it using "run operating system command before message processing". The command works fine and renames the file, but the issue is that it does not process the renamed file in the same polling interval.
In next polling interval the file is processed as expected.
Can you please let me know the reason why this might be happening?
Thanks.

Hi Ravi,
First the file is picked and then the pre-message processing OS command is executed and then the message is processed. Processing of the message is not dependent on whether the OS command gets executed successfully or not. Basically, PI issues the OS command and then processes the message.
So if you have renamed the file using OS command it should be picked up in the subsequent interval.
Hope it helps!
Cheers,
Anand

Similar Messages

  • Data tuncated in file adapter scenario

    Hi,
    File adapter scenario - Sender systems passes a file (csv format) to PI which has one of field as 0001. This field is received at PI without the prefix 000. But, the target systems requires the data to be in the same format as the sender. How to solve this?
    Thanks

    Satish,
    It is the behaviour of the CSV files that it trims leading zeros in the columns with numeric values, try this open the CSV file and select the column and right click it in the context menu you would find FORMAT CELLS and change the type of the column to TEXT so that whatever values you enter in that column remain as it is without truncating.
    Also, the trick at following link would help
    [http://www.howtogeek.com/howto/microsoft-office/how-to-import-a-csv-file-containing-a-column-with-a-leading-0-into-excel/]
    Hope this resolves your issue!!
    Regards,
    Amit

  • How can i pass the name of the file polled by the file adapter to next step

    Hi XI guru's ,
    How can i pass the name of the file polled by the file adapter to next step in a BPM..?
    regards,

    Use Adapter-Specific Message Attributes and map that value in udf to the BPM message.
    Also see this
    /people/michal.krawczyk2/blog/2005/06/11/xi-how-to-retrieve-messageid-from-a-bpm
    Regards,
    Prateek

  • 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

  • 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

  • Regarding issue sender file adapter in clustered  environment(PI 7.0)

    Hi Experts,
    we  are using  sender  file adapter in clustered environment(there are 6 J2EE cluster nodes in XI system) for an interface.the  file sender communication channel  for this interface  is scheduled to run twice  every day. recently   the   channel stopped polling (picking the files from the source directory) and i dont see any error.
    when i open Communication Channel monitoring in RWB and select the file sender communication channel  and run it manually, none of the cluster nodes  are polling for the file.
    i have tried   editing the communication channel in Integration Directory   and  activating  it. but it does not pick the file.
    Can you let me know how  the issue can be resolved.
    Thanks
    -Kaushik
    Edited by: Kausik M on Dec 18, 2008 4:13 AM

    Kausik,
    A computer cluster is a group of linked computers, working together closely so that in many respects they form a single computer. The components of a cluster are commonly, but not always, connected to each other through fast local area networks. Clusters are usually deployed to improve performance and/or availability over that provided by a single computer, while typically being much more cost-effective than single computers of comparable speed or availability.
    clearly your cluster nodes are out of sync...!!!!
    It is possible that your ftp server went down for a while . And in the profile of FTP machine the entry of XI server is not made permanent .
    1. Try to ping the FTP site from XI server.
    BTW are u getting any error msg at RWB ?
    Regards,

  • Maximum Polling Interval in File Adapter

    Hi,
    Can you please let me know what can we set as the maximum polling interval in the Sender File adapter?
    I have a scenario where I am setting the File Adapter polling interval as 7884000 secs. i.e.2190 hr= approx 3 months.
    But the file adapter is polling at very short intervals.
    Any help on this would be appreciated.
    Regards,
    Sampada

    You need to configure the polling settings so that the system does not become overloaded, but at the same time, in a way that end users do not notice a major decrease in performance over time. Keep in mind that the greater the polling interval, the less frequently users will receive updates.
    Adapter Scheduling - Hail SP 19 :-)

  • How to set DAY as a polling time in file adapter?

    Hi all,
    I have a scenario where I have to pick a file weekly once. But due to some maintanance activity XI system will be restarted on monthly basis. Due to that the weekly polling freuquency is not going to work properly.
    For example Wednesday I have to pick a file and thursday system is restarted so the polling frequency also will be restarted from thursday.
    Is there any way to get rid of this scenraio?
    Is it possible to configure any adapter modules for making the file pick only on WEDNESDAY?.
    Can anyone please help on this?
    Thanks,
    Jayanh

    Hi
    Hope it helps..
    Note:You will need to have the authorizations of the user group SAP_XI_ADMINISTRATOR with the role modify.
    Go to Runtime Workbench -> Component Monitoring -> Communication Channel Monitoring
    Locate the link Availability Time Planning on the top right corner of your Communication Channel Monitoring page.
    In your case, the requirement is to schedule the Sender file adapter daily once at 8:00 at morming.
    In Availability Time Planning, choose the Availability time as daily and say create.
    Provide the details like the time 12:00
    Then select the communication channel , goto the Communication Channels tab and filter and add the respective channel (File Sender).
    Once all the above has been done 'Save' the changes.
    For more
    /people/shabarish.vijayakumar/blog/2006/11/26/adapter-scheduling--hail-sp-19-
    /people/alexander.bundschuh/blog/2006/01/04/scheduling-messages-in-sap-xi
    Thanks

  • Polling interval in file adapter.

    Hi,
    I have a doubt regarding the file adapter polling interval.
    Suppose we get a file of size 512 MB and PI file adapter taking long time (say 15 Min) to process it, we have a polling interval of 10 min.
    I have a 2 doubt in this case.
    1. what will happen in the next polling interval. because the older file still is in process and it is still in the source folder location.
    2. if at the same time there is new file get places in same folder location. then how the file adapter behave in this case. Is it start picking the second file or again poll the incomplete file.
    I want to know that is PI maintaining some lock while processing some file from source folder.
    regards,
    Navneet

    Hi,
    I guess normally it should process both files, earlier one which is in process and the new one as well (it depends your selection string in file name scheme).
    Also refer thsi Wiki to help in avoiding duplicate file processing:
    http://wiki.sdn.sap.com/wiki/display/XI/DifferentwaystokeepyourInterfacefromprocessingduplicate+files
    Regards,
    Divyesh Vasani

  • Issues with File Adapter

    Hi!
    I am working on File(source.csv)->Xi->File(Target.csv) Scenario.
    In my Source File i have 4 fields which are mapped to the target file which contains 2 additional fields with constant values mapped.   So, I should get 6 fields at receiver end.
    <b>Source structure</b>                      
    CharacterName                                 
    Lowerlimit                                                                               
    Upperlimit
    Targetvalue                                     
      <b> Target Structure</b>
    CharacterName 
    Lowerlimit
    Upperlimit
    Targetvalue
      Plant (constant value -1000)
      Status (Constant value - Released)  
    But, While using file adapter it showing only 4 fields of my Source file at the receiver end , not the ones which have been mapped with constant values(It is with out Using FCC) .
    When i  use FCC under File Adapter,  XI is not picking the file. These are the parameters I am defining at Sender Adapter:
    Document Name : file_rece( Not sure whether it should be similar as of my Msg Type name)
    RecordSet Name :Record (not sure abt naming conventions)
    Recordset Structure : main,1
    In parameters:
    main.fieldNames:CharacterName,Lowerlimit,Upperlimit ,Targetvalue
    main.fieldSeparator: ,
    main.endSeparator : 'nl'
    Receiving Adapter:
    Recordset Structure : main,1
    main.fieldSeparator :,
    main,endSeparator : 'nl'
    ---I gone through some previous posts but cant able to resolve it.
    Regards
    Parth
    <b></b>

    Hi! Bhavesh
    <b>This is the source Data type xml format generated in IR:</b>
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http:
    bSU1" targetNamespace="http:
    bSU1">
         <xsd:element name="bsu_source" type="Bbsu_target_dt" />
         <xsd:complexType name="Bbsu_target_dt">
              <xsd:annotation>
                   <xsd:appinfo source="http://sap.com/xi/TextID">
                   853e43e0755211dba7bf001560a58e89
                   </xsd:appinfo>
              </xsd:annotation>
              <xsd:attribute name="CharacterName" type="xsd:string">
                   <xsd:annotation>
                        <xsd:appinfo source="http://sap.com/xi/TextID">
                        a9f9a8a073a911db9df8f654ac1116d8
                        </xsd:appinfo>
                   </xsd:annotation>
              </xsd:attribute>
              <xsd:attribute name="LowerLimit" type="xsd:integer">
                   <xsd:annotation>
                        <xsd:appinfo source="http://sap.com/xi/TextID">
                        a9f9a8a173a911dbaaabf654ac1116d8
                        </xsd:appinfo>
                   </xsd:annotation>
              </xsd:attribute>
              <xsd:attribute name="UpperLimit" type="xsd:integer">
                   <xsd:annotation>
                        <xsd:appinfo source="http://sap.com/xi/TextID">
                        a9fb2f4073a911db868ef654ac1116d8
                        </xsd:appinfo>
                   </xsd:annotation>
              </xsd:attribute>
              <xsd:attribute name="TargetValue" type="xsd:integer">
                   <xsd:annotation>
                        <xsd:appinfo source="http://sap.com/xi/TextID">
                        a9fb2f4173a911db9ed2f654ac1116d8
                        </xsd:appinfo>
                   </xsd:annotation>
              </xsd:attribute>
         </xsd:complexType>
    </xsd:schema>

  • Duplicate File Handling Issues - Sender File Adapter - SAP PO 7.31 - Single Stack

    Hi All,
    We have a requirement to avoid processing of duplicate files. Our system is PI 7.31 Enh. Pack 1 SP 23. I tried using the 'Duplicate File Handling' feature in Sender File Adapter but things are not working out as expected. I processed same file again and again and PO is creating successful messages everytime rather than generating alerts/warnings or deactivating the channel.
    I went through the link  Michal's PI tips: Duplicate handling in file adapter - 7.31  . I have maintained similar setting but unable to get the functionality achieved. Is there anything I am missing or any setting that is required apart from the Duplicate file handling check box and a threshold count??
    Any help will be highly appreciated.
    Thanks,
    Abhishek

    Hello Sarvjeet,
    I'd to write a UDF in message mapping to identify duplicate files and throw an exception. In my case, I had to compare with the file load directory (source directory) with the archive directory to identify whether the new file is a duplicate or not. I'm not sure if this is the same case with you. See if below helps: (I used parameterized mapping to input the file locations in integration directory rather than hard-coding it in the mapping)
    AbstractTrace trace;
        trace = container.getTrace();
        double archiveFileSize = 0;
        double newFileSizeDouble = Double.parseDouble(newFileSize);
        String archiveFile = "";
        String archiveFileTrimmed = "";
        int var2 = 0;
        File directory = new File(directoryName);
        File[] fList = directory.listFiles();
        Arrays.sort(fList, Collections.reverseOrder());
        // Traversing through all the files
        for (File file : fList){   
            // If the directory element is a file
            if (file.isFile()){       
                            trace.addInfo("Filename: " + file.getName()+ ":: Archive File Time: "+ Long.toString(file.lastModified()));
                            archiveFile = file.getName();
                          archiveFileTrimmed = archiveFile.substring(20);       
                          archiveFileSize = file.length();
                            if (archiveFileTrimmed.equals(newFile) && archiveFileSize == newFileSizeDouble ) {
                                    var2 = var2 + 1;
                                    trace.addInfo("Duplicate File Found."+newFile);
                                    if (var2 == 2) {
                                            break;
                            else {
                                    continue;
        if (var2 == 2) {
            var2 = 0;
            throw new StreamTransformationException("Duplicate File Found. Processing for the current file is stopped. File: "+newFile+", File Size: "+newFileSize);
    return Integer.toString(var2);
    Regards,
    Abhishek

  • CSV to CSV (FILE to FILE Adapter)Scenario

    Hi All,
             Kindly provide an immediate response..
    The error is as follows..
    Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter '.fieldFixedLengths' or '.fieldSeparator' is missing

    Hi Dhayanadh.
    First let me confirm if you are using a flat file with fixed field lengths. if that is the case, then you need to specify the length of each field in the content conversion parameters.. for example
    record.fixedFieldLengths : 10,14,12
    where in 10 is the length for the first, 14 for second and 12 for the third one.
    in the other case if, the field lengths are not fixed, then we need to mention the field separator in the conversion parameters.
    Just check if you have provided that....
    Browse these links....these could be provide you with an idea about content conversion...
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    Let me know if it has helped you..
    Regards,
    Hari

  • Special character u00A3 and u20AC sign issue in File adapter

    Hi Experts,
    Kindly help me out. I am using file adapter and File encoding as ISO-8859-1.It's converting the file data u20AC as " &amp#8364; " and  £ as
    " &amp#163; "
    Whether ISO-8859-1 supports all the special characters.or I need to use some other encoding.
    Regards,
    Nutan

    Hi Ramesh,
    Thanks for the reply. I have done the same. This is the code:
    While testing in mapping euro sign is displayed as u20AC so as per the java mapping it is getting converted as &;#8364. So what changes I need to do.Whether I have to take care of # i the code or not.
    public class HandleSpecial implements  StreamTransformation
         public void setParameter(Map param)
         public void execute(InputStream in,OutputStream out)
              try
                   //String read_data;
                   int read_data;
                   int read_nxt_data;
                   while((read_data = in.read()) != -1)
                        if (read_data != '&')
                        out.write(read_data);
                        else
                             in.mark(1);
                             read_nxt_data = in.read();
                             if (read_nxt_data != '#')
                                  in.reset();
                                  out.write(read_data);      
                             else
                                  out.write("&amp;#".getBytes());
                   out.flush();
              catch (Exception e)
    Regards,
    Nutan

  • Adding Namespace in Sender File Adapter Scenario.

    Hi All
    I have a scenario where  XI has to Pick Up XML a file and process it. The structure of the file is as follows
    <?xml version="1.0" encoding="UTF-8" ?>
    <Header>
         <Seg1>
         </Seg1>
    </Header>
    This file does not contain any any namespace tag. I guess XI would not be able to pick up this file if there is no namespace in the XML file . The file expected by XI would be something like this.
    <?xml version="1.0" encoding="UTF-8" ?>
    <ns0:MessageTypeName xmlns:ns0="...namespace...">
    <Header>
         <Seg1>
         </Seg1>
    </Header>
    </ns0:MessageTypeName>
    Is there a way this can be handled at the File Sender adapter side . I am aware about  adding adapter module. Is there any other way to add the missing two namespace tags at the top and bottom of the file .
    any help would be appreciated.
    regards
    Nilesh .
    Edited by: Nilesh Taunk on Apr 7, 2008 2:11 PM

    Hi Nilesh,
    Yes it is possible in File sender adapter to give the namespace. In FCC you can give inside Document Specification.
    Under Document Name, enter the name of the XML document.
    The document name is inserted in the message as the main XML tag. This is mandatory for the mapping.
    Under Document Namespace, enter the namespace of the document.
    The namespace is added to the name of the document. This is mandatory for the mapping
    I hope this will help you.
    Regards
    Aashish Sinha

  • RFC-XI-File Adapter scenario

    Hello SDN members,
    We are about to start the configuring XI 3.0 for connecting the SRM Module as a source and Portal as a destination to transfer a file. We are planning to have a function module to generate the flat file from SRM.
    We need to process the data file from SRM to a portal.
    Could some body suggest me the process flow to accomomplish this ?
    Appreciate your time.

    Hi Steve,
    If the SRM module is creating a file, and the file has to be transfered from SRM system to Portal system, then you need to look at configuring a 'File -> XI -> File' scenario.
    To work with File-XI-File scenario, refer to this blog:
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    If you are looking at a just <b>Flat file transfer</b> and no mapping in XI, then:
    it is possible to create a scenario to transfer any sort of files : including binary files.
    <b><u>Steps:</u></b>
    In Repository:
    Create a data type (say dtBlob) with one field (data) of any type (xsd:string)
    Create a Message type (mtBlob)
    Create Two Message Interfaces (miBlob_IN & miBlob_OUT) : Aysnchronous Inbound & Outbound interfaces.
    Message mapping & interface mapping are not required.
    In Directory:
    Create a Sender Agreement with this interface (miBlob_OUT)
    Create a Receiver Agreement with miBlob_IN
    Create Receiver Determination: From SRM system to Portal.
    Create Sender channel for SRM system - File/FTP Adapter
    Create Receiver channel for SRM system - File/FTP Adapter
    <b><u>Process flow:</u></b>
    Input Flat File (from SRM) is read by File/FTP Adapter and passed as it is to Integration Engine. It can be archived after pickup.
       The flat file is not parsed into XML here.
    Since no interface mapping is specified in XI, the same data is passed onto the target message.
    The same data is passed further passed to the Target File/FTP adapter of Receiver.
    The receiver adapter creates the file in the target destination.
    Flat File transfered.
    Hope this answers your concern.
    -- Pops V

Maybe you are looking for

  • Report to Report

    Hi, I have a report in which I have inserted 3 more reports using report to report interface.I have the following doubts. When I run the first report and select GOTO option it shows me all the remaining 3 reports. If I execute the second one, after t

  • Need help in sql statemet.

    SQL> select b.dname,b.deptno,cursor(select * from emp a where a.deptno=b.deptno) as employeeList from dept b where b.deptno='20'; o/p: DNAME DEPTNO EMPLOYEELIST RESEARCH 20 CURSOR STATEMENT : 3 CURSOR STATEMENT : 3 EMPNO ENAME JOB MGR HIREDATE SAL CO

  • Data Recovery software

    how to recovery data from damage hard disk then i found on net i got a http://www.stellarinfo.co.in/ which provide data recovery services i talked to them & they reply they have the solution of hard disk recovery, laptop data recovery, server recover

  • I want to delete VM fusion and windows 7 then install windows 7 with bootcamp, how do I do this?  Help Please!!

    I am running VM Fusion firm ware and windows, so I can check my military email form time to time and esign documents from time to time.  But it is way way too slow, Can anyone tell me how to delete the firm ware and windows and then use bootcamp to r

  • I have Firefox 7.0.1 for Mac and there is no "Import" under File menu that allows me to import bookmarks.

    I am using Firefox 7.0.1 on my Mac OS 10.7.2, and there's no "Import" option on the File menu so I can import my bookmarks from Safari.