Sender File adapter :Avoiding duplicate files to post IDOC

Hi
My scenario is  File to IDoc and am picking up files from a legacy system folder to create invoices in ECC by means of an IDOC.
There is a possibility of having two files (duplicate) sent in the folder by the legacy system which will have the same name.the requirement is to :
Check the file name while picking the file and archive it directly in the archive folder without processing if the file name is the same since the contents will be the same
for eg
S1_Date_A1 as the file name occurs twice then the second file coming later should be ignored and not processed and put in the archive folder.
kindly suggest
thanks

there are only custom ways to get this done. No standard way exists.
Ref:
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/99593f86-0601-0010-059d-d2dd39dceaa0
check page 5, Class 1 (C1)

Similar Messages

  • From ONE file to Many  IDocs in many systems

    Hi,
    In my scenario i have the input file like below
    HEADER;EMPNO;EMPNAME;TARGETSYSTEM
    ITEMHEADER;DESG;LEVEL
    HEADER;EMPNO;EMPNAME;TARGETSYSTEM
    ITEMHEADER;DESG;LEVEL
    HEADER;EMPNO;EMPNAME;TARGETSYSTEM
    ITEMHEADER;DESG;LEVEL
    Here TARGETSYSTEM values are SAPG1,SAPG2 and SAPG3
    for each one HEADER and ITEMHEADER i have to create one idoc in the respective receiver system based on the TARGETSYSTEM value.
    Based on the TARGETSYSTEM value, idocs should be created in to the respective system.
    But problem is :
    Its creating 3 idocs in first system, same 3 idocs in second system and same 3 idocs in third system also.
    But i want to create one idoc in 1st system and second  idoc in 2nd system and third idoc in 3rd system based on the TARGETSYSTEM value.
    please help me, how to solve this problem
    Thanks & Regards,
    Vijji

    Hi Vijaya laksmi,
    I have seen ur question.
    appriciate for doing file to muliple idocs first
    without BPM, u can do this scenario ok
    but while doing this scenario, u have to do idoc with max occurence ie first, after importing idoc, u have to export to xml file and change occurence inplace of "min occurence "  write " min. occurence and Max. occurnce=" and then import this in External definition then u can use this in scenario for multiple idoc. Here don't require more interface mappings ok. u can do this only  with one interface mapping. while generating idoc, at the time u have to save and send as multiple idocs how many u have to send to receiver systems just give the no how many idocs. 
    Even though you won't get it i will send file to multiple idoc scenario ok
    all the best
    regards
    Peera

  • Duplicate message handling in the sender file adapter

    Hi,
    I enabled duplicate file handling check in the sender file adapter so that whenever there is a duplicate file it should send me an alert also it should disable the channel so that i do not get that duplicate file alert message again and again.
    My question is will it activate the channel again as soon as a new file arrives or do i need to manually do that.
    Michal's PI tips: Duplicate handling in file adapter - 7.31

    Hi Hema,
    You will have to activate the channel manually. The idea behind the 'disable' functionality is to avoid further file processing through that channel which can only start once the channel is activated again manually.
    Regards,
    Abhishek

  • 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

  • Sender File adapter and duplicate file processing

    If I set the sender file adapter to delete or archive and when a file gets picked up and processed, this file will not get deleted/archived unless it was successfully processed.  However, if it errors out during processing, the file remains but it's message will get persisted in the integration engine or adapter engine.  Since there's automatic retry, we have the potential for duplicate processing as in addition to the retry, the file is still continously polling for this file.  In other words, how do we stop this duplicate file processing?
    Thanks.

    Hi Bevan,
    However, if it errors out during processing, the file remains but it's message will get persisted in the integration engine or adapter engine.
    your file wont get deleted unless adapter engine sucesfull pickups. if does not picked up at adapter engine then is not stored in adapter engine . if it reached Intergation Server and failed their then file would be deleted.
    please let me know if you haveany questions
    please reward points
    Regards
    Sreeram.G.Reddy

  • Limiting the number of files being picked up by the sender file adapter

    We are running a file adapter to collect xml files from a legacy system in a shared network location.  The files are picked up, information is sorted and mapped, and then sent to a proxy on our CRM system to store the data.  Very simple and not-complex.
    Our initial data load will consist of somewhere in the neighborhood of 900k records, which is killing CRM.
    A co-worker with a bit more experience was telling me that he believes there is a way to limit the number of files that will be pulled per iteration of the file communication channel.  If this is the case, can someone share with me the parameters that need to be set?
    My apologies if this is a duplicate post - I have tried to look for a good answer in the forums and have come up empty.
    We are running PI 7.1, and I believe it is SP 6. 
    Thanks in advance for the help,
    Ben

    Hi Ben,
    There is no standard way to limit the number of files to be processed by the communication channel.
    On the Sender File CC, there is a parameter " Maximum File Size" which restricts the files bigger than the specific size, but this is just a prevention not a solution.
    If you have a single big size file, then somehow you have to create small sized files out of it.
    Thanks,
    Pooja Pandey

  • Recordset per message in Sender File Adapter

    Hi Friends
    I have configured a sender file adapter to pick up *.txt files from a specific path, Since the file is having thousands of records it is failing to process the file at  PI level . In order to avoid the problem I have kept Recordset Set Per Message as 10 , but still PI is processing all the records into a single message. Please help me in troubleshooting it.
    Regards
    Suman.

    Hi Suman,
      Go thru these threads for troubleshooting...
    Massive file
    Processing huge file loads through XI
    Processing of huge no of Inbound xml files
    Bottleneck in Large file processing
    How to process large data files in XI  ?  100 MB files ?
    Regds,
    Pinangshuk.

  • Is Sender File Adapter always throws error when there is no file?

    Hi,
    I have a simple question but can't find a straight answer to it. I have a Sender File adapter that configured to pick up file XXX* from FTP server every 1 hour. But a file can come every 2, 3, or 7 hours- no certain time.When there is no file I got "File not found " error. As we use alerts, this behaviour is not acceptable.
    Does this error comes always if there is no file? Any possible way to avoid this error ?
    Thanks for help.
    Nataliya

    Hi Ravi,
    I can see the error in Runtime Workbench under CC monitoring. To be precise it says:
    An error occurred while connecting to the FTP server '1X.1XX.XX.XX:21'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 552 RMS-E-FNF, file not found, ES4_SAP*'. For details, contact your FTP server vendor.
    My ftp server has the following set up:
    Server: xx.xxx.xx.xx
    Port:21
    Dataconnection:Active
    Timeout:120
    Connection secuirity: None
    User name .... etc set up.
    Connect mode: Per file transfer
    Transfer mode:Text
    QoS:EO
    Pollinterval: 120 (for test purposes)
    Processing Mode: delete
    Can it be that its a ftp server generates error and sends back to XI?
    Thanks,
    Nataliya

  • Strange Problem in File Archiving - Sender FTP Adapter

    Hi,
    The scenario is file to IDOc. XI has to read the input file from client FTP server and archive it to XI local file server.
    File is archived properly without FCC (for xml files). But with FCC, the sender FTP adapter is archiving empty files (0 kb files) not the original file with data.
    I've checked SXMB_MONI, even there I can see the file data and the IDoc is getting posted with proper data. But, the archived file is empty. Not sure about the problem.
    Please suggest. Thanks in advance.
    Regards,
    Joe.

    Hi,
    I've already tried archiving the file to the FTP server itself, it's working fine (even with FCC). But, when I try to archive it to the XI server (read from FTP and archive at XI server), it's writing empty file to the XI archive directory. I'm using PI 7.0 SP 14. My sender FTP adapter dtls follow
    Data Connection: Passive
    Timeout Secs: 500
    Connect Mode: Permanently
    Transfer Mode: text and binary tried both
    File type: text and binary tried both..
    Looking out for a solution.
    Thanks,
    Joe.
    Edited by: Joe on Jun 19, 2008 8:07 AM
    Edited by: Joe on Jun 19, 2008 8:08 AM

  • Sender File Adapter Problem when text document is a single line.

    Hi All,
    I have posted this question earlier too. But did not get a proper answer.
    I am using File adapter to fetch data from a file system.
    My input data is: AA123BB45678AA345BB78564.
    It is just reading the first segment i.e.AA123 and not reading the remaining.
    How can I configure my Sender File adapter to pick this pattern of data? It works fine if I have line break after each record that is if the input is as below.
    AA123
    BB45678
    AA345
    BB78564
    In the above there is a Line break after each segment. So File adapter picks it fine.
    I have also tried using xml.A.endSeparator equals to blank in the module configuration. But it does not work either.
    Can anyone throw some light to this?

    Abhi
    I tried a different approach to send your file data In..
    You can get each line in the source structure in separate row as
      <?xml version="1.0" encoding="utf-8" ?>
    - <ns:SingleRowDT xmlns:ns="http://xxxxx.com/xi/pocs/sriram">
    - <Recordset>
    - <row>
      <rowElt>AA123BB45678AA345BB78564</rowElt>
      </row>
    - <row>
      <rowElt>AA123BB45678AA345BB78564AA123BB45678AA345BB78564</rowElt>
      </row>
    - <row>
      <rowElt>AA123BB45678AA345BB78564AA123BB45678AA345BB78564AA123BB45678AA345BB78564</rowElt>
      </row>
      </Recordset>
    Now you can use a suitable mapping logic to split the individual records into the 2 field structure as expected in the target..
    Trying your way would be a limitation on file adapter I think..Let me know if this helps..I can give you the content conversion config for this model..
    its simply
    RecordSet - Leave it empty
    RecordSet Seq -  Row, *
    Recordsets/msg - *
    row.fieldSeparator - 'nl'
    row.endSeparator - 'nl'
    row.fieldNames - 'rowElt
    ..So each line will be pulled into a single Row in the source structure and then u can apply a specific mapping to split into 2 fields for your target
    Regards
    Sriram V.
    Regards
    Sriram V.

  • Module processing inside Sender File Adapter

    Hello,
    I am trying to analyze whether I can create a specialized module inside Sender File Adapter. As of right now, the Sender File Adapter and Receiver as well, assume endSeparator character in the end of each record. For files that do not have this field, it is just on continuous string, I assumed I can create an
         adapter module
         call it BEFORE data in the file is being converted to XML format
         Insert 'nl' character (since the record length is fixed)
         Call regular adapter processing (converting to/from XML)
        However, creating any module inside Sender File Adapter, the payload of the main document is already in XML format. Is there anyway to avoid it?
       Thanks for your help,
             Dmitriy Mindich

    It is not possible with the standard functionality.
    So maintain the sender file adapter with no conversion, but in the module tab enter following modules:
    1. Your module
    2. The conversion module (*)
    3. The standard module.
    (*) for details look here:
    Look here:
    http://service.sap.com/nw-howtoguides
    -> Exchange Infrastructure
    -> How To Use the Content Conversion Module in JMS Adapter
    Regards
    Stefan

  • Sender File Adapter: No Messages

    Hi,
    I have configured a sender file adapter to read a flat file using file format conversion, in the file poler mode using NFS. I could confirm that the File is being read, and the adapter status from the Adapter framework (is:port/AdapterFramework) indicates the adapter is working fine (Green light, and last message processed at XXX........).
    However, I did not find any messages from SXMB_MONI.
    Further, I got inot the RWB, and found the following Audit log:
    It indicates an error "Transmitting the message to endpoint http://kansbwul01:50000/sap/xi/engine/entry?action=execute using connection AFW failed, due to: Received HTTP response code 404.."
    What is the problem, and how can I resolve it?
    Thanks
    Feroz
    Success     Channel CDWFileReader: Entire file content converted to XML format
    Success     Send text file "/tmp/XIDemo/3315-TL-20041126-0000IN.txt", size 164533, character encoding ISO8859-1 with QoS EO
    Success     Application attempting to send an XI message asynchronously using connection AFW.
    Success     Trying to put the message into the send queue.
    Success     Message successfully put into the queue.
    Success     The application sent the message asynchronously using connection AFW. Returning to application.
    Success     Confirmation mode test found. File will be resent next time
    Success     The message was successfully retrieved from the send queue.
    Success     The message status set to DLNG.
    Error     Transmitting the message to endpoint http://kansbwul01:50000/sap/xi/engine/entry?action=execute using connection AFW failed, due to: Received HTTP response code 404..
    Success     The asynchronous message was successfully scheduled to be delivered at Sun Jan 09 19:13:21 CST 2005.
    Success     The message status set to WAIT.

    Hi,
    Further to my earlier post, the following is the message log from the message monitor. Any clues whats going wrong. Can I configure a File Sender->File Receiver scenario?
    Where and how are the port settings and user credentials configured for the AFW.
    -Feroz
    Message ID  f49f6d21-632c-11d9-805a-0003ba54d619 
    RefToMsg ID    
    Conversation ID    
    Sequence Number  0 
    Message Type  Asynchronously Sent Message (SEND) 
    From Party    
    From Service   Name:  LB1_CDWFilePoler  
    To Party    
    To Service   Name:  LB1_CDWFileWriter  
    Action   Namespace:  http://erc.ge.com/cdw/poc Name:  ReadFile  
    Connection Name   AFW 
    Status   Not Delivered 
    Profile   XI 
    Transport   HTTP 
    Delivery Semantics   Exactly Once 
    Times Failed   4 
    Number of Retries   3 
    Sent / Received  01/10/2005 12:42:33 
    Transmitted / Delivered  01/10/2005 12:57:33 
    Next Delivery  01/10/2005 12:57:33 
    Persist Until  02/09/2005 12:42:33 
    Valid Until   
    Retry Interval   5 Minutes 
    Address   http://kansbwul01:50000/sap/xi/engine/entry?action=execute 
    Credential   SAPPasswordCredential(XIAFUSER):password=********:sapclient=100:saplang= 
    Transport Headers   SOAPAction="http://sap.com/xi/XI/Message/30" Content-Type=Multipart/Related; boundary=SAP_63fa9d21-6337-11d9-8f3c-0003ba54d619_END; type="text/xml"; start="" HTTP=POST 
    Node ID   1485750

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

  • Sender File adapter Pooling interval & file Size issue

    Hi ALL,
    I have a file size of 400 MB to be picked to be the sender file adapter i am facing issue that the system is unable to even pick the file and place in the Q for Processing.
    1)we have no mapping no content conversion ....only pick the file from one loaction and place it in 3 different locations with 3 different names ...can any one help me in solving this .. ? the best workable method to achive this .
    2) this file is getting created once in a day .say 2 PM .so i can give the poll intravel to 24 hours ..but some times ..the file creation in server gets delayed ..but they cont wain for the next 24 hour to come for processing the file ..so my query is can we reduce  the poll intravel for 2 PM till  3PM hour for some 3 times ..and once it reches 3PM  it can poll as usual with a gap of 24 hour time ..
    thanks
    RK

    Hi Rupash,
    >>I have a file size of 400 MB to be picked to be the sender file adapter i am facing issue that the system is unable to even pick the file and place in the Q for Processing.
    Never use File adapter for picking large file (maximum size which I have seen it to work successfully is 200 MB)
    Instead go for Java proxies. Check this forum post for the discussion:
    Java proxy to use XI as a file mover
    Also if you want some more info on Java proxies refer these blogs and articles:
    /people/prasad.ulagappan2/blog/2005/06/27/asynchronous-inbound-java-proxy
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/a068cf2f-0401-0010-2aa9-f5ae4b2096f9
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f272165e-0401-0010-b4a1-e7eb8903501d
    >>this file is getting created once in a day .say 2 PM .so i can give the poll intravel to 24 hours ..but some times ..the file creation in server gets delayed .
    You can do a availability time planning refer these links for more information:
    Planning Availability Times
    http://help.sap.com/saphelp_nw04/helpdata/en/45/06bd029da31122e10000000a11466f/content.htm
    Controlling a Communication Channel Externally Locate the document in its SAP Library structure
    http://help.sap.com/saphelp_nw04/helpdata/en/45/0c86aab4d14dece10000000a11466f/content.htm
    Regards
    Suraj

  • How to process a text file (mail attachment) using the sender mail adapter?

    Hi guys,
    Is it possible to process mail attachments using the sender mail adapter? Let's say I have a structured text file (attachment) which needs to be mapped and sent to target system.
    Post please any thoughts or experience.
    Thanks,
    Olian

    Hi Olian,
    Have a look at these helpful links -
    1. http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/9e6c7911-0d01-0010-1aa3-8e1bb1551f05&overridelayout=true
    2. http://www.riyaz.net/blog/xipi-configuring-the-sender-mail-adapter/
    3. http://help.sap.com/saphelp_nw70/helpdata/en/23/c093409c663228e10000000a1550b0/content.htm
    Regards,
    Sunil Chandra

