Adapter module for file renaming

Hi all,
I want to rename a file before writing into target directory. Is it possible to do this using adapter module? Im using File adapter at the sender and receiver.
I tried renaming the file using DynamicConfiguration method.I want some custom constants to be added to the file name. I want to know if file renaming is possible by writing an Adapter module ..
Thanks

Rahul~
Writing a module would be too much effort deploying and using..Instead u can use a dummy mapping to target and use a piece of Java code for transformation..
chk my blog will save u effort..XSL may not be required in ur case
/people/sriram.vasudevan3/blog/2005/11/21/effective-xsl-for-multimapping-getting-source-filenames-in-legacy-legacy-scenarios

Similar Messages

  • 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 File Adapter using Eclipse

    I want to develop Adapter Module using Eclipse, please let me know if it is possible?
    -How to use Eclipse to develop adapter module and deploy it on J2ee server.
    Thanks

    Hi,
    If you have NWDS , then you can directly deploy AM in PI server, if you are using eclipse to write code then genarate EAR file of your code, then you have to deploy in SDM using manual process.
    SEARCH IN SDN like how to deplot AM's, you will find many documents.
    Regards,
    RAJ

  • 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:: JAR file in the build path of EJB project

    Hi Experts,
    I have created one adapter module, for this I have created one EJB project and also associated one EAR project to that.
    I have completed my coding and changes in the xml files.
    I have followed this -
    http://www.sdn.sap.com/irj/scn/index;jsessionid=(J2EE3417500)ID1494558950DB01504425675464955468End?rid=/library/uuid/c0b39e65-981e-2b10-1c9c-fc3f8e6747fa&overridelayout=true
    while creating the module.
    but after finishing this , I can not see the ejb.jar file corresponding to the ejb project, I can see the class file generated in the build path.
    but I can not see the ejb.jar in the EJB project after build.
    When I checked the EAR project I found under Deployment descriptor there is a folder called module and there is  a jar file named as -
    EJB<my ejb project name>.jar
    when I am about to deploy this EAR  in the server it is showing  me to choose the file from EAR project and this EAR project contain the EJB Project .
    Request you to please let me know is everything ok with my project ? or please let me know how can I see the  ejb.jar  file corresponding to the ejb project below the build path.
    Thanks
    Vinny

    Hi Experts,
    I have created one adapter module, for this I have created one EJB project and also associated one EAR project to that.
    I have completed my coding and changes in the xml files.
    I have followed this -
    http://www.sdn.sap.com/irj/scn/index;jsessionid=(J2EE3417500)ID1494558950DB01504425675464955468End?rid=/library/uuid/c0b39e65-981e-2b10-1c9c-fc3f8e6747fa&overridelayout=true
    while creating the module.
    but after finishing this , I can not see the ejb.jar file corresponding to the ejb project, I can see the class file generated in the build path.
    but I can not see the ejb.jar in the EJB project after build.
    When I checked the EAR project I found under Deployment descriptor there is a folder called module and there is  a jar file named as -
    EJB<my ejb project name>.jar
    when I am about to deploy this EAR  in the server it is showing  me to choose the file from EAR project and this EAR project contain the EJB Project .
    Request you to please let me know is everything ok with my project ? or please let me know how can I see the  ejb.jar  file corresponding to the ejb project below the build path.
    Thanks
    Vinny

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

  • How to create a module for File Adapter

    Hi,
    I read somethings about module in Adapters.
    What I need to create a EJB? I need to generate a jar? Where I put it?
    Do they have anything about this or a step by step? I want to create a module fpr File Adapter
    Tks.

    Hi,
       >>>What I need to create a EJB?
           If you have NDS or Ecclipse you can create them automatically.
       >>>I need to generate a jar?
          Yes you need to generate a .Jar for that Ejb.
       >>>Where I put it?
          Put that .Jar in .Ear file. and then deploy it on to the Xi server or PCK or Decentralised Adapter Engine where ever u want to use.
       >>>Do they have anything about this or a step by step?
          Yes.Step by step procedure for creating module is available.You can get them at the links given above by others.
    Regards,
    Gowtham K.

  • 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

  • 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

  • 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

  • Regd. Error in Adapter module for IDOCxml to flat file conversion

    Hi Champs!
    I am using PI 7.1 and i am trying out the blog for direct conversion of IDOC xml to flat file and vice versa.
    /people/william.li/blog/2009/04/01/how-to-use-user-module-for-conversion-of-idoc-messages-between-flat-and-xml-formats
    has anyone tried this in Pi7.1
    i am getting the following error:
    Message processing failed.
    Cause: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException:
    Path to object does not exist at SAP_XI_IDOC, the whole lookup
    name is localejbs/SAP_XI_IDOC/IDOCFlatToXmlConvertor.
    I have done all the setting required .. as per the blog.Is it srictly for PI7.11?
    Regards,
    Abhi

    Hi Abhi,
    This feature is a part of PI 7.11  new features , as it is mentioned in the begining of the Blog itself.
    So i feel , yes its strictly PI7.11 feature which may not be available in PI7.1 version which you are using currently.
    There may be workarounds...lets c  fellow SDNer's replys:)...
    Regards,
    Srinivas

  • Adapter moduler in file adapter receiver - get Target Directory from param

    Hi everybody,
    We are in PI 7.1
    I need in an adapter module (file adapter receiver) to access to the Target Directory comming from parameters
    I foound the code in a weblog
    /people/sap.user72/blog/2005/07/15/copy-a-file-with-same-filename-using-xi
    Here is the code I found
    public ModuleData process(
              ModuleContext moduleContext,
              ModuleData inputModuleData)
              throws ModuleException {
              Object obj = null;
              Message msg = null;
              try {
                   Channel ch = new Channel(moduleContext.getChannelID());
                   obj = inputModuleData.getPrincipalData();
                   msg = (Message) obj;
                   XMLPayload xmlpayload = msg.getDocument();
                   String path = ch.getValueAsString("file.targetDir");
                   if (!path.endsWith("
    ") && !path.endsWith("/"))                    
                             if(path.indexOf("
    ")!=-1)
                                  path+="
                             else
                                  path += "/";
                   if (xmlpayload != null) {
                        convert(xmlpayload.getContent(), path);
                   inputModuleData.setPrincipalData(msg);
              } catch (Exception e) {}
              return null;
         private void convert(byte[] bs, String path) throws Exception {
              String bs_out = new String(bs);
              String filename =
                   bs_out.substring(
                        bs_out.indexOf("<FileName>") + 10,
                        bs_out.lastIndexOf("</FileName>"));
              bs_out =
                   bs_out.substring(
                        bs_out.indexOf("<Base64>") + 8,
                        bs_out.lastIndexOf("</Base64>"));
              byte bb[] = com.sap.aii.utilxi.base64.api.Base64.decode(bs_out);
              File f1 = new File(path + filename);
              FileOutputStream fos = new FileOutputStream(f1);
              fos.write(bb);
              fos.close();
    The object Channel come s from the package import com.sap.aii.af.service.cpa.Channel;
    The jar is in the build path (com.sap.aii.af.service.cpa.jar);
    When I write in NWDS
    Channel ch = new Channel(moduleContext.getChannelID());
    NDWS gives me an error "Cannot instantiate the type Channel".
    Can somebody help me about that, please?
    Does that code dosn't work in pi 7.1?
    Thanks in Advance for your help.
    Best Regards.
    E. Koralewski
    Edited by: Eric Koralewski on Feb 3, 2011 1:40 PM

    > When I write in NWDS
    > Channel ch = new Channel(moduleContext.getChannelID());
    > NDWS gives me an error "Cannot instantiate the type Channel".
    it should be:
    Channel ch = (Channel) LookupManager.getInstance().getCPAObject(CPAObjectType.CHANNEL, moduleContext.getChannelID());
    (taken from sample module ConvertCRLFfromToLF)
    http://help.sap.com/javadocs/pi/pi711sp03/index.html?com/sap/aii/af/service/cpa/Channel.html
    Edited by: Stefan Grube on Feb 3, 2011 2:02 PM

Maybe you are looking for

  • PDF vs WMV Slide Shows

    This is a follow up to a previous submission. I have three separate slide shows to prepare.  They contain 235, 385 and 470 images respectively.  Prior to making a slide show I disable Power Settings from Control Panel.  I have a Windows 7 operating s

  • Issue with clear input field icons in IE10

    Hi, In IE10, every input field displays a clear icon (an "x"). I need to remove these icons through CSS (if you delete the date field, an error is displayed). Following MS solutions are not working in ADF: input::-ms-clear { display: none; } or ::-ms

  • Audio goes in and out of sync when burned dvd played on standard DVD player

    I made a short film recently (7:00 mins) and once completed and burned to DVD using iDVD and DVD Studio Pro about 20% of the clips have out of sync audio. Just slightly out of sync. Some more noticeable than others. Playing off the timeline syncs per

  • Call an OS shell

    Hi, In a PL/SQL loop procedure, I need to call a AIX system command, to create dynamically a file (name depends of fetch cursor perform in a loop), and next open it (UTL_FILE.FOPEN don't create the file). Can somebody help me ? thanks for your help b

  • Memory management / Memory Leak under KDE 4.2?

    If I should do something a little more structured to check this out, I'm open to suggestions.  I'm mostly hoping to confirm or deny this behavior with others. For context -- I've been using GNOME with Arch on this hardware since mid-December (when I