File Adapter Module - Help

Hi
For a file adapter I had enabled the option <b>Archieve File</b> in my communication channel. So the system will put the file in the archieve folder after it is read. My requirement is to check if the file already exits in the archieve folder or not. Any means of checking it? or shud i make use of adapter modules? If yes kindly point some helpful tips on the same.
Kindly fwd any useful doc to [email protected]
regds
prabhu

Prabhu,
The os command in the file adapter should exists in the XI server only.
Whatever command you provide in the Adapter will result in the SID+"ADM" user id exectuing this command at the oS level of your XI server.
So this script should exist on the XI server.
Now, if the archive directory is on the FTP server you will have to connect to the FTP server from the script and check if the file exists and then do the needful.
Check this blog out for executing Scripts on file adapters,
/people/sameer.shadab/blog/2005/09/21/executing-unix-shell-script-using-operating-system-command-in-xi
Regards
Bhavesh

Similar Messages

  • Help required in File Adapter Module Development

    Hi All,
    I am working out a File to File scenario where my source file is in some different format. Please find the below sample:
    <Root>
    <ID>100</ID>
    <NAME>SAP</NAME>
    <END-Root>
    Before taking this into IS, I need to change the file to a proper XML format. I need to replace "END-" with "/".
    <?xml version="1.0" encoding="UTF-8" >
    <Root>
    <ID>100</ID>
    <NAME>SAP</NAME>
    </Root>
    I think I can achive this by developing Adapter Modules. I am new to Adapter Module development.
    Can you please tell me if there are any inbuilt Adapter Modules for this. If not please suggest me some relevant blogs to solve this issue. Thanks in Advance.

    Hi Phani Kumar
    There are more than one ways to do this. As per your timelines and skill set you can decide
    1. You can use the XMLAnonymizerBean this is an inbuilt module
    Check Stefen's blog
    Remove namespace prefix or change XML encoding with the XMLAnonymizerBean
    2. You can read this complete file in a single field and then you can create XSLT or Java mapping to parse it in a target XML you desire.
    Check these
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3823 [original link is broken] [original link is broken] [original link is broken](XSLT mapping)
    Java Mapping (Part I) (Java Mapping)
    The specified item was not found. (Java Mapping helper DOM)
    The specified item was not found. (XML Node into string)
    3. You can develop Adapter modules for this
    Refer
    Check Guides
    XI 3.0
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3bdc14e1-0901-0010-b5a9-a01e29d75a6a
    PI 7.0
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f013e82c-e56e-2910-c3ae-c602a67b918e
    PI 7.1
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00838345-708c-2a10-1199-9514c0b0a91c

  • Dynamic configuration required in sender file - Adapter Module

    Hi Everybody,
    I am developing an Adapter Module in the file adapter (sender) using Adapter Specific Message Attributes.
    I am using Dynamic configuration inside the Module Process method in the adapter module.
    We are getting an error saying Dynamic Configuration cannot be resolved.
    Can anybody tell me the package to be used.
    Thanks,
    Zabiulla

    You can access the dynamic configuration in adapter module like this:
    Message msg = (Message) inputModuleData.getPrincipalData();
    String fileName = msg.getMessageProperty("http://sap.com/xi/XI/System/File", "FileName");
    You do not need any addition library besides the adapter module API.
    Hope that helps
    Stefan

  • File adapter module

    Hello experts,
    1.
    I want to retrieve the value of <b>Target directory</b> for a file <b>reciever</b> communication channel inside module. Is it possible?  Any code samples?
    2. My audit logs are not getting printed inspite of having a log-configuration.xml in place and proper audit log statements in the code? anybody face similar situations before? These statements are inside a <b>reciever file</b> adapter module.
    Amol

    Hi Kapil,
    file.targetFileName
    In General put the following piece of code in sender or receiver adapter and u can get all the parameters specific to that Adapter Type in channel(Configuration) for outbound and inbound channel depending on direction of channel in which module is configured.
    String[] chattr=ch.getAttributeNames();// ch is channel object
    If u put this in receiver module of file adapter, the string array will hold the names of all the parameters pertaining to Receiver File Adapter(file.targetFileName,file.targetDir,etc). Same procedure holds good for sender channel.
    Once u get the parameter name, u can get the value as given by my earlier post in this thread.
    Hope this helps.
    Regards,
    Sudharshan

  • How to send input parameters to a file adapter module

    Hi all,
    i have a requirement like , i need to pick a file from a file server based on a condition. that condition we write in adapter module (in file sender channel).
    the condition needs some input , so how can we send input parameters to adapter module.
    please suggest me some way,
    thanks in advance
    jhansi

    hi jhansi,
    u define the parameters to send to a module in 'module configuration' (in module tab) by giving the key to identify the module for which u r giving giving the parameters.
    for details refer this:
    Adapter module
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/02706f11-0d01-0010-e5ae-ac25e74c4c81
    This is all u have to do
    http://help.sap.com/saphelp_nw04/helpdata/en/8b/895e407aa4c44ce10000000a1550b0/content.htm
    [reward if helpful]
    regards,
    latika.

  • FileName in Sender File Adapter Module

    Hi Folks,
    In my sender file adapter have written a module to read the picked file name. The protocol used is NFS.
    Notice that the file name read in the module has the absolute path, including the directory path. E.g The file name xyz has to be picked from source directory
    XIServer\Outbound. In the module when I retrieve the file name, it comes up as
    XIServer\Outbound\xyz. Is this expected behaviour?
    I was expecting just the file name<xyz> to be retrieved.
    Thanks,
    Anand

    HI,
    Create an UDF and write this code.
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key =
    DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    return  ourSourceFileName;
    in Adapter u will have Adapter specific parameters check the file name check box.
    Using this UDF u will get the file name at target side.
    Regards,
    Phani.

  • Receiver File Adapter Module processor issue

    Hello all,
    I have deployed (using SDM) a specific module for one of my file communication channel.
    In MDT, I have the following error :
    Exceptions survenues pour Adapter Framework : Object not found in lookup of Module0001
    La diffusion du message vers l'application via File_http://sap.com/xi/XI/System a échoué en raison de : com.sap.aii.af.ra.ms.api.RecoverableException: Object not found in lookup of Module0001.: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of Module0001.
    Where can be the source of this problem ?
    Thanks a lot

    Jean
    Also check if the "JNDI" name that you have specified in the Receiver Adapter module
    excluding localejbs matches the deployed name in the "J2ee Aministartor Deploy service.
    for example if you have
    localejbs/sap.com/BeanName
    you should have
    the service deployed under
    /sap.com/BeanName
    regards
    krishna

  • File Adapter Module - Change name of Generated File

    Hello all,
    My customer has XI v3.0 SP9. For the moment an upgrade is not envisaged.
    Since SP14 it is possible to dynamically change filename generated with receiver File adapter. This is done with a manipulation during mapping and a configuration in adapter.
    As I am in SP9, is there another solution, by example using a module processor ?
    My XML :
    <root>
        <lineFile>....</lineFile>   
        <lineFile>....</lineFile>
        <lineFile>....</lineFile>
        <filename>
    </root>
    Thanks a lot,
    J.C.

    Hi,
    AFAIK - as far as I know
    >>>>(Too much tests to do on other processes)
    it's good this way the customer will learn the need for test tools
    like mercury loadrunner - you can store all the tests inside
    and when an upgreade comes just execute them...
    customers always learn the hard way
    Regards,
    michal

  • File Adapter-Module configuration

    Hi All,
    I have the following requiremnt.
    "Duplicate files should not process"
    Following are the File Access Parameters.
    Source Directory: ABC (ex: contains aa1,aa2,aa3,aa4 files)
    Filename: *
    File name mask: aa*
    My doubt is if they place aa1 file again in ftp , i should not process.
    For this I'm thinking to write module configuration.
    Can any one suggests , whether this is the correct approach? If it is could u explain how to write this module and where to write this module and how to import in xI, do i need to pass any parameter name in module configuration.
    Regards,
    venu.

    Hi Venu,
    You can go with Module in the Sender File Adapter.
    First you need to check the file name and you need to store this file name in the Database.( you can use Java Database).
    If there is an entry in the database for that file, then reject the whole file as per the business requirement. So that you can avoid , overhead of Mapping. Because if there is an error set the flag in the message and check this flag in your Receiver Determination, if it is an error send into error directory.
    Another way is outside the XI, i.e using shell scripts.
    Regards,
    Moorthy

  • File adapter module enhancement error

    Hello All,
    We have a EDI scenario where data for 110 is to be transfered to SAP. Here customer is not able to ahead with seeburger hence decided to develope a adapter module. We have done that  and started testing . While testing we are getting a error, in which ":" is field separator which is getting converted to  "[]" . This we found when we debugged module process method. Pl can you suggest why this conversion is happening and how to resolve.
    If you see , When I use only standared sap module file is getting read as it is. There is no such conversion happening.
    Pl can you suggest at the earliest possible.
    thanks,
    Sharada

    Hi,
    I think you have done a typo error. is it not
    localejbs/SeeClassifier classifier*
    To find the correct JNDI lookup name, log in to Visual Administrator of the J2EE Engine and in server node look for the JNDI Registry Service.Spot your desired bean and fetch the whole JNDI name form there.
    Regards,
    Sudharshan N A

  • File adapter modules : Access to file data before content conversion

    I have a file sender channel for which content conversion in applied. The incoming file has data in comma separated values format.
    e.g.
    102366,Amol Joshi,DEPT1
    107752,XYZ PQR,DEPT2
    I want to access the the actual data in the file before content conversion takes place. Is it possible to access this data inside the adaper module? I tried creating an adapter module and put it before CallSAPAdapter,it still gets the XML after content conversion as the input data to the module.
    Any pointers?

    Hi Amol,
    I dont know if it is the right approach.
    But if u r not able to meet ur requirement u can do one work around.
    Use Message Transformation Bean to convert it once again in to CSV (flat file structure) and then proceed with ur module.
    There should be a better way than this.
    Hope we could find a better solution in the forum.
    Regards,
    Sudharshan

  • How to have Secure Connection for File Adapter.Pls help

    Hi All,
    For File to File Scenario
    How to have Secure Connection for File Adapter.
    Pls send links/blogs explaining this scenario.
    Regards

    hi rich
    go through these links
    FTPs connection failed - error ".. certificate rejected by ChainVerifier"
    Re: What is SFTP, FTI channels
    http://help.sap.com/saphelp_erp2005/helpdata/en/e3/94007075cae04f930cc4c034e411e1/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm
    FTPS implementation question.
    http://help.sap.com/saphelp_nw04s/helpdata/en/43/0e16bfd7b021aee10000000a1553f6/frameset.htm
    Server certificate rejected by ChainVerifier:FTPS server(Points Guaranteed)
    /people/krishna.moorthyp/blog/2007/07/31/sftp-vs-ftps-in-sap-pi
    File adapter
    thanks
    Kunaal

  • Problem in Receiver File adapter :Module XML2PLAIN

    Hi Friends,
    I have a FILE -> FILE scenario ,In this when I am downloading the data in XML format it is getting downloaded successfully.The output look like this ...
    <b>I have only one field to be displayed in the output</b>.
    <?xml version="1.0" encoding="utf-8" ?>
    <Returnkey>
    <field1>000000000621185CA</field1>
    </Returnkey>
    Module Name                                                      Modulekey
    localejbs/AF_Modules/MessageTransformBean      XML2Plain
    <b>Module key parametername                      parameter value</b>
    XML2Plain      Transform.Class            com.sap.aii.messaging.adapter.Conversion
    XML2Plain      Transform.ContentType   text/plain;charset=utf-8
    XML2Plain      xml.addHeaderLine         0
    XML2Plain      xml.conversionType       SimpleXML2Plain
    XML2Plain      xml.fieldFixedLengths    25
    Please some one help me out I,I have tried all the options  and I cant use File content conversion in this case ,(I have JMS adapter which actually sends this information to MQ,as  it is working in XML format AND not in plain format ,I am testing this temporarily with a receiver file scenario)
    Thanks in advance.

    Hi
    you can use the following modules and the parameters.
    Processing sequence :
    localejbs/AF_Modules/MessageTransformBean
    localejbs/SAP XI JMS Adapter/ConvertMessageToBinary
    localejbs/SAP XI JMS Adapter/SendBinarytoXIJMSService
    Module Configuration:
    Transform.Class----
    >com.sap.aii.messaging.adapter.Conversion
    TransformContentType----
    >text/plain;charset=utf-8
    xml.addHeaderLine----
    >0
    xml.conversionType----
    >SimpleXML2Plain
    xml.fieldFixedLengths----
    >10,10,10(for ex)
    xml.fixedLengthTooShortHandling----
    >Cut
    if you still face the problem please reply me back.
    Thanks
    Rinku

  • File Adapter Module PayloadZipBean

    Need to Unzip with multiple files of payload and zip while writing into the target.
    Zip file picked and read only the first payload, Which will be the standard case using this module. But my request here is, if there is any alternative to read multiple of payloads at the same time. Rather place 5 files, the vendor sending as zipped one's. The Adapter reads as one payload, but it's not processing as expected. Kinda of MultiMap. But we have 50 different interfaces one of them processing certain file based conditions.
    Please advice, if there is an alternate method with out going the custom module route. Or a built in future which i am not looking at
    Appreciated

    You can try and executing an OS command that unzips the file to a specific directory prior to the PI processing. Remove the ZIP file after unzipping. A second file communication channel can then pick up the files from the second directory.
    Perhaps not a pretty soluction, but it'll work.

  • Error in File adapter Module.-- the whole lookup name is localejbs/localjbs

    Hi All,
    Iam just trying to do File to IDoc scenario using Seeburger Modules.File is picked and when it enters into modules , it is showing the below error.
    Success Channel CC_SND: Send binary file  "/sapint/testout/Input_Test". Size 2568 with QoS EO
    Error Attempt to process file failed with com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Path to object does not exist at localjbs, the whole lookup name is localejbs/localjbs/SeeClassifier.
    The Steps which i followed in Module are as follows.
    ModuleName                                       ModuleKey
    localjbs/SeeClassifier                             classifier
    localejbs/CallBicXIRaBean                      bic
    localejbs/Seeburger/MessageSplitter       splitter
    ModuleKey    ParamterName       ParameterValue
    bic  mappingName             AUTO
    bic  destSourceMsg           MainDocument
    bic  destTargetMsg            MainDocument
    bic  split                            true
    bic  classifierAttID              classifierAtt  
    classifier       destSourceMsg       MainDocument
    classifier       attID                       classifierAtt
    classifier       showInAuditLog       true
    If anyone has idea what might be wrong?? kinldy share the same.
    Its urgent for me.
    ThankYou
    Seema.

    Hi,
    I think you have done a typo error. is it not
    localejbs/SeeClassifier classifier*
    To find the correct JNDI lookup name, log in to Visual Administrator of the J2EE Engine and in server node look for the JNDI Registry Service.Spot your desired bean and fetch the whole JNDI name form there.
    Regards,
    Sudharshan N A

Maybe you are looking for