Maybe you are looking for

  • PDF Portfolio Cover - how to change this in Acrobat Pro 9?

    Hi all, in Windows folders PDF Portfolio files are displayed as follows: 1. Using common PDF icons (bad, because we cannot distinguish PDF from PDF Portfolio), or 2. If the folder allows larger pictures, then we see the standards Porfolio cover showi

  • Since upgrading to Lion i can no longer see other computers in my network and vice versa. What has gone on?

    As the title suggests! I can no longer see any of the computers in my network, Mac or otherwise. I have checked sharing permissions on all required computers and all seems to be good and have disabled firewalls. I notice a few people have had similar

  • Video chat issue

    every time i try to video chat using ichat and aim this pops up, I've changed the ports, changed it back to default settings, I don't know what else to do... Date/Time: 2008-03-17 17:55:33.747 -0400 OS Version: 10.5.2 (Build 9C31) Report Version: 4 i

  • "Clicking" noise from CD Drive on 12"Powerbook

    My 12" Powerbook makes a horrible "clicking" noise when a insert a CD or DVD. After a few seconds the CD or DVD is ejected. This is pretty sudden thing as it was fine one day and now this. Can anyone tell me what may be causing this, or how to fix it

  • Creative Media Sou

    Hi Gang - A couple of questions about the Software I cannot find a site that allows me to update the revision. I am currently at .0.53 and have a couple of goofy things happening.....</LI> I have both a TV card and a turntable for vinyl connected int