Regarding Adapter Module for Duplicate file handling at Sender side

Hi All
my requirement is to develop a adapter module . Source is FTP  target is R/3  .source Commuincation cahnnel is File sender .
want to handle duplicate files
can any one provide  me what are all the steps being used for the same .
any step-via -step doc will be helpful for me ......and adapetr module will be written in NetWeaver Developer studio or which s/W ????
also where to put the ejb or import the ejb s...
Pls help
Regards
Priya

Hi Priya,
YES YOU NEED SAP NetWeaver Developer studio to develop Adapter Modules,or you can use any othe IDEs like Eclipse ....many documents available in sdn ,how to develop AM,refer below link it explaines clearly
let me know which version of XI u working on,if it PI7.1 jar files different.
http://wiki.sdn.sap.com/wiki/display/stage/AdapterModuleToReadExcelFilewithMultipleRowsandMultiple+Columns
Regards,
Raj

Similar Messages

  • 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

  • Java Mapping Or Adapter Module for MultiLevel File Content Conversion ??

    Hi Experts,
    Hi All,
    As we all know file content conversion cannot parse more than three level even if we use FCC paramenters or MessageTransform Bean /StrictXmlToPlain Bean.
    Currently i am facing an scenario where i can expect an content coversion with four or five levels.
    for ex.
    Target Message Looks like
    Header(0..1)
           |_____X
           |_____Y
           |_____Detail(0.n)
                 |____A
                 |____B
                 |____SubDetail(0.n)
                        |_____Trailer(0.n)
                                |______rec1
                                |______rec2
                                |______rec3(0..n)
                                       |______Subrec1
                                       |______Subrec2
    So my question how can i do the FixedLength/CSV in the target system ???
    Shall i do java mapping ? if yes then any code example relevant to this type of scenario
    Shall i do adapter module development ?if yes then any code example relevant to this type of scenario
    Thanks In Advance
    Ronit Mishra

    Target Message Looks like
    Header(0..1)----
    Level 1
           |_____X
           |_____Y
           |_____Detail(0.n)----
    Level 2
                 |____A
                 |____B
                 |____SubDetail(0.n)----
    Level 3
                        |_____Trailer(0.n)----
    Level 4
                                |______rec1
                                |______rec2
                                |______rec3(0..n)----
    Level 5
                                       |______Subrec1
                                       |______Subrec2

  • Flat file name from Sender Side Dynamically into subject of Receiver Mail

    Hi All,
             I am Using a file to Mail Scenario, My requirement is to get dynamically the file name from flat file of the Sender Side into Subject of Receiver Mail Adapter and attachment of file from the Sender Side. Can anyone help me out.
    Thanks in Advance

    Hi....
              You can write udf in the message mapping to get the Dynamic file name and map that to the subject of the receiver mail.
      DynamicConfiguration conf = (DynamicConfiguration) param.get(
              StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey KEY_FILENAME = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
          // read value
          String Filename = conf.get(KEY_FILENAME);
    Regards,
    Leela

  • Adapter Module for File Adapter

    I have a scenario where I have 2 related files (text file and a pdf file) for the message. I need to enhance the payload (content conversion from text file) with the size of the pdf file. I have developed a adapter module for this and it is working fine if there is 1 set of text and pdf file. But if there are more than 1 set of files, it is processing the first set and giving the below error for other files.
    "Error: com.sap.engine.services.ejb.exceptions.BaseTransactionRolledbackLocalException: Exception thrown in method process. The transaction is marked for rollback."
    Regards
    Yogesh

    check this thread :
    BaseTransactionRolledbackLocalException in custom adapter module
    Exceptions in Recievr Communication Channel with Adapter Module

  • Adapter Module for Sender File Adapter to access a Flat file

    Hi,
    We have a scenario where the source is a flat file.I want to develop an Adapter Module to make a small change to every line in the Flat file.
    Now how do we read a flat file in the Adapter Module?Coz the flat file will be converted to XML file by the Standard Adapter Module of the File adapter.
    Please help me out with this.
    Thank you,
    Anu.

    Hi Anu,
    If you are not using Content Conversion option Standard Adapter Module does not convert the Flat file to XML .
    You can directly access the payload as it is in flat file in the Adapter Module and make changes.
    Use the Standard classes ModuleData & moduleContext to fetch the Payload.
    chk this :
    Customized Sender Adapter Module
    XI: Read data from PDF file in Sender Adapter
    regards
    Ganga

  • Adapter module to enhance File adapter

    Hey guys
    i need a small clarification regarding adapter modules.
    is it possible via adapter modules to enhance the File adapter to such an extent that it can deliver files to two separate systems in separate landscapes.
    i know i can design one more receiver determination and can also use Run OS command options,but modules in general give better performance compared to others so just wan't to explore a little bit more about them.
    Thanx
    Aamir

    Hey Aamir,
    yeah, they do take a lot of resources, but that's how XI was built to work.
    What you're trying to do is a workaround and may not get support from SAP.
    If I have understood right, you still wanna maintain the endpoint connection data in the communication channels but want to acces them directly without going through the technical routing pipeline, is that so?
    If that's it, I'm sorry but I cannot help you any further.
    The only way I know of accessing adapters without going throught technical routing is by using lookup API (RFC, JDBC, Soap) but it is not intended for endpoint scenarios (insert, update etc), mainly for simple read (lookups).
    If maintaining the connection data outside adapters is not a concern, you could try to create the connections directly in Java code, inside java proxies.
    Regards,
    Henrique.

  • Adapter Module for receiver IDOC adapter?

    Hi,
    I have a scenario where i need to do some custom logging in the receiver adapters. For all receiver file adapters, i have written an adapter module which fulfills this custom requirement but how will i do this in the receiver IDOC adapter as its on the ABAP stack? I cannot write a java adapter module for this.
    Is there anyway by which i can write a ABAP adapter mosule and deploy it in the IDOC adapter? Or any other way to achive it. the scenario is such that i need to do the logging before the idoc is posted into R/3 system by the idoc adapter.
    Please advice.
    Regards,
    Yash

    Hi Chirag,
    Yes i have seen that the module tab is disabled for idoc adapter. I have a fin interface where i need to split a incoming file into an idoc and a file. For this purpose i need to log how many records are received by each adapter and the sum of the line items for audit perspose.
    any othr way to do it apart from doing it in message mapping. The req is to do in the adapter engine.

  • MalformedInputException Error in Adapter module for SFTP channel

    Dear All,
    I am using MessageTransformBean in adapter module for Plain to XML conversion. The channel works fine in all the cases but when I recieve     "  ì " or few more special characters in the file my channel does not pick file and show below error.
    Error: com.aedaptive.adapter.sftp.SFTPException : Aborting processing: com.sap.aii.af.mp.module.ModuleException: Transform: failed to execute the transformation: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
    I am using below parameter value in adapter module.
    Transform.Class : com.sap.aii.messaging.adapter.Conversion
    Transform.ContentType : text/xml;charset=ISO-8859-1
    Please help me if any of you have faces such error in your developments.
    Avanish

    Hi Grzegorg,
    I have tried using UTF-8 encoding in my channel but this doesn't work. Communication cahnnel is still giving same problem.
    Error: com.aedaptive.adapter.sftp.SFTPException : Aborting processing: com.sap.aii.af.mp.module.ModuleException: Transform: failed to execute the transformation: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
    The file which we are trying to process have character  Ì and as far as my serach is concerned i think this belongs to charset ISO-8859-1.
    Any more suggestion Guys to solve this problem.
    Thanks and Regards
    Avanish

  • Adapter module that dumps file to XI file directory

    I am given a task to find a way of backing up files the simpliest way. Currently, our config is in a scenario where there are 2 receiver, the receiving system (SAP) and the file backup (File adapter). I would want to reduce the config requirements by eliminating the file backup objects. And I am thinking of doing this by creating an adapter module to be included in the sender adapter.
    Another idea I could think of is the adapter module calls upon the file comm channel to do the file backup.
    The purpose of this research is to reduce object transport time and the mistakes the transport guys are doing on the file comm ch reconfiguration.
    To those who have experiences with adapter module development, is this idea feasible?

    Hi Jai,
    Thanks for your reply. That is the 2nd option I have in case the 1st one isnt possible.
    To further elaborate,
    Current config:
    we have two AS2 comm channels (sender and receiver) managing the connection with our external partners.
    File comm channels to backup the files we send and receive.
    The problem:
    We are having problems with the transport guys as they often make mistake on reconfiguring the file comm channel during transport.
    Requirements:
    Reduce object creation and tranport time.
    Solution proposal 1:
    The idea is to remove all existing objects related to file back up and have all the file back ups done by the adapter module. And this adapter module would become part of the as2 comm channels module processes.
    Hope this clarifies things more.

  • Need Help in Creating adapter module for SFTP Sender in NWDS

    Hi experts,
    I have a scenario where i should write an adapter module for SFTP sender in NWDS.. need your help in achieving this..

    Hello,
    >>i have followed the procedure of FTP but, adapter is not picking the file
    Make sure u have written proper expression to pick file.
    >>do we have any different adapter parameters for SFTP... the input file is .csv..
    I don't think there are any specific parameters needed for SFTP (but in case u are reading file name in AM then u might have to adjust SFTP namespace)
    Thanks
    Amit Srivastava

  • Adapter Module for SOAP Sender

    Hi,
    Any alternative way to create adapter module for soap sender?
    Regards,
    Farooq

    But I just trying to know weather it will work for simple soap or not.
    Unfortunately it wont work for the normal SOAP protocol.
    Let me try my luck.
    If you are successful, then I would waiting for a blog
    Regards,
    Abhishek.

  • Developing adapter modules for PI 7.0 using NWDS 7.3

    Hello all,
        Did someone have already developed adapter modules for PI 7.0 using NWDS 7.3? I can´t find the EJB libraries for Java 1.4.
        I'm able to develop mapping programs, but I'm not sure if it is possible to create EJB projects.
    Thanks,
    Marcos

    Hi Marcos,
    I haven't tried developing adapter modules in NWDS 7.3 for PI 7.0 myself, but according to the documentation from SAP it is possible to develop J2EE 1.4 compliant applications i.e. EJB 2.1 components, which is used by SAP PI 7.0.
    [http://help.sap.com/saphelp_nw73/helpdata/en/48/fc1e73a0ad2637e10000000a42189d/frameset.htm]
    Because of this backwards-compatibility I would expect that the EJB libraries for J2EE 1.4 should be available directly in NWDS 7.3 somewhere.
    Best regards,
    Jacob

  • Optimizing a search for duplicate files in a filesystem

    We have a large directory that people have been dumping to for years (~200k files), and I want to go through and look for duplicate files. The first part of this was just scanning through and checking for duplicate file names.  I wrote a simple VI to serarch for duplicates, but it is very inefficiant because of multiple string comparisons. Even optimized as much as I could think to do, I'm only scanning about 1k files / minute.  I have attached my code - any help would be appreciated.
    Attachments:
    search.vi ‏22 KB

    This is trivial using the variant attributes mentioned earlier.  Attached is my method which uses the Variant Repository XNode I developed.  Not sure on performance comparisions.
    EDIT:  I'm betting the thing that will take the longest will be performing the MD5, I'm sure a CRC32 could be done faster which is probably just as good in this situation, or even a sum of the bytes of the file as a quick way of identifying the file.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.
    Attachments:
    Find Duplicate Files.vi ‏23 KB

  • How to search for duplicate files?

    Is there a quick and easy way to search for duplicate files? (and other space hogs) I would like to do some hard drive spring cleaning. Trying to free up some space. Any suggestions? Thanks in advance, Carl

    Here are some apps to try:
    Singular, http://www.emeraldion.it/software/macosx/singular.html
    DupeCheck, http://dfay.fastmail.fm/dupecheck/ (uses the terminal suff and Spotlight under the hood)
    FileBuddy, http://www.skytag.com/filebuddy/

Maybe you are looking for

  • I can sign on the the web but I can not get the email to connect?

    I can sign on the to the internet yet I can not sign is and get my mail... when i press the mail app on the dock get no responce

  • Automation error element not found in vb6 2147319765 after upgrading the os

    Hi we had updated our OS to windows 7 from XP.Previously we had an application in XP which is built on Vb 6 .The application throws an error message like Automation error --element not found with error code 2147319765 .The application shows the same

  • Validate xml fails using XInclude.

    I tried to use the XInclude syntax in a very simple way in order to make my xml more modular. Here the example : <?xml version='1.0' encoding='windows-1252'?> <frame name="pippo" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xsd="http://www.w3.org

  • What do I have to do to set up my old G4 as a back-up hard drive ?

    I want to connect my iMac with my G4 with a firewire, but I need to know a few things: a) How do I start up this system ? Do I start up my old computer or just plug it in? Will my iMac recognize the G4? b) Do I need to format the old hard drive? I st

  • Language Pack disabled

    Firefox 33 - German Language Pack 32 (disabled) This is now the fifth update, where the language file is disabled. And my question is why? value = isset($language_german['preferences']) ? $language_german['preferences'] : $language_english['preferenc