Renaming a File to File without Mapping

Hi All,
I am having a scenario where there is a text file transfer without any conversion i.e. basically a file to file scenario with no mapping. The only requirement is to rename source file which has .csv extn to .dat. For instance if the sender file is XYZ.csv, the file at the receiver side should be XYZ.dat.
As there is no mapping, I cannot use Dynamic Configuration UDF in mapping. One other option is to write an adapter module which seems too bulky for this small requirement. So as of now I am looking at any option which I can use without having to create IR objects or do text ->XML -> text conversion.
I hope experts here can help in resolving the current problem and/or give some pointers
Best Regards,
Pratik

> OS Command in File Receiver Channel: mv %f `basename %f .csv`.dat
I think you should use the full path address, the same as you used for the folder.
You can also use an adapter module, it is just a couple of lines:
public ModuleData process(ModuleContext moduleContext, ModuleData inputModuleData)
                      throws ModuleException{
     try {
        Message msg = (Message) inputModuleData.getPrincipalData();
        Payload payload = msg.getDocument();
        String fileName = msg.getMessageProperty("http://sap.com/xi/XI/System/File","FileName");
        // do something with the filename
        msg.setMessageProperty("http://sap.com/xi/XI/System/File","FileName", fileName);
        inputModuleData.setPrincipalData(msg);
    } catch (Exception e) {
        throw new ModuleException(e);
    return inputModuleData;

Similar Messages

  • File to File multiple scenario without mapping

    Hi
    I am doing one simple file to file scenario without mapping i.e picking file from sender directory and then placing it in receiver directory via FTP.
    Now i have to take two files from different directories and place them in to different directories in the receiver side.
    On the sender side i have selected Advanced selection for source file and maintained the sceond directory name and filename.
    now i am not aware about the reciver side that how to place the two files in to different directories.
    I have to make only one interface for this.
    Thanks in advance.

    u have to follow the code in the link provided above but with some manipulations...
    in case u r placing the files in different target dir depending upon the source directory then ur code will be something like this:
    Note: i dont have a system as of now..so cant able to check the code for syntax errors..please cross check it
    MessagePropertyKey mpk = new MessagePropertyKey("Directory","http://sap.com/xi/XI/System/File");
    String SourceDir = msg.getMessageProperty(mpk);
    if(SourceDir.equals("/SourceDirectory1"))
    String targetDir1 = "/TargetDirectory1"
    msg.setMessageProperty("http://sap.com/xi/XI/System/File","Directory",targetDir1);
    else if(SourceDir.equals("/SourceDirectory2"))
    String targetDir1 = "/TargetDirectory2"
    msg.setMessageProperty("http://sap.com/xi/XI/System/File","Directory",targetDir2);
    else
    http://help.sap.com/javadocs/pi/SP3/xpi/com/sap/engine/interfaces/messaging/api/Message.html#getMessageProperty(com.sap.engine.interfaces.messaging.api.MessagePropertyKey)
    lIbraries for adapter module development:
    http://wiki.sdn.sap.com/wiki/display/XI/Where%20to%20get%20the%20libraries%20for%20XI%20development
    How to develop adapter module:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0b39e65-981e-2b10-1c9c-fc3f8e6747fa?QuickLink=index&overridelayout=true

  • File to Mail without Mapping

    Hi Experts,
    I need to pick up text files from a folder using File Adapter and then send them to a mail id directly without any mapping in XI. Please suggest how it can be done.
    Thanks,
    Shobhit

    Hi-
    Check out these links
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1685 [original link is broken] [original link is broken] [original link is broken] [original link is broken]
    /people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6d967fbc-0a01-0010-4fb4-91c6d38c5816

  • Passing a file via File Adapter without renaming.

    We have a scenario whereby we pick up a file locally using a file adapter set up as a sender in local NFS file mode, and then pass that file through PI without mapping or conversion to XML.
    We would like to send the file via a file adapter set up as a receiver in FTP mode, and to use the filename that was recognised by the sending adapter. However, I cannot see a way to do this.
    is this possible?
    - Tony.

    Hi,
    The problem is, as I see it, that the File Receiver in FTP mode expects a naming convention that will not provide what er want to do.
    e.g. File sender processes a file EDI00001.txt. We want to send that file via the File Receiver in FTP mode with that filename, EDI00001.txt.
    Next file picked up from file sender has name EDI00002.txt. We want that sent via FTP as EDI00002.txt, etc etc.
    Problem is, it seems there is no way to tell the File Receiver to use the file name that the File Sender picked up.
    BR,
    Tony.

  • Rename a file at the reciver without mapping with date/timestamp_filename

    Hi Friends,
    I have a scenario in which I have to rename the file if its exisiting at the reciever end with date/timestamp_filename in a file to file scenario without mapping.
    Thanks,
    --Sonal

    chk this (using adapter modules)
    http://wiki.sdn.sap.com/wiki/display/Snippets/DynamicfilenameinaFiletoFilepassthroughscenario

  • Send attachment via Receiver FILE/JMS adapter without using any Mapping.

    Hi,
    R/3 program creates one (encoded) text file, which I want to send via Proxy to JMS adapter without any mapping or FCC.
    Note: I don't want to use File adapter to pick the file from R3 dir and then send it to JMS.
    Reference: I have gone through below mentioned blog which produces the attachment in the XI payload but I am not able to write the same attachment to my XI dir using Receiver File adapter (File adapter is just for testing actual adapter will be used as Receiver JMS adapter).
    /people/michal.krawczyk2/blog/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies-with-attachments
    Regards,
    Sarvesh

    > note sure why you want to complicate things here
    Actually the idea was to explore the possibilities of "Proxy with attachment". And I also wanted to confirm with experts like you before going to other options. Anyway it seems it's only possible with mail adapter.
    Reason for exploring above possibility: Since ABAP team has to create one text file and encode it, so we thought to call the outbound proxy in the ABAP program to send the same file as an attachment and then simply send it to JMS. Which is quite obvious thinking when you don't want to manage a share directory between R3 & XI or don't want to manage FTP user and pwd.
    > i think the simplest thing is to go for a simple file to jms configuration unless you have any specific reasons for not doing so.
    This we already kept in our mind as a last option in case if above thing is not possible then we can easily do it by this way.
    Thanks a lot for suggestion.
    Regards,
    Sarvesh

  • File to file mapping without xml

    Hello,
    is there a possible way to use a PI7.1 file to file mapping (one static-positioned field must be mapped) without storing the file in xml format ?
    We are having a flatfile and have to send this flatfile through our jms receiver adapter(as flatfile structure) but there is one important field which has to be mapped/changed(static value for all files).
    Our SAP Applikation (File sender) would avoid to change this during or after creating the flatfiles in the R/3 System.
    Thanks,
    Gordon

    Hi Gordon,
    >- Do you have an example for that abap mapping ?
    DATA g_str TYPE string.
      CALL FUNCTION 'ECATT_CONV_XSTRING_TO_STRING'
        EXPORTING
          im_xstring  = source
          im_encoding = 'UTF-8'
        IMPORTING
          ex_string   = g_str.
      REPLACE 'ABC' WITH 'XYZ' INTO g_str.
      CALL FUNCTION 'ECATT_CONV_STRING_TO_XSTRING'
        EXPORTING
          im_string   = g_str
          im_encoding = 'UTF-8'
        IMPORTING
          ex_xstring  = result.
    >I think i have to use some entry parameters for my interface right ?
    ?? no..
    >- Is it possible to use that within the integrated configuration ?
    ??  yes..
    Regards,
    Udo

  • File to File without a Mapping in place ?

    Hi All,
    Would it be possible to tranfer a file from one destinaiton to another destination without a need to have a mapping in place. Its more of replicating a file at a source to a destination where in there is no need for mapping. But while creating such a scenario, during configuration time, an interface mapping needs to be provided which inturn needs a message mapping.
    Regards,
    Chaitanya

    check this blog... this can be done without mapping...
    <a href="/people/william.li/blog/2006/09/08/how-to-send-any-data-even-binary-through-xi-without-using-the-integration-repository to send any data (even binary) through XI, without using the Integration Repository</a>
    ~SaNv...

  • File to XI scenarion without mapping

    HI All,
    MY REQUIREMENT:
    1. Need to read the data from FILE .
    2. pass the values to a BAPI structure in ECC Without any mapping
    QUESTIONS:
    1. Is it possible to complete the  scenario without mapping in XI.
    2. If possible how.
    Could any one help me how to achieve this
    Than you,
    Harsha P

    My source data structure is same as BAPI.
    We have created data types ,message types and Service interfaces for SENDER in ESR.
    But our Issues.
    1. Do we need to create Receiver Interface Objects.
    If yes How (In our scenario receiver is BAPI)
    import RFC under imported objects in esr
    2. What are the configurations we need to do in ID for SENDER and RECEIVER.
    coming to id:
    create everything like
    communication channels for sender as file and receiver as RFC.
    create Agrrements for sender and receiver.
    create Receiver determination and interface determination.
    Edited by: bhavanisankar.solasu on Feb 21, 2012 4:17 PM

  • Request Message mapping in SXMB_MONI for File - RFC - File without BPM

    Hi ,
    In my File-RFC-File scenario, the messages are processed successfully.
    but when i look into the SXMB_MONI for File to RFC step, the records are present only till the  Message split According to Receiver List and not able to see the records from Request Message mapping step onwards.it contains
    <?xml version="1.0" encoding="UTF-8" ?>
      <ns1:Z_PI_LOTUSNOTES_UNIFORM xmlns:ns1="urn:sap-com:document:sap:rfc:functions" />
    in my mapping for the receiver RFC i have not done the mapping for all the fields. few fields i have disabled. whether this could create a problem in message mapping. pls let me know what needs to be done.

    Is it only for this scenario that the above display issue is occuring or is it for all scenarios?
    If onlt a particular Pipeline steps are displayed then you can check what is the TRACE level set in SXMB_ADM --> Integration Engine Configuration --> and check if the TRACE parameter is set to at least 2 (max is 3 which will ensure that your DB will get full quickly)
    For more information refer: /people/michal.krawczyk2/blog/2005/05/10/xi-i-cannot-see-some-of-my-messages-in-the-sxmbmoni
    Regards,
    Abhishek.

  • Saving files over VPN to mapped drive

    Hi,
    looking for a solution to force users to save files to a mapped drive connected over VPN running off an SBS 2008 server.
    This topic first appeared in the Spiceworks Community

    You take about 2010 Section One to 2011 Section One?
    So I presume there are more than one section? Have you not used the Book feature in Indesign, under File>New Book and then all the sections of a book go into a book file, which controls things like the pagination (if you want) and other things? You can then package the entire book (all the sections) at the same time).
    You could also copy the sections to a new folder. Then use Adobe Bridge to Batch Rename all the files in the folder? Would that help? http://www.communitymx.com/content/article.cfm?cid=A4B43
    From InDesign when you use File>Open there are 3 options  in the bottom left hand corner - you can choose to open the Original or a Copy and the Copy will open up as Untitled, meaning you can resave it anywhere. This works well if you're doing it on a file-by-file basis, and you can then save your files to the new location without worrying about overwriting the old ones.

  • Can't delete, rename or unlock a file

    My wife (running 10.8.5 on a 13" MacBook Pro July 2012) changed the name of a downloading file seconds before the download completed.  She now has a 15.6 Mb .mp3 file on her desktop which can't be played (I have tried MPEG Streamclip as well as Quicktime), deleted ("The operation can't be completed because one or more required items can't be found. (Error code -43)"), renamed, unlocked or have its permissions changed.  The information window looks like this:
    Sometimes these "ghost files" can be cleared by relaunching Finder - didn't work, neither did a restart.  I used Disk Utility to check the Hard Drive - OK - and correct permissions - lots of changes but not to this file.  I tried changing permissions on her desktop folder using "apply to all" but that didn't work.  I tried using the command "chflags -R nouchg" in terminal but that didn't work either (found in another discussion) probably because dragging the file to terminal only inserted the name and not the full path to the file.  I then tried restoring my wife's desktop file from Time Machine. That removed all the files from her desktop except the errant file without replacing them because Time Machine skipped that step because the permission were incorrect.  I spent 3 hours copying the deleted files back manually from the Time Machine Back up.
    In the course of copying from Time Machine, I noticed that the back up copy of the errant file on Time Machine was behaving properly, so I copied it back to Desktop hoping that it would simply replace the errant file.  Instead, I got two copies of the errant file which now both behave normally:
    changed to but when I renamed one of the files, the other lost its properties and went back to being untouchable.
    One solution would be to start up from Time Machine (as a network disc - I believe this is possible but haven't done it), completely reformat the Hard Drive and then restore my wife's Hard Drive from the Time Machine back up.  This seems like a lengthy and risky procedure just to get rid of this annoying file.
    Any other ideas?

    The following will delete that file immediately, no questions asked:
    Pay attention to these directions very carefully, and use at your own risk. One typo (an extra space inserted) could destroy your entire installation. Be absolutely certain that when you enter this command it looks EXACTLY the same for spaces and case (excepting the Chinese characters) as it does here.
    Open Terminal.app in Applications>Utilities and enter
    sudo rm -rf
    Important, leave a space after the -rf and drag the problem file into the Terminal window, which should then appear as:
    sudo rm -rf /Users/el/Desktop/xxx.mp3 (with the three Chinese characters replacing the xxx)
    There are single spaces only between sudo and rm, between rm and -rf and between -rf and /Users....  (It is possible, but not likely, that the Chinese characters may appear with spaces, including a backslash \ after the file is dragged into Terminal).
    Hit enter/return, whereupon you will be asked for your admin password, which won't appear in any form as you type it in. (If you have never used the sudo prefix before in Terminal, you will get a warning. Ignore it and proceed anyway.) Then hit return again. The file should be gone from the Desktop.
    If you like, you can do everything here up until hitting enter/return, then post back with resulting command in Terminal copied and pasted before proceeding, so I can check that it's looking OK.

  • I want to start a new movie but iMovie is hung looking for an old file and says:"Without this file, the movie cannot play properly."

    Hello!
    I recently upgraded to Lion. Every time I start up iMovie, it asks if I want to go ahead and generate thumbnails. I say OK, then it alerts me that it cannot file the file IMG_0073.MOV. Then it says "Without this file, the movie cannot play properly." It gives me the option to either cancel or search for the movie.
    I don't have the old file it's looking for. I simply want to start a fresh movie with new material but cannot get past this hump. Based on the little research I have done, some people experienced this problem because the files were in aperture at some point, which was the case for me before when I used iMovie. I have since moved forward only with iPhoto but perhaps it's hung on an old file format?
    I tried taking another old movie and renamed it IMG_0073.mov to see if I could simply select it, give it what it wants and move on but it won't let me select the file for some reason. I also tried removing iMovie and downloading a fresh version but that didn't work either. My BF tried removing pfiles (I think that's what it's called? but again no luck)
    Please help! I must get this assignment done for a class!

    Hello!
    I recently upgraded to Lion. Every time I start up iMovie, it asks if I want to go ahead and generate thumbnails. I say OK, then it alerts me that it cannot file the file IMG_0073.MOV. Then it says "Without this file, the movie cannot play properly." It gives me the option to either cancel or search for the movie.
    I don't have the old file it's looking for. I simply want to start a fresh movie with new material but cannot get past this hump. Based on the little research I have done, some people experienced this problem because the files were in aperture at some point, which was the case for me before when I used iMovie. I have since moved forward only with iPhoto but perhaps it's hung on an old file format?
    I tried taking another old movie and renamed it IMG_0073.mov to see if I could simply select it, give it what it wants and move on but it won't let me select the file for some reason. I also tried removing iMovie and downloading a fresh version but that didn't work either. My BF tried removing pfiles (I think that's what it's called? but again no luck)
    Please help! I must get this assignment done for a class!

  • File-to-file scenario: no mapping, filename from sender file

    Hi all,
    file-to-file without mapping.
    we want to use XI to transport just files from XI file directory to another ftp-server (+ archiving on xi file directory)
    we configered an sender file adapter that picks the file up, but
    we have problems configuring the receiver adapter in that way that the filename or the original file is used
    Is that possible? with which parameter settings
    filename is not content of the XI message content so "message:FileName" doenst work
    Thank you very much
    regards
    Hans

    Hi Hans,
    Check this link:
    How to send any data (even binary) through XI, without using the Integration Repository
    OR
    Copy a file with same filename using XI
    Sachin
    Edited by: Sachin Dhingra on Nov 7, 2008 8:19 PM

  • File to file with out message mapping and using variable substitution

    Hi,
    Can any one send me a scenario where we can have file to file scenario with out message mapping and where i can use variable substitution.
    As of now i am using integrate configurations where i cant use variable substitution as the message does not reflect in integration engine. I need to populate time stamp between <filename><timestamp>.txt.pgp
    I am as of now using configuration scenario.
    The time stamp always writes before the last file extension.
    Let me know your thoughts?
    Thanks,
    Chandra.

    Hi Chandra,
    u can use the Variable substitution even without IR contents also(Mapping....).
    in the receiver communication channel just specify the path u want to access for a value...
    eg: filename                             payload:mt_name,1,records,1,name,1
    and in th file name give it as %filename%.txt... or vt ever ur requirement
    Babu

Maybe you are looking for

  • F4 Help for presentation server filepath/name

    Hi,   Can anyone tell me how can I get a F4 help for selecting a file or directory from the PC...i.e I should get a pop-up “Open File” dialog to select the File on PC. Thanks! Sunitha.

  • How can I completely disable ssl3.0? about:config does not have security.enable_ssl3

    Latest discovery by Google says even though I use TLS, I may be configured to be backward compatible to SSL3.0 and a "Poodle" attack by a predator website might induce me to use SSL3.0 and be vulnerable to attack. They say the cure is: "To prevent PO

  • Discussion needed on animated group of buttons

    For a day i have been stumped. Picture this in your mind, a timeline 12 frames long a mask layer 20x6 in size a movie clip under the mask layer that contains 3 buttons lined up next to each other, this mc is 20x6 in size The Timeline: Starting Key Fr

  • Time Lapse (or similar) effect

    I have a question, it may fall under the "dumb question" category but I want to make sure i am thinking about this in the right way. I am shooting a music video type of project for my church this weekend. I have been requested to produce a time lapse

  • Filestream in Java Fx Mobile

    I am making a moblie application by java fx. I want to read strings from a files such as 'test.txt'. also, I want to save data in files. I made a iostream using java.io. but it doesnt work in Mobile.(even comfile cant be. I think is it not allowed) i