Receiver side file name same as Sender side file name

Hi,
  We want to pick a file from one location and put into another location using XI <u><b>with the same name in which the file was lying there in the source directory/folder</b></u>. This we need to do it w/o opening the file and hence we cannot use the variable substitution also.
Any clue????
Thanks in advance
Jayakrishnan

Hi,
There was a similar discussion which went on this topic.
Retain file name
In my opinion, we can easily achieve this using modules. The steps are very simple.
(any file) ->[module #1]-> XML -> Sender CC
The XML produced will have 2 tags say,
<filename></filename><data_base64></data_base64>
where fileame is the name of the file and data is the base64 converted data. Similarly
Receiver CC -> XML -> [module #2] ->  (any file)
During the second step there will be a default step module  called localejbs/CallSapAdapter. Just remove this entry and have only your module entry provided the module #2 must implement all FileOutputStream functions to write the file from the stream, extracting the filename from the xml node. Since you are removing the CallSapAdapter module, the default file which you give in the Receiver CC is not created, instead the filename which comes alone the tag is created. I hope this information helps you.
I am planning to put a blog on this
Best regards,
Felix

Similar Messages

  • File content conversion on Sender Side

    Hi,
    I am doing file content conversion on sender side.when i am executing the scenario,i am getting the following error in sxmb_moni:
    Invalid at the top level of the document. Error processing resource 'file:///D:/Documents and Settings/...............
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Inbound Message --> DOC_HEADER                     ...
    when i right click on the pyaload and select view source
    its displaying the whole flat file with the following line at the beginning:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Inbound Message -->
    i have given all the parameters correctly....
    in sxmb_moni.....the error category is Mapping and the error id id EXCEPTION_DURING_EXECUTE
    Please help me with this error.
    thanks n regards,
    anuradha

    Hi !!
    The best way to debug would be to add TRACE statements in your mappigs. In both Graphical and java Mapping.
    Trace out the entire output of java mapping and see if this is the input that the next mapping expects.
    For trace , http://help.sap.com/saphelp_nw04/helpdata/en/c8/98e7d5c1620642973565ea3dd319d1/content.htm
    refr this links also
    Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Name expected
    unsported character error in message mapping
    Re: HTTP to RFC Mapping error:com.sap.aii.utilxi.misc.api.BaseRuntimeException:
    Exception com.sap.aii.utilxi.misc.api.BaseRuntimeException
    Re: Outbound error
    Re: mapping error
    error in file to file
    have a look at this weblog on how to test your mapping
    /people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios
    Thanks !!!

  • File content conversion at sender side

    Hi,
    I need to convert a flat file to xml at sender side using FCC.
    Input text file:
    Sunil,Chandra,Mumbai,400709
    Sachin,Tendulkar,Delhi,110066
    XML Structure   Occurrence
    >Employees     1..1
      >  > Employee             0..N
        > > > Fname         1..1
          >  > > Lname           1..1
            >> > Address         1..1
              >  > > >City              1..1
                >> > > Zip              1..1
    xml should be like this:
    ><Employees>   
    >><Employee>
    >>><Fname>Sunil</Fname>
    >>><Lname>Chandra<Lname>
    >>><Address>
    >>>><City>Mumbai</City>
    >>>><Pin>400709</Pin>
    >>></Address>
    >></Employee>
    >><Employee>
    >>><Fname>Sachin</Fname>
    >>><Lname>Tendulkar<Lname>
    >>><Address>
    >>>><City>Delhi</City>
    >>>><Pin>110066</Pin>
    >>></Address>
    >></Employee>
    ></Employees>

    FCC does not support this level nesting...Ref
    http://help.sap.com/saphelp_nw70/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
    But requirement can be achieved using extra mapping
    you can create a source structure that looks like
    MT_Source_New..
    >Record ...unbounded
    >line ....1
    and read the input file line by line...this can be achieved by simple FCC...Refer above link
    here you need extra mapping to map it to your required source structure Employees
    MT_new ---Mapping1 --- Employees
    Then map Employees to Actual target structure

  • To create 3 diff files with same content but with diff names in same target

    Hi SapAll.
    i have got a a requirement where pi need to create 3 different files with same content but with different names under same target from a single Idoc.
    its an IDOC to 3 File Inteface.
    can any body help me in providing the differnt solutions for this without use of any script executions.
    will be waiitng for response.
    regards.
    Varma

    > i want to use only one communication channel to produce 3 different file names with same content ,so here i should use only one message mapping in 3 operation mappings .
    This is not possible to produce 3 different file names with single CC. You have to use 3 different CCs. unless you have going to use some other trick e.g some script to rename the file etc..
    As I suggested in my previous reply use Multi-Mapping Or create 3 different Interface Mappings (by using the same MM).
    Note: You have to create 3 different Inbound Message Interfaces (you can use the same Inbound Message Type) otherwise while creating the 3 Interface Determination it won't allow because of same Outbound & Inbound Message Interface. It will simply say Interface alreday exists..
    So, just use the Multi-Mapping which is best solution in my opinion, because the benefit of using multi-mapping are:
    1. You have to create only single Message Mapping
    2. Single Interface Mapping
    3. Single Receiver Determination
    4. Single Interface Determination
    5. 3 Receiver CCs (3 you have to use in any case)
    6. Performance wise it is good (read the blog's last 2 para)
    7. And last but not the least easy to maintain the scenario.

  • To create multiple files with same content but with different names

    Hi SapAll.
    here i have got a tricky situation on Idoc to File Scenario.
    in my interface of an Idoc to file ,there  is requirement to create multiple files with different file names but with same content based on one Idoc Segment.
    which means there will be one Zsegment with two fields in the idoc,where one field with (content refers to the name which file name should start with .so lets say if this segment is repeated for 3 times then PI should create 3 files in the same directory with same content but with different file names (from the filed).
    so here for now iam using one reciever file communication channel.
    can any body give me the quick answer.
    regards.
    Varma

    What do you mean by different names?
    when i make proper setting in the Receiver Channel....on how to create the filename (what to append) like add Timestamp, counter, date, messageid.....even in this case you will ahve file with different names and that too from same File channel.
    You can perform multi-mapping in XI/ PI and then your File channel will place the files in the target folder with relevant names. You cannot use Dynamic Configuration with Multi-Mapping!
    If you intend to use different File channels, then do the configuration as required (normal)...even over here you can follow multi-mapping.
    Do not use a BPM!
    Regards,
    Abhishek.

  • Mergeing files of same structure to one file without BPM

    Hi XI Gurus,
                    I want to merge various xml files having same structures(coming as separate files in source directory) to a one file. I want to do it without using BPM.I need this Final structure as an  input to another scenario to post an idoc.
    e.g -->
    <i>File1</i>:
    <AR_Posting>
         <currency_line_item>1<currency_line_item>
         <tax_line_item>2<tax_line_item>
          <customer_line_item>3<customer_line_item>
    <AR_Posting>
    <i>File 2</i>:
    <AR_Posting>
         <currency_line_item>11<currency_line_item>
         <tax_line_item>22<tax_line_item>
          <customer_line_item>33<customer_line_item>
    <AR_Posting>
    <i>File 3</i> :
    <AR_Posting>
         <currency_line_item>111<currency_line_item>
         <tax_line_item>222<tax_line_item>
          <customer_line_item>333<customer_line_item>
    <AR_Posting>
    Target:
    <Recordset>
          <AR_Posting>
             <currency_line_item>1<currency_line_item>
             <tax_line_item>2<tax_line_item>
             <customer_line_item>3<customer_line_item>
         <AR_Posting>
           <AR_Posting>
               <currency_line_item>11<currency_line_item>
               <tax_line_item>22<tax_line_item>
               <customer_line_item>33<customer_line_item>
          <AR_Posting>
          <AR_Posting>
              <currency_line_item>111<currency_line_item>
              <tax_line_item>222<tax_line_item>
              <customer_line_item>333<customer_line_item>
         <AR_Posting>
    <Recordset>
    Please suggest any solution to achieve this.

    Hi Anurag,,
    I guess what Sumit is aiming for, is that if you don't want to use a BPM you will need a two step solution.
    Step one:
    If the different files have the same structure, read them with a sending file adapter and route the to an receiving file adapter which appends all messages to a new combined file.
    Step two:
    Read the new combined file with a sending file adapter and route the messages to your target interface.
    This approach of-course means that you can not do any correlations as you can in BPM. I.e. you will not "know" when all three files have arrived but just simply read the combined files at certain times and pick-up whatever content it holds.
    rgds Johan

  • How should we get the out put file-name same as in put file-name in file to

    Hi frnds,
    having hundreds of files in the sender system with different names, how should we get the out put file-name  in the receiver system same as the in put file-name in file to file scenario ?
    Thanks in advance.
    truly,
    snrvakiti.

    Hi,
    In Receiver File Adapter you can set under 'Adapter-Specific Message Properties'
    check Use Adapter-Specific Message Properties
    check Fail on Missing Adapter Message Properties
    Check File Name
    Have a look at this link,  [File_to_File|http://allsapnetweavernotes.blogspot.com/2008/09/how-can-i-access-filename-from-fileftp.html]
    Regards,
    P.Rajesh

  • Copying files from same directory as *.java files and moving to WEB-INF/classes/ package name

    In our current application we have the following source directory structure:
              src -
              - com
              - edeploy
              - subdirs ... (many directories here)
              - jsp
              -subdirs ... (many directories here)
              In com.edeploy.subdirs, there exists *.java files, and *.gxq files (query
              files). I would like to modify my build.cmd script to copy the *.gxq files
              into the same directory as the class files.
              Here's my script so far:
              @REM Create list of files to compile
              DIR /S /B /A:-D src\com\*.java >class.list
              @REM Create list of query files
              DIR /S /B /A:-D src\com\*.gxq >query.list
              @REM Compile
              javac -d stage\WEB-INF\classes @class.list
              @REM Copy query files into class directory
              .......... code needed here ......
              Can anyone help me with this?
              Thanks,
              Matt
              

    You may want to check out:
              http://jakarta.apache.org/ant/index.html
              Gary
              "Matt Raible" <[email protected]> wrote in message
              news:[email protected]..
              > In our current application we have the following source directory
              structure:
              >
              > src -
              > - com
              > - edeploy
              > - subdirs ... (many directories here)
              > - jsp
              > -subdirs ... (many directories here)
              >
              >
              > In com.edeploy.subdirs, there exists *.java files, and *.gxq files (query
              > files). I would like to modify my build.cmd script to copy the *.gxq
              files
              > into the same directory as the class files.
              >
              > Here's my script so far:
              >
              > @REM Create list of files to compile
              > DIR /S /B /A:-D src\com\*.java >class.list
              >
              > @REM Create list of query files
              > DIR /S /B /A:-D src\com\*.gxq >query.list
              >
              > @REM Compile
              > javac -d stage\WEB-INF\classes @class.list
              >
              > @REM Copy query files into class directory
              > .......... code needed here ......
              >
              > Can anyone help me with this?
              >
              > Thanks,
              >
              > Matt
              >
              >
              

  • Saved File w/same name: Rescue old one?

    Hello;
    I'm an experienced user, can't believe I did this.
    Saved a DVDSP file in same folder with FCP file. Used same file name. Wrote DVDSP file, lost FCP file. I know data is still there, but now name in directory points to DVDSP file. Any suggestions on recovering?
    Thanks,
    Josh

    Hi John,
    when you save a file with the exact same name it will overwrite the old file. Data are lost and cannot be recovered.

  • Change the format of the name of the sender in UWL

    Hi Experts ,
    In my UWL the column "FROM" , display  the  name of the sender as " Last name, First name" . My requirement is to display  the name as "Firstname, Last name " .
    eg: In my uwl now it display  like "Jobs, Steve" . But my requirement is to display  it like "Steve, Jobs".
    Can you suggest any solution for this requirement ?
    Regards,
    Sumana

    >Our client is requested for this naming format Firstname , Lastname .
    Did they tell why?
    I don't know any other way than creating a new custom columns & attributes into UWL and then populating them from the webflow/workflow container. Then you of course need to populate the workflow container too properly. I personally see this as something that I would avoid to do at all costs. Also remember that the "sender" task will not perhaps work properly even in its current form in the future or in some other workflow. If the work item is create by workflow system user WF-BATCH, the sender column will show this user instead of the "real sender". This is highly likely scenario.
    Of course there might be some easier way to do this from the UWL/portal side. But I guess the standard way is the one that Armando described.
    Regards,
    Karri

  • Java send WAV file thorugh modem to phone

    I am currently using Java communication API to configure a modem to send a WAV file to a phone. Once the user answer the phone, he/she will hear the WAV file.
    I am using AT command. I got the "CONNECT" from the modem. I am ready to send the WAV file. But how to format the file ?
    I directly send the file by write(), but I cannot hear the voice ...
    How to do ?
    Thanks !

    Hi everybody,
    I am also working on modems and trying to send wav files to phone over modem. As far as I know, the code should be something like :
    send("AT#CLS=8");     expect("OK"); //voice initialize
    send("AT#VLS=0"); expect("VCON"); //use phone line
    send("at#vsm=128,8000"); expect("OK"); // I think this command about sound file format
    send("AT#VTX");     expect("CONNECT"); //voice transmit
    /* send a small music file here */
    expect(" VCON");
    And most of sites that I searched says that the music file must have those properties: "PCM 8000Hz Mono 128kbps" ... Eventhough I have been tried on this task for many months, I have not succeeded in, yet :(
    If you have any idea about solution and if you can help, this will really be helpful :) Thanks!

  • Flat file name from Sender Side Dynamically into subject of Receiver Mail

    Hi All,
             I am Using a file to Mail Scenario, My requirement is to get dynamically the file name from flat file of the Sender Side into Subject of Receiver Mail Adapter and attachment of file from the Sender Side. Can anyone help me out.
    Thanks in Advance

    Hi....
              You can write udf in the message mapping to get the Dynamic file name and map that to the subject of the receiver mail.
      DynamicConfiguration conf = (DynamicConfiguration) param.get(
              StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey KEY_FILENAME = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
          // read value
          String Filename = conf.get(KEY_FILENAME);
    Regards,
    Leela

  • Same file name using JMS adapter on sender side.

    Hi Friends,
    I got a requirement to capture file name using JMS adapter on the sender side.
    Can some one help me in resolving this issue.
    Regards,
    Jeevan.

    Hi ,
    You can use Dynamic Configuration in mapping.
    Create a UDF with input as file name and copy/paste this code
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    //conf.removeAll();
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    //String filename= conf.get(key);
    conf.put(key, fileName);
    key= null;
    return fileName;
    Thanks.

  • Received File send with file name to destination side

    Hi All,
    Here I have used FILE adapter in Receive location and WCF-BasicHttp adapter in send ports.
    Requirment is should be able to send the file name also along
    with the file to destination from BizTalk.
    No orchestrations in this project. DynamicSendPassThru sendport. Please find the below screenshot for send port properties.
    How can i fix this please assist me on this.
    Thanks & Regards,
    Vasu

     Hi Osman,
    below code is custom pipeline code. and what code and where can i add the code.
    regarding send the file with file name from BizTalk to OutBound transport location.
    Please assist me on this.I'm not aware coding part. 
    publicMicrosoft.BizTalk.Message.Interop.IBaseMessageExecute(Microsoft.BizTalk.Component.Interop.IPipelineContextpc,
    Microsoft.BizTalk.Message.Interop.IBaseMessageinmsg)
                System.Diagnostics.
    Debug.WriteLine("Inside
    SendFileRenameWithDate Pipeline",
    "SLNG.BizTalk");
    IBaseMessageContextmessageContext = inmsg.Context;
    // if the transport type is file for outbound, then change the add in the date in the file name.
    stringadapterType = (string)inmsg.Context.Read("OutboundTransportType",
    "http://schemas.microsoft.com/BizTalk/2003/system-properties");
    // The file name in the file adapter must contain '%SourceFileName%', e.g. CB_%SourceFileName%.xml
    if(adapterType ==
    "FILE")
    // Retreive the file name from the message context
    //object obj = messageContext.Read("FileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties");
    //string customSendFileName = obj.ToString();
    //System.Diagnostics.Debug.WriteLine("FileName:" + customSendFileName, "SLNG.BizTalk");
    // Append with date in ddMMyyyy_HHmmss format
    stringcustomSendFileName =
    if(string.IsNullOrEmpty(DateFormat))
                        customSendFileName =
    DateTime.Now.ToString("yyyyMMdd_HHmmss");
    else
                        customSendFileName =
    DateTime.Now.ToString(DateFormat);
                    System.Diagnostics.
    Debug.WriteLine("FileName:"+
    customSendFileName, "SLNG.BizTalk");
    // Write back with new file name to the message context
                    messageContext.Write(
    "ReceivedFileName",
    "http://schemas.microsoft.com/BizTalk/2003/file-properties",
    customSendFileName);
    //if (messageContext.IsPromoted("ReceivedFileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties")
    == false)
    //    messageContext.Promote("ReceivedFileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties",
    customSendFileName);
    //messageContext.Write("FileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties", customSendFileName);
                System.Diagnostics.
    Debug.WriteLine("Going
    off SendFileRenameWithDate Pipeline",
    "SLNG.BizTalk");
    returninmsg;
            #endregion
    Thanks & Regards,
    Vasu

  • Pick a particular file and keep on target side with the same file name

    Hi Guys,
    I have got couple of files in a folder. I need to pick only two files, I have setup BPM procedure 2 payloads merge. To keep these merged file with  the same source filename.
    Source side file Directory
    abc_12345_20100408101029.xml (abc_seq number_timestamp.xml)
    xxx12345.xml
    test.xml
    abc_12345_20100408101149.xml
    Target Side, How do I keep with the same file name?
    abc_12345_20100408111239.xml ---  same file name with diffrent timestamp.
    One more question: How to setup a file adapter to trigger between 2:00am to 5:00 am? in a particular time
    Does anybody has got quick idea, any links etc.,
    Your quick and positive response will be much appreciates.
    Kind Regards
    San

    Hi,
    One more question: How to setup a file adapter to trigger between 2:00am to 5:00 am? in a particular time
    For this you can Availability time planning (i.e you can schedule the file adapter to poll for the files with in the time interval i.e 2 -5)...
    for generating the file name at target side you need to look for the Dynamic Configuration as you need to change the timestamp for the file..and i am not sure how this works in BPM..
    in normal scenarios dynamic configuration will help....
    HTH
    Rajesh

Maybe you are looking for