Same sender file name with a different extension

Hello Friends,
My scenario is I have an xyz.xml file coming and i need to have the same file name in the receiver but with a different extension as xyz.csv and the source file name will not be the same, it will be changing.
Can you please help me on this.this is a bit urgent to me.
Thanks in advance.
Regards,
Kumar

Kumar,
Write <b>UDF</b> with <b>no input</b> parameters.
DynamicConfiguration conf = (DynamicConfiguration) container
    .getTransformationParameters()
    .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create(
    “http://sap.com/xi/XI/System/File”,
    “FileName”);
String fname = conf.get(key);
StringTokenizer st = new StringTokenizer(fname,".");
String[] name = new String[2];
while(st.hasMoreElements())
for(int i=0;i<1;i++)
name<b>[</b>i<b>]</b>=st.nextElement();
String finalname = name[0]+".csv";
conf.put(key,finalname);
<b>Mapping Logic</b>
UDF -
> Target Rootnode.
Make sure that u checked the Adapter specific message attributes in both comm.channel.
If you have doubts reply back.
Best regards,
raj.
Message was edited by:
        Raj

Similar Messages

  • Same source file name with a different extension

    Hi All,
    I have a source file which is dynamic all the time. Can I create a target file which has the same name as the source file but with a different extension.
    Scenaio is file to file.
    test. xml is the source file name and the target file name should be as test.csv
    Regards,
    Amar

    Hi Amareshwar,
    you can write a java code (either in UDF or import in imported archive and use in imterface mapping).
    The piece of code is..
    DynamicConfiguration conf = (DynamicConfiguration) myParam.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey Filekey = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String OriginalFileName = conf.get(Filekey);
    if (OriginalFileName != null)
    NewFileName=OriginalFileName.replaceAll(".csv",".txt");
    conf.put(Filekey,NewFileName);
    And in Integration Directory>Configuration Scenario>your communication channels (both sender and receiver) just select
    Adapter specific message attributes- File name
    This would solve your problem.....
    Regards,
    Vishal Gupta
    Plz reward points if you are satisfied with the solution.

  • How to keep same sender file name for receiver mail attachement

    Hi,
      i am working with File to Mail scanario. There i want to pick a flat file from native file system and then send it as email attachment. Now i am able to send the file but the flat is getting converted as an xml file. is there any method to keep the same sender file name and type for receiver mail attachment. i am not using any mail package. i am using XI payload and keep attachments.
    Thanks in advance.
    -Siva

    Hi,
    Yes,With out using the mail package u can send the Mail Attachments to the receiver side,
    In that case no need of Integration Repository objects.
    Chck this links.
    /people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
    /people/community.user/blog/2006/09/07/email-reporting
    /people/community.user/blog/2006/09/08/email-report-as-attachment-excelword
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    /people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter
    If u dont get ur requirement then let me know ur Mail id i will send u a Doc.
    Regards,
    Phani
    Reward points if Helpful

  • File name with different type

    Hi,
    I need to send specific date format with file name to two different receivers. So the file name is same for both the two receivers but file extension is different. So I configured with dynamic configuration in UDF and in the receiver channel i have given .txt and .dat but it is not working. Can we do it in any other way.
    Thanks,
    kum

    Hi Kum,
    If I am not wrong, you must be using conditional receiver determination for determining 2 receivers.
    In this case, you can define 2 separate mappings which you can call in Interface determinations (2 interface determinations).
    In one mapping, you can have UDF for .txt file and in other .dat file.
    -Tanaya.

  • Re-link files with a different extension

    POSTED by ToddNewOrleans in duplicate (now deleted) thread:
    Hi,
    I haven't seen a solution to this, but the question has been posed.
    I was sent a hard drive with media to edit. I had to change the file extension of all the clips (long story). The clips however, are named the same.
    I'm working with a director in another state who has the same clips I had to change the file extension to. He has edited a rough cut using the the QT clips and sent me the PP Project. I'm trying to re-link the clips, which total 350. I can manually re-link these to my clips with the different extension....which is a pain. I would like to batch link these. Is there any way to do this?
    We are both working in CC2014 v8.1
    I'm in Windows, he's on a Mac, which is no problem as we've worked on films like this before.
    Also, the reason I had to change the ext is a ling story. I just need to know if batch re-linking is possible with a different ext.
    Thanks,
    Todd

    Posted by ToddNewOrleans in a duplicate (now deleted) thread:
    Hi, and thank you both for replying.
    I received the footage which was encoded using a tricaster. I was given a hard drive which contained these files and a PP Project, all having a Quciktime wrapper. When I tried to open the project and link the media, I kept getting a "file import failure", error message "codec missing or unavailable". However my colleague is able to open them. I'm on a pc, he's on a Mac. I've never had any issues importing media. When I checked the codec on the clips, it says xd54. I researched and it was shown as XD Cam codec, which I've never had a problem with. I researched and found that it might be a proprietary Avid or FCP version. I was unable to open any of them in QT Pro (up to date), but was able to open them in Media Player Classic. This lead me to believe that there was something wrong with the wrapper and the codec.  I started thinking about it and changed the file extension on a clip to .mp4 and was able to import it. I dup'd the folder and batched changed the file extension of all the clips.
    I downloaded a trial version of a Calibrated XD Cam Decode which worked on the QT clips but left a watermark and cost $150, out of my budget for this film.
    I read somewhere that PP doesn't understand a Quicktime wrapper using that codec, as it isn't normal to have that. I have a Sony EX3 Cam which encodes as .mp4's and also use the Sony FS100 which encodes as .mxf's. XDcam is a Sony codec.
    IDK...I'm trying to understand all this myself. That's why I was hoping to re-link with a different extension as it took forever to re-link these clips. I will be sent another project ile using those same QT's that don't work.
    GRRR! LOL!
    Thanks,
    Todd

  • File name with Dateand time stamp.

    Hi All,
    I want to generate a file with a date and time stamp.
    For that in File Receiver adaptor i am using option "Add Time Stamp" in File Construction mode. however it is generationg file name as: FileName_20082104_121211_645.txt . In this I don't know what these last three characters "_645" are? And In the File name i only want a file name with datetime stamp . I don't require underscore in between. for eg: FileName_20082104121211.txt (FileName_dateTime.txt)
    Can anybody suggest me the way to achive this?
    Thanks,
    Atul

    @FileName_20082104_121211_645
    The date time stamp in XI's file adapter will be in that format. This is to avoid over writing of files created simultaneously at the same time. So the last 3 digits is a form of an unique id to distinguish between the same.
    In case you want the format as FileName_20082104_121211, use the dynamic configuration and create the file name inside the mapping itself and pass it across.
    To get an idea about the same, ref:
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14 - an usage of the same.
    http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm

  • File Name is Showing different

    Hi All,
    I have done a File To File
    Multiline scenario successfully.
    The sending file name is sale.txt
    and in the receiver communication
    channel, file name scheme is
    sale.xml.
    But in the destination folder i
    am receiving that file in
    different name (for eg: benzene)
    Could you please let me know
    where could be error ?
    Thanks,
    Ashok

    Hi Sergio Cipolla,
    Thanks Alot my problem was solved with your great help.
    can I have your mail ID pls for further communication.
    Thanks & Regards,
    AshokKumar.

  • Shared photo-stream, makes long file names with 42 random characters

    Windows icloud 3.1, in a shared photo-stream, makes file names with 42  random characters long. It didn't do this in iCloud  2. I have installed  iCloud 3.1 on a windows 8.0 and 8.1 machine and two Windows 7 machines.  They all do the same thing.  It used to give me file names like  "IMG_0001.jpg" now it gives me random file names like  "01a9fc3363330464233a142486180f0c1622eb9fca.jpg" all the pictures are  out order.
    Does anyone have fix for this? Does any one else have this  problem? I have posted this before and know one else that uses windows  seams to have this problem exect me. I did call Apple and they did some  research and bumped me up to senior  techs and eventuality Apple told me this is working the way it was  designed to. This is extremely stupid, I need the sequential file names  so the pictures will sort correctly.

    I have never found a solution for this.
    I did find a Work Around. What I do when I receive a folder full of pictures from another ios iPhone user, I copy all the photos as a batch from the PhotoStream folder into a free Windows program called "FastStone Photo Resizer" from www.FastStone.org. This program allows you to resize the photos as a batch to what ever size you wish. In my case I resize them to 2560 x 1440 which fills my 27" monitor and reduces the file size of each picture from 2MB or 3MB down to about 450 KB without degrading the picture as far as what you see on the screen.
    This program will also within the same batch operation, allow you to sort the pictures by "Date Taken" which is the Date and Time the picture was taken. It gets this information from the EXIF data in the jpg file. This program will then rename the files with different numbering format options including date, time, alphanumberic and with just simple numbers starting at what ever number you wish to start with. I can get files that look like this again "IMG_0001.jpg" and have all the pictures in the correct order that they were taken. At this point, I save the pictures directly to a folder on my PC. The cool thing about this is, all the EXIF data is preserved as well. I can process a 100 pictures in less that 60 seconds. I hope this helps. For me, I can now live with this iCloud numbering defect.

  • Camparing file name with a value of the field in the source

    Hi All,
    I have a file sender. I need to compare the file name with the value of a field in the source and then map to the target.
    For example:
    <Record>
         <Date>20071103></Date>
         <name>abcd</name>
    </Record>
    the name of the file would be 20071103. i need to check this file name with value in 'date' field , if its true then we need to map it to target
    please suggest some way to meet the reqirement
    thanks
    jhansi

    Hi,
    Here is the reason i need to do this:
    The data is loaded by DTP in process chain. Overlaping requests are deleted. But, iIn some cases requests with the same selection options  need not to be deleted. My idea was to change selection options in Manage(infocube) with Abap program without changing selection options in DTP filter,  so that the system would not recognize requests as "overlaping requests".
    So, where is the information about shown in the field Selection Options is stored? In which tables?
    Thanks
    Tigr_Z

  • Change file name with oreilly servlet

    I am using oreilly servlet package and I want to change the file name to the file I am uploading, is this possible ?
    How ?
    Thanks.
    here I post the servlet code:
    package com.reducativa.sitio.servlets;
    * DemoParserUploadServlet.java
    * Example servlet to handle file uploads using MultipartParser for
    * decoding the incoming multipart/form-data stream
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import com.oreilly.servlet.multipart.*;
    public class DemoParserUploadServlet extends HttpServlet {
    public void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    PrintWriter out = response.getWriter();
    response.setContentType("text/plain");
    out.println("Demo Parser Upload Servlet");
    File dir = new File("f:/");
    if (! dir.isDirectory()) {
    throw new ServletException("Supplied uploadDir " + "f:/ " +
    " is invalid");
    try {
    MultipartParser mp = new MultipartParser(request, 10*1024*1024); // 10MB
    Part part;
    while ((part = mp.readNextPart()) != null) {
    String name = part.getName();
    if (part.isParam()) {
    // it's a parameter part
    ParamPart paramPart = (ParamPart) part;
    String value = paramPart.getStringValue();
    out.println("param; name=" + name + ", value=" + value);
    else if (part.isFile()) {
    // it's a file part
    FilePart filePart = (FilePart) part;
    String fileName = filePart.getFileName();
    if (fileName != null) {
    // the part actually contained a file
    long size = filePart.writeTo(dir);
    out.println("file; name=" + name + "; filename=" + fileName +
    ", filePath=" + filePart.getFilePath() +
    ", content type=" + filePart.getContentType() +
    ", size=" + size);
    else {
    // the field did not contain a file
    out.println("file; name=" + name + "; EMPTY");
    out.flush();
    catch (IOException lEx) {
    this.getServletContext().log("error reading or saving file");
    }

    Hi there,
    I am facing the same problem that you have stated in your Feb 26, 2002 10:28 AM message regarding "change file name with oreilly servlet", I would like to change the file name to include a unique identifier upon upload, did you ever find a solution to your problem?
    Thanks!
    Todd
    [email protected]

  • FILE NAME WITH FILE EXTENTIONS

    HI EXPERTS!!
    I WANT TO GET THE FULL FILE NAME STRORED IN THE SERVER FOLDER. I USED  FM RZL_READ_DIR_LOCAL BUT I AM GETTING ONLY 32 DIGITS OF NAME NOT FULL NAME AND ALSO SIZE PARAMETER IS CONCATENATING WITH NAME.
    I WANT THE FILE NAME WITH FILE EXTENTIONS(TXT. .PDF ETC)..
    PLZ SUGGEST ME HOW TO GET THE SAME..
    PLZ REPLYE ME..
    MAHESH

    Hi Mahesh,
    Try the below FM in the below code.
      DATA:
        LV_PERMISSION(10),                 " Permission
        LV_H2,                             " H2
        LV_FLNM(13),                       " File name
        LV_USER(10),                       " User
        LV_GROUP(10),                      " Group
        LV_SIZE(15),                       " Size
        LV_MONTH(3),                       " Month
        LV_DAY_C(2),                       " Day
        LV_YEAR(5),                        " Year
        LV_FILE_NAME       TYPE FILE_NAME, " Filename
        LV_JUNK,                           " Junk
        RETURN_CODE      TYPE I.           " Return code
      DATA:
        CMD_PARAMS LIKE SXPGCOLIST-PARAMETERS,
                                           " External prg.parameters
        CMD_OUTPUT TYPE BTCXPM OCCURS 0,   " Log message
        STATUS TYPE EXTCMDEXEX-STATUS.     " Status
      CONSTANTS:
        LC_DIR TYPE C VALUE 'd'.           " Directory
      FIELD-SYMBOLS: <CMD_OUTPUT_LINE> LIKE LINE OF CMD_OUTPUT.
      CMD_PARAMS = PV_DIRECTORY.
      CLEAR CMD_OUTPUT.
      CALL FUNCTION 'SXPG_CALL_SYSTEM'
           EXPORTING
                COMMANDNAME                = 'Y_LS_LN'
                ADDITIONAL_PARAMETERS      = CMD_PARAMS
           IMPORTING
                STATUS                     = STATUS
                EXITCODE                   = RETURN_CODE
           TABLES
                EXEC_PROTOCOL              = CMD_OUTPUT
           EXCEPTIONS
                NO_PERMISSION              = 1
                COMMAND_NOT_FOUND          = 2
                PARAMETERS_TOO_LONG        = 3
                SECURITY_RISK              = 4
                WRONG_CHECK_CALL_INTERFACE = 5
                PROGRAM_START_ERROR        = 6
                PROGRAM_TERMINATION_ERROR  = 7
                X_ERROR                    = 8
                PARAMETER_EXPECTED         = 9
                TOO_MANY_PARAMETERS        = 10
                ILLEGAL_COMMAND            = 11
                OTHERS                     = 12.
    Check Status first then check sy-subrc
      CASE SY-SUBRC.
        WHEN 0.
          CASE STATUS.
            WHEN 'F'.
              MESSAGE I057(YS) WITH 'SXPG_CALL_SYSTEM'(002).
              GF_EXIT = GC_TRUE.
            WHEN 'E'.
              MESSAGE I058(YS) WITH 'SXPG_CALL_SYSTEM'(002).
              GF_EXIT = GC_TRUE.
            WHEN 'S'.
              MESSAGE I059(YS) WITH 'SXPG_CALL_SYSTEM'(002).
              GF_EXIT = GC_TRUE.
            WHEN 'C'.
              MESSAGE I061(YS) WITH 'SXPG_CALL_SYSTEM'(002).
              GF_EXIT = GC_TRUE.
          ENDCASE.                         " CASE STATUS.
        WHEN 1.
          MESSAGE I048(YS) WITH 'SXPG_CALL_SYSTEM'(002).
          GF_EXIT = GC_TRUE.
        WHEN 2.
          MESSAGE I049(YS) WITH 'Y_LS_LN'(003).
          GF_EXIT = GC_TRUE.
        WHEN 3.
          MESSAGE I050(YS) WITH 'SXPG_CALL_SYSTEM'(002).
          GF_EXIT = GC_TRUE.
        WHEN 9.
          MESSAGE I054(YS) WITH 'SXPG_CALL_SYSTEM'(002).
          GF_EXIT = GC_TRUE.
        WHEN 10.
          MESSAGE I055(YS) WITH 'SXPG_CALL_SYSTEM'.
          GF_EXIT = GC_TRUE.
        WHEN 11.
          MESSAGE I056(YS) WITH 'SXPG_CALL_SYSTEM'(002).
          GF_EXIT = GC_TRUE.
        WHEN OTHERS.
          MESSAGE I022(YS) WITH SY-SUBRC.
          GF_EXIT = GC_TRUE.
      ENDCASE.                             " CASE SY-SUBRC.
      IF GF_EXIT = ' '.
        READ TABLE CMD_OUTPUT ASSIGNING <CMD_OUTPUT_LINE> INDEX 1.
        IF SY-SUBRC = 0.
          CONDENSE <CMD_OUTPUT_LINE>-MESSAGE.
          IF <CMD_OUTPUT_LINE>-MESSAGE CS 'total' OR
             <CMD_OUTPUT_LINE>-MESSAGE CS 'TOTAL'.
            DELETE CMD_OUTPUT INDEX 1.
          ENDIF.
        ENDIF.
        LOOP AT CMD_OUTPUT ASSIGNING <CMD_OUTPUT_LINE>.
          CONDENSE <CMD_OUTPUT_LINE>-MESSAGE.
          SPLIT <CMD_OUTPUT_LINE>-MESSAGE AT SPACE INTO
                                          LV_PERMISSION
                                          LV_H2
                                          LV_USER
                                          LV_GROUP
                                          LV_SIZE
                                          LV_MONTH
                                          LV_DAY_C
                                          LV_YEAR
                                          LV_FILE_NAME
                                          LV_JUNK.
          IF LV_PERMISSION(1) = LC_DIR.
            CONTINUE.
          ELSE.
            LV_FLNM = LV_FILE_NAME(13).
            TRANSLATE LV_FLNM TO UPPER CASE.
            IF LV_FLNM = '1W_FIARFUNNEL'.
              PT_FILE-FILE_NAME = LV_FILE_NAME.
              APPEND PT_FILE.
            ENDIF.                         " IF LV_FLNM = '1D_FIARFUNNEL'.
          ENDIF.                           " IF lv_permission(1) = ...
        ENDLOOP.                           " LOOP AT CMD_OUTPUT
      ENDIF.                               " IF GF_EXIT = ' '.

  • Part of sender File name at the receiver side?

    Hello All,
    My requirement is like this.
    iam picking the file from FTP server and place the file in another FTP server with out mapping.
    I need to use part of sender file name to create the receiver side along with current date.
    for example.
    sender side file name : LM01000008.txt
    recevier side file name need to generate : LM01dd/mm/yyyy
    Please let me know how to achive this.
    i tried with the blog given below, but partial file name is not possible with that blog.
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417100)ID0229698450DB11989196758750510369End?blog=/pub/wlg/6400
    Thanks and Regards,
    chinna

    Hi Chinna,
    Use this code
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    SimpleDateFormat dateformat = new SimpleDateFormat("yyyyMMdd");
    String timestamp = dateformat.format(new Date());
    String newfilename=fileName+timestamp+".txt";
    // change to new file name
    conf.put(key, newfilename);
    return "";
    Regards
    Suraj

  • MimeBodyPart.getFileName() returns file name with directory path.

    Hi
    The documentation says getFileName() returns filename ,not including directory components. But it is returning
    path like Eserv generic/mails/a.html. Can it return a full path in some mail servers?
    Please respond.
    Thanks

    The documentation says getFileName() returns filename ,not including directory components.I think you must be misinterpreting the documentation. Where did you read that?
    The getFileName method returns whatever the sender sent as a file name. The send should
    send only a simple file name, with no directory components, but they can send anything, and
    you should protect against abuse before using such a file name.

  • Encoding failed in "file name" with error: -43

    Hi!
    I've tried everything but still, after about 20 hours of encoding DVD Studio Pro just stoppes, saying "encoding failed in "file name" with error: -43". The movie is in DV PAL format and made in Final Cut Pro version 5. I'm using DVD Studio Pro 4.0. The movie is about 1 hour and 30 minutes long and I'm trying to put it on a double layer DVD. I've tried to shorten it (it was nearly 2 hours before), but that didn't help. I also tried to shorten it even more and put it on a single layer DVD, but still the same message.
    So if somebody has any idea of how I can solve this problem, please let me know as soon as possible!
    Thank you!

    Error -43 means "File not found." If you are compressing from a reference movie, make sure that all referenced movie clips are present on the disk and that permission settings are not preventing DVD Studio Pro from accessing them.
    Error -1309 means "Out of bounds." This means that the source file is pretending to be bigger than it actually is.
    So it sounds like there are issues with your source movie.
    P.S. Compressor has a much better MPEG-2 encoder and I would recommend using that instead.

  • Configure receiver file name as Sender file name

    Hi All,
        In PI7.1.  We have scenario(file to file). Here the sender system send multiple files and In the receiver system we need to populate the same filenames as Sender file Names.
    Could you please let me know is there a configuration to have Receiver file schem name As like sender file names.
    Thanks in Advance,
    Naga.

    Hi Naga,
    This can be achieved using either variable substitution or Dynamic Configuration by enabling Adapter Specific Message Attributes in sender and receiver file channels.
    If the sender file name and receiver file name needs to be exactly same then just check Adapter Specific Message Attributes in advanced tab of both sender and receiver channels. Check on File Name under that.
    Lot of help over this is already available in sdn, kindly serach and you will get lot of helpful blogs and wikis
    Regards,
    Gautam Purohit
    Edited by: Gautam Purohit on Apr 16, 2010 11:26 AM

Maybe you are looking for

  • No NFL Mobile for the Z30

    Why is there no app for this? Both the Q10 and the Z10 have it, why doesn't Blackberry flagship device not have this by now? Contacted VZ customer service about it and was told to stop paying for it,  Is BBRY not aware of this? And what if anything a

  • Creating Business Object Reports and Dashboards utilizing Informatica

    I need to create Business Object Reports and Dashboards utilizing Informatica database. Please let me know what connections I need to create to integrate the data into Web Intelligence, Universe, Xcelsius, and Crystal Reports. Thank you

  • RMAN backup in HP Ultrium 3-SCSI(3mn) tape device

    Dear All IS it possible to take online RMAN backup in HP Ultrium 3-SCSI(3mn) tape device? Note: this is not a tape library, a stand alone tape device. Thanks & Regards Quazi Abdur Rab

  • Oracle 10g. emd-web-site.xml not found

    I have this error when i try to test the status of iasconsole. Unable to determine console port. $ORACLE_HOME/sysman/j2ee/config/emd-web-site.xml not found. No such file or directory. i try to reconfigure via emca the central agent management, but wh

  • Using new methods (getContentHandler and parse(InputSource)

    I am trying to read an xml file then count how many books from the xml file. I learned some methods are deprecated, so I tried to use the new methods. But, I somehow can't get the program work. I am stack on the getContentHandler and parse(InputSourc