Question about different file name send to different receivers?

Hi, Gurus,
my senario:
in ftp server there are many files, which are either .doc or .xls. 
All .doc must be sent to e-mail address departmentA(a)companyname.com.
All .xls must be sent to departmentB(a)companyname.com.
I use Mail Package and keep attachment, without ASMA.
In Mapping I create UDF as below:
DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","FileName");
DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/Mail","THeaderTo");
String ourSourceFileName = conf.get(key);
String ourMailTo = "";
if (ourSourceFileName.equals("*.doc"))  {
       conf.put(key1,"departmentA(a)companyname.com");  }
else  {        conf.put(key1,"departmentB(a)companyname.com");  }
return ourSourceFileName;
But i got error message from integration engine:
Runtime exception occurred during application mapping com/sap/xi/tf/_MM_File2Mail_Dynamic_; com.sap.aii.utilxi.misc.api.BaseRuntimeException:Invalid byte 2 of 2-byte UTF-8 sequence.
What can i do? thanks for any kind of suggestion!
Rene
Edited by: Kefei Dong on Jul 16, 2009 10:27 AM

Just overwrite the filename in the WSDL file that was generated

Similar Messages

  • Question about renaming file names

    After spending many hours organizing my iphoto library, deleting duplicates, etc, it is now where I want it. So I have two questions.
    1. Is there a downside to updating all the file names to the Event Name as long as this is done in iphoto? (I was thinking this might be helpful in case anything gets jumbled in the future)
    2. If it is advisable to do #1, is there a way to do this to the whole library in bulk or do I need to do it event by event?
    Many thanks for any advice.

    It is not possible - you can not change file names in iPhoto - you can add titles and when you export use the title for the file name - but file names within the iPhoto library will always remain as they were originally imported
    Old toad uses image capture to bring photos to his hard drive and then uses a third party package to batch rename them to the proposed event name in a p=folder with that event name - then if you drag that folder to the open iPhoto window it creates an event with the folder name and the file names are what you set
    LN

  • Question about pass file name and path to file write adapter

    I need to pass file name and path to file adapter for write. I got partial answers from thread Re: Get File name using File Adapter , but seems InboundHeader_msg or outboundHeader_msg only takes file name, how do I pass file directory?
    since I still have to specify file format (like xxx_%xx%.txt) in the file adapter wizard. Will this name conflict with what the name defined in InboundHeader_msg ?
    Similarly, how can I pass a file name and path to a file synchread adapter?
    Thanks,
    Message was edited by:
    user531689

    Just overwrite the filename in the WSDL file that was generated

  • How to save a form in a different file name?

    Hello All,
    I have a form which has 7 pages. I have 3 buttons which are for submitting PDF,XML and print button. I do not want to keep SaveAs button.
    What I need : When the user completes all the required fields and clicks on SubmitAsPDF or SubmitAsXML then it will prompt the user to save the form in a different file name. After the user has saved the form in a different file name then it should submit the form to the required mail ID. How to best accomplish it ?
    Thanks.
    Bibhu.

    Hello Niall,
    Thanks for the help. I used a hidden field whose name is "CurrentFileName" then in the docReady event of this hidden field I used the following script.
    this.rawValue = event.target.documentFileName;
    Then in the mouseUp event of the submit button I used the follwing script.
    if(form1.Page1.CurrentFileName.rawValue == event.target.documentFileName)
                             app.alert("Please save this form in a different file name before submitting !");
                             app.execMenuItem("SaveAs");
    But problem is : As the file is saved in a different name the script fires again and again if we click the submit button prompting the user to save the form in a different file name , but the user has already saved it in different file name .How to get rid of it ?
    Thanks.
    Bibhu.

  • Adobe flash error: unable to save the document please try to save it to a different file name

    Hi,
    I am editing few fla files with my Adobe Flash Professional. Suddenly it stopped saving them and is giving me an error; unable to save the document as... please try to save it to a different file name or to a different location.
    i changed the location to save the files, but I still receive the same error.
    Is there any one who knows how to deal with this error?
    Thanks,

    close flash.  right click its icon or start program and click "run as administrator".  save your fla. 
    if that fails: restart your computer, create a new directory on your desktop and save a test fla (eg, named test) to that new directory.  any problem?

  • Question about download file in OAS4

    Question about download file in OAS4:
    I use Oracle Application Server 4.0.7 on my Windows NT 4.0 SP6;
    I use PL/Sql Cartridge developer a document system; It's use the
    upload/download in PL/Sql Cartridge;
    I read the document , the Upload/download in Pl/Sql Base on the
    Oracle Application Server's Content Service. the Problem is when I
    download a document, If I upload a Html or MsWord file, It will store in a LongRaw column, when me download ; It's tell me can't
    find a application to open this file; I will select a application
    from list to open the download file;
    As normal, It will open MsWord Automatic when download a "doc" file ; also It will open a new window of Browser to view a Html file;
    I check the download process on client Browser; when download
    file, The content-type always return "application/octet-stream";
    Also the download File will lost the postfix of the file,
    So Browser don't open the File Automatic;
    I think If I set the correct Content-Type , Browser can know how open the file; So I use owa_content.set_content_type procedure
    set the Doc file to "application/msword" , but the WEb Server always
    return "application/octet-stream";
    I didn't know how to do this problem, Plese help me.
    null

    I have a Tecra M2 and rely on your email update to ensure I have the latest drivers on my machine.
    When I received a Toshiba support email on 14 April 2005 giving reference to a QFE from Microsoft I assumed it would be necessary for my Tecra.
    I was very confused when I found that this QFE and subsequent ones posted on the 16 April 2005 relate to Pre SP2 critical updates no9t required if one has already taken earlier advice of updating to Service Pack, at the very least your narrative should make mention of this. I find it very difficult to believe that your updates are two+ years out of date.

  • I have a question about DWG files.  Can I open them on my MacBook Pro with OX 10.9.5 system?What app do I need to view and print them?

    I have a question about DWG files.  What app will allow me to open DWG files to view them on my Macbook Pro?

    Perform this Google search: ".dwg files on mac." The results should provide answers for you.

  • Question about openning files using SDK 10.

    I have written a Plug-In for SDK 9 that works wonderfully. One of the functions is for the user to be able to page (Next/Previous) between PDF files on our server. This functionality now longer works without crashing Acrobat 10. All I am doing is creating the URL path to the next/previous PDF, creating a CustomFileSys with the path and calling AVDocOpenFromFile.
    Does this no longer work with Acrobat 10 SDK?
    Thanks!

    Should work fine, AFAIK.
    For this level of issue, I would open a formal support request with developer support.
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Mon, 10 Oct 2011 08:51:08 -0700
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: Question about openning files using SDK 10.
    Question about openning files using SDK 10.
    created by Greggars<http://forums.adobe.com/people/Greggars> in Acrobat SDK - View the full discussion<http://forums.adobe.com/message/3963065#3963065

  • Questions about properties files

    Hello,
    I have two questions about properties files.
    1. Is it possible to import a properties file from another properties file?
    2. Is it possible to have variables in a properties file as described below in code snippet.
    Thanks in advance,
    Julien.
    Code snippet:
    var_one=foo
    var_two=$var_one bar
    The second line would then read "foo bar"

    Hello,
    I have two questions about properties files.
    1. Is it possible to import a properties file from
    another properties file?If you write your own code to parse whatever import statement you decide to put in the properties file, yes. But there's no provision to do so in the core APIs or in the standard usage of these files.
    2. Is it possible to have variables in a properties
    file as described below in code snippet.Same as the answer to your first question. Though this kind of thing is more common, so there might be a library at jakarta or sourceforge or mindprod or something that does this.

  • Mutiple sender files and receiver files with different file names

    Hi All,
    Following is my scenario: File (FTP) --> XI --> File (NFS actually SAP system)
    I have 5 source files like ABC<b>1</b>_DateTimeStamp, ABC<b>2</b>_DateTimeStamp, ABC<b>3</b>_DateTimeStamp, ABC<b>3</b>_DateTimeStamp and ABC<b>3</b>_DateTimeStamp.
    I can use single sender file FTP adapter with file name ABC* which picks up all 5 files, but can I use single receiver adapter to create 5 different files with the following file names: ABC1, ABC2, ABC3, ABC3 and ABC3 ?? And last 2 files (ABC3 and ABC3....same name) should be created after 30min and 60min of first ABC3 file. We have to do this because we have jobs scedule on SAP side with variants having file names.
    Is it possible to achieve using single sender/receiver file adapter??
    If not any suggestions how to do this scenario?? 
    Thx
    Navin

    Navin,
    I doesn't know whether its feasible for you or not. Please see the below option
    Create 3 Sender  comm.channels and 1 Receiver comm.channel. In Sender /Receiver file adapter check the Adapter Specific Message attributes.
    I'm suggesting the soln using BPM.
    In IR, Create 3 Outbound Interface (Abstract) and create 1 Inbound Interface(Abstract).
    First 2 comm.channel and 2 Oubtound interface refers to file 1 & file2 respectively.
    The 3rd comm.channel and 3 Outbound interfaces refers to file3 & file4& file 5 .
    Please see the BPM design.
    http://www.flickr.com/photo_zoom.gne?id=698877499&size=o
    Note : Navin the above suggestion is my thought, I think it will work. U can juz give a try.
    Best regards,
    raj.

  • 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

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

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

  • IDoc to File with different file name and data based on the IDoc header dat

    Hi,
    I got a requirement to implement IDOC to file senario.  In this the Converted file should have the file name and file content based on IDoc Header data.  Means If one of the IDoc header field value is
    'A'  - then the file name recieved by reciever system should be 'A.txt' and with the columns A  B  C  D  F.
    'B'  - then the file name recieved by reciever system should be 'B.txt' and with the columns C  D  F.
    In both the case IDoc message type is same.
    Please suggest me what i need to do to achieve this.
    Thanks in Advance. ...
    Regards
    Sri

    Hi,
    As per my requirement, we need to create one file for each IDoc based on IDoc header data. SAP program generates 10 IDocs for each run. All 10 IDoc's message type is same.  Each IDoc has one header record with the file name. Base on the  name in the IDoc header record, file needs to be created with different columns and file name. Means..
    IDoc 01- Header Description contains 'A' - than file will be generated should have name as 'A.txt' and columns 'parent'  'child' 'descripion'.
    IDoc 02- Header Description contains 'B' - than file will be generated should have name as 'B.txt' and columns 'Name' 'Department' 'Description'.
    IDoc 10- Header Description contains 'J' - than file will be generated should have name as 'J.txt' and columns 'Order No'  'Materail' 'Description'.
    Hope this will give more clarity on my requirement. Please let me if you are still not clear on requirement.
    Thanks for your all help..
    Thanks & Regards
    Sreeni

  • Script to SaveForWeb with different file name

    Can someone direct me to a script that can take the file and SaveForWeb in different versions and append different text to the filename?
    For example, say I've got a file called "myPhoto".  I need a script that saves it as  JPEG called "myPhotoPOWERPOINT" and a GIF called "myPhotoWEB"
    Is this possible?
    Thanks to everyone for your time

    This script will export the activeDocument as a jpg and gif
    function exportSFWJpg( doc, saveFile, qty ) {
         var exportOpts = new ExportOptionsSaveForWeb( );
         // see guide for other options
         exportOpts.format = SaveDocumentType.JPEG
         exportOpts.includeProfile = true;//default false
         exportOpts.quality = qty;
         if ( saveFile.exists ) saveFile.remove( );
         doc.exportDocument( saveFile, ExportType.SAVEFORWEB, exportOpts );
    function exportSFWGif( doc, saveFile, qty ) {
         var exportOpts = new ExportOptionsSaveForWeb( );// default format is gif
         // see guide for other options
         if ( saveFile.exists ) saveFile.remove( );
         doc.exportDocument( saveFile, ExportType.SAVEFORWEB, exportOpts );
    var doc = activeDocument;
    var docPath = decodeURI( doc.path );
    var docName = decodeURI ( doc.name );
    docName = docName.match( /(.*)(\.[^\.]+)/ ) ? docName = docName.match( /(.*)(\.[^\.]+)/ ) : docName = [ docName, docName, undefined ];
    var saveName = docName[ 1 ];
    exportSFWJpg( doc, new File( docPath + '/' + saveName + 'POWERPOINT.jpg' ), 80 );
    exportSFWGif( doc, new File( docPath + '/' + saveName + 'WEB.gif' ) );

Maybe you are looking for

  • Syncing ID3 T

    Hello, I have a question about the functionality of the Mediasource software. I've got a Zen Micro and when I first got it, it put a bunch of MP3's on it. These MP3's didn't all have complete ID3 tags. By now I have edited all the tags, so now they a

  • Duplex Scanning with HP7520 on MAC OS X 10.10

    Is there a way to scan both sides of a document into a single file?  With the prior operating system, this would work if I scanned one side of the document and then fed the second side and used the same document name and checked "Combine into a singl

  • HT3529 iPhone 4s, picture and video messages not sending, how can I fix this?

    Is there anything I can check in my settings to fix this? Or is this a carrier issue and should I contact my provider?

  • JSF in a J2EE 1.3 container

    Has anybody used JSF in J2EE 1.3 certified container?

  • Cancel policy

    I signed up for a  service could not figure out how to use it.  I canceled it the same night.  I was charge and then received an email that it would be canceled a year from now.  I have been trying to find a number to speak to someone but that is a d