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

Similar Messages

  • How to send orignal file name to destination

    Hi All,
               How do we send orignal file name to destination in receiver file adapter?
    Xier

    Hey,
    In the below URL - find the parameters against sender comm.channel and receiver comm.channel
    http://sapient.xi.googlepages.com/xi-excellentintegration
    You will find in <b>Adapter Specific Message Attributes</b> - Sender channel & Receiver channel -2 in my above URL.
    If its not clear, then let me know.
    Best regards,
    raj.

  • 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

  • Receiver file name with counter

    While working on proxy to file scenario. I have to maintain receiver file name as ddmmyyyyxxx_nnn.xml,where xxx is constant and nnn is a counter which is suppose to be reset everyday.Anybody can help me on how to achive this...?

    Hello Amit,
    Yes. You can achieve this but only using File - NFS Protocol.
    A new file is created for each document. The file name is extended with a counter, which is inserted before the file name extension (for example, default002.file). This selection is only available for the File System (NFS) transport protocol.
    Make specifications for Counter Definition:
    Prefix
    Specify one or more characters that you want to add before the counter in the file name.
    Format
    Specify the first counter to be used. It must be a valid integer number. Leading zeros are permitted.
    Step
    Specify the counter increment.
    Mode
    Specify when the counter is to be added.
    After First File
    The counter is added when the file name is used unaltered for the first time.
    Thanks
    Pothana

  • Dynamic Receiver file name in AS2 adapter

    Hi Experts,
    How to get dynamic receiver file name in AS2 adapter. We need receiver file name same as of sender file name.
    We tried selecting dynamic attributes file name but we are getting followin error in CC.
    Message processing failed. Cause: javax.resource.ResourceException: Fatal exception: com.seeburger.xi.connector.queue.TaskBuildException: Mandatory attribute dtAS2FileName is not present in XI message., Mandatory attribute dtAS2FileName is not present in XI message.
    Thanks,
    Hari

    hi hari,
    You can't do it manually. As both adapter are in different context.
    You can go with UDF to slove ur problem.
    Just extract the input file name using Dynamic configuration
    Store that in some variable.
    Use same name in the dynamic file name in AS2 receiver. Below code might be useful.
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create( "http://seeburger.com/xi/common/dtAS2FileName", "DYNFILENAME");
    conf.put(key,strfilename);
    Thanks
    Jai
    Edited by: Jaideep Baid on Apr 9, 2010 9:16 AM

  • Setting up the File Name of email Attachment from Received File Name

    Hello All,
    I have to send the Received File in attachment to an Email if there is any exception. Here I can attach the file, but I cannot set the file name of attachment as the Received File Name. Is there anyway of doing this without using custom pipeline component.
    Here I am using the Orchestration and SMTP Adapter.Any help is greatly appreciated.
    Thanks

    It might work if you use a custom pipeline component on your send port and in the Execute method populate the MIME.FileName property of the body part.
    Something like:
    public IBaseMessage Execute(IPipelineContext pc, IBaseMessage inmsg)
    string filename = inmsg.Context.Read("ReceivedFileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties");
    inmsg.BodyPart.PartProperties.Write( "FileName", "http://schemas.microsoft.com/BizTalk/2003/mime-properties", "filename);
    return inmsg;
    You can take reference from similar post here
    SMTP - Setting attachment filename
    Anther good article with MIME is here
    Setting attachment filename with the SMTP Adapter
    For MIME case your SMTP message construct statement would be like below
    multipartMessage.MessagePart_1= InMSG;
    multipartMessage.MessagePart_2="This is message part2 as a string";
    multipartMessage(SMTP.Subject) ="Email From Dynamic Port";
    multipartMessage(SMTP.From) ="[email protected]";
    multipartMessage(SMTP.SMTPHost) ="yoursmypserver.com";
    multipartMessage.MessagePart_2(MIME.FileName) = "Attachment_Name";
    multipartMessage(SMTP.SMTPAuthenticate) =0;
    Thanks
    Abhishek

  • Receiver File Name assign dynamically

    Hi friends,
              In our scenario, receiver file name is assigned to dynamically. Example Inventory_Current date. Inventory is static, but CurrentDate is changed on runtime.
    I was tried to Variable substitution method and UDF method. In this type dynamic value is mapped to target structure, so Receiver payload shows the dynamic value in output file. But we don't need that dynamic value. So, in variable substitution method and UDF method is not achived to my requirement.    
           Please any one help me how to change file name at runtime (receiver communication channel). If using any module program pls forward to me.
    Thanks & Regards
    Vijay

    Hi,
    if we want to get the Output file name as One of the Field value from Payload and Current dase with it means,
    1) Write one UDF & map Like this
          Name(giri)-----UDFCurrent Date----MT_Target
    2) Check the ASMA Option in Receiver Adapter Aloneu2026..
    3)No need to check the ASMA Option in the Sender side
    UDF Code:
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
    String Outputfile = conf.put(key,a);
    return Outputfile;
    Regards
    Seshagiri

  • How to give field name to Receiver File Name.

    Hi ,
    In my source target structure there is a field name
    "job id" .
    I need that value coming in that field name to be given to
    Receiver File Name.
    Thanks in Advance

    Hi,
    You could use the field name to the File Name. For that you could go ahead with variable substituiton in receiver communication channel.
    In receiver Communication channel use variable substitution as
    In file name -- %Var1%
    In Variable substitution parameter give Var1 ---> payload:<field Name>
    Refer
    SAP Network Blog: An interesting usage of Variable Substitution in XI
    /people/sameer.shadab/blog/2005/09/23/an-interesting-usage-of-variable-substitution-in-xi
    variable substitution
    http://help.sap.com/saphelp_nw2004s/helpdata/en/8e/464442c1a1c253e10000000a1550b0/content.htm
    Also see the below links to use the dynamic variable substitution
    /people/michal.krawczyk2/blog/2005/03/29/xi-error--unable-to-convert-the-sender-service-to-an-ale-logical-system
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    Also
    /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i - Dynamic File Name Part 1
    /people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii - Dynamic File Name Part 2
    Thanks
    swarup

  • Receiver File Name Writting

    Hi All,
    I want to write the receiver file name like test20091216.txt
    I tried with Add Timestamp, but it is adding with time also which i dont require.
    Here i want to say is iam not using any mapping to use Dynamic file name concept.
    Please suggest me on this.
    REgards

    >
    Vamsi Krishna wrote:
    > Sarvesh,
    >
    > iam not sure about the target FTP Server OS.
    >
    > i have one thought here, the process is as follows....
    >
    > ECC will generate a text file to XI Shared path, XI will pick up and deliver it to target FTP server path.
    >
    > Now this is doing with out any mapping, we can't do Dynamic Config. t=in this case.
    >
    > So my thought is i can ask ECC while writing the file with file name followed by date. EX: test20091216.txt
    >
    > so that in XI,  can i just use the sender file name to receiver file name???
    >
    > REgards
    Yes, if ECC can do this then problem solved. Just use ASMA setting in both sender and receiver adapter to write the same file name at receiver side.
    There is ablog written by Michal, just search it..

  • Change in time stamp format in receiver file name

    Hi,
    We have a scenario as AS2 - PI - FTP Server (AS/400). We want target file name as BMMDDHHSS where B is constant and
    MM (month e.g., 01), DD (day e.g., 12), HH (hour e.g.,11), SS (seconds e.g., 12). Is there standard way of doing this, just by changing some configuration in receiver file adpter?
    Please let me know, how could we do this using PI. If script is optional, keeping as back-up only.
    How come, naming dynamic receiver file names are so difficult in PI. I have been trying to get the answers for our another requirement like to name receiver file as C1.YYMMDD.C2 in a file pass through scenario for more than a month.
    It is just file through scenarios, so we can't use variable substitution as we are not going to read content/payload of file
    Thanks in advance,
    - Riya Patil

    Hi Shabarish 
    Thanks for your reply. I have trying to make this UDF work since almost a month with no luck. Can you please check where am I doing wrong?
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String SourceFileName = "C1." + a + ".C2";
    conf.put(key, SourceFileName);
    return " ";
    In the above code, I am passing date as "a". And mapping CurrentDate (formatted) --> UDF --> Target root node.
    I am getting the following error in SXMB_MONI:
    <SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
      <SAP:P1>com/sap/xi/tf/_MM_Lockbox_Filename_</SAP:P1>
      <SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>
      <SAP:P3>Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:P3>
    <SAP:Stack>com.sap.aii.utilxi.misc.api.BaseRuntimeException thrown during application mapping com/sap/xi/tf/_MM_Lockbox_Filename_: Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:Stack>
    Your help would be much appreciated.
    Thanks,
    Riya Patil

  • Received File Name in Map

    How to get the Received File Name(using FILE.ReceivedFileName property)  in BizTalk Map. Kindly provide with suggestions.
    Regards, Vivin.

    try this
    http://blogit.create.pt/blogs/tiagooliveira/archive/2009/02/02/Using-xpath-function-in-orchestrations.aspx
    xpath(msgOut,"string(xpathquery)")=msgIn(FILE.ReceivedFileName)
    You can't promote that field which occurs multiple times so in that case we use xpath()
    Regards

  • How to set file name and destination folder without user interaction

    how can I set the file name and destination folder to generate a pdf file like "c:\myfolder\document.pdf" in this folder automatically.
    Is there a tag in .joboptions ?
    Goal: User click print button. In the background a pdf will be generated in e.g. "C:\myfolder\document.pdf".
    that`s it.
    I know that the query dialog for save as can be turned off. But the file name depends on the application.
    Thanks for your help.
    TK

    Hello,
    Please post this  in  PI forums
    Regards, Anil

  • Getting Receive File Name and status of application from Biztalk database.

    Hello all,
    I want to retrieve Receive file name and status of application (started, partially started) in a stored procedure
    querying Biztalk databases.
    Please share if anybody have an Idea.
    Thanks

    Hi Nilesh,
    Status of BizTalk application can be obtained using ExplorerOM API provided by product. It's Application class has a Status property that returns one of Not Applicable, Started, Stopped, Partially Started.
    using Microsoft.BizTalk.ExplorerOM;
    private string GetApplicationStatus(string applicationName)
    BtsCatalogExplorer catalog = new BtsCatalogExplorer();
    string status = "";
    try
    //connection string to BizTalk management database
    catalog.ConnectionString = "SERVER=.;DATABASE=BizTalkMgmtDb;Integrated Security=SSPI";
    Microsoft.BizTalk.ExplorerOM.Application app = catalog.Applications[applicationName];
    if (app == null)
    throw new Exception(String.Format("Application '{0}' cannot be found.", applicationName));
    status = app.Status.ToString();
    catch (Exception ex)
    //Handle exception
    System.Diagnostics.EventLog.WriteEntry("MyMonitoryingApp", "Exception call stack: " + ex.ToString());
    finally
    if (catalog != null) { catalog.Dispose(); }
    return status;
    UPDATE: Found the thread from where I got this code. Thanks to Ashwin for providing it.
    Refer:
    Reg Stored Procedures for BizTalk Application Status in BizTalk Admin Console
    Rachit
    Please mark as answer or vote as helpful if my reply does

  • Since last weekend (3-15-15) I have been unable to send/receive text messages with a friend who has Sprint service. The messages send with no errors on either side, but neither side is receiving the messages. Is anyone else having any similar issues?

    Since last weekend (3-15-15) I have been unable to send/receive text messages with a friend who has Sprint service. The messages send with no errors on either side, but neither side is receiving the messages. It seems to be only this one person affected by this issue, everyone else that I've tried sending messages to has responded with no trouble. Is anyone else having any similar issues?

    Retrohacker, Your text messages are too important to be missed! Let's figure this out, together. Are you able to successfully make and receive calls from your friend? Which phone do you have with us? Any new messaging applications or changes that you can recall on the phone since this issue began? Please share details so we can get to the bottom of this for you.  TanishaS1_VZW Follow us on Twitter @VZWSupport  If my response answered your question please click the "Correct Answer" button under my response. This ensures others can benefit from our conversation. Thanks in advance for your help with this!!

  • Same Sender and Receiver File Name. Pls advice urgent

    Hi All,
    My sender file name is auto generated number so
    it is dynamic in nature.
    ex. "abc1.txt"
         "abc2.txt"
    Now In my Sender File Adapter I cannot give
    File Name hard coded as my sender file name is auto generated number.
    Also I want same file name received at receving end.
    File Sender --   "abc1.txt"
    File Receiver -- "abc1.txt"
    File Sender --   "abc2.txt"
    File Receiver -- "abc2.txt"
    Pls advice.
    Regards

    Hi Rider,
    All your sender files have .txt extension but the name is not constant(dynamic in nature).Than in this case to pick ur file u can use the *.txt as ur sender file name.Than all the files with .txt extension in the source folder specified would be picked.
    Than u can proceed in the same way given in this blog
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    Please let me know if u need any information
    Thanks,
    Bhargav
    Note:Award points if found useful

Maybe you are looking for

  • Can't get past white start up screen

    Last night my computer crashed, and displayed a blank white screen, so I held in the power on button to restart and after that I have been unable to get past the blank white screen after the apple logo appears. 10 minutes ago however after having the

  • Is it best to import images as .psd files or .tif or another format?

    Hi, when working in the default 1080i is it best to import .psd files or go through the trouble of rendering the .psds to .tifs in Photoshop, to then import the .tifs?? It seems HDTV 1080p .psds have a different aspect ratio -- and, the black backgro

  • Need to setup Trading Partner specific CorrelationID

    Hi Gurus, I have a requirement in Oracle 1g to setup correlation IDs based on the Trading Partner-Document Type combination. We use the generic ftp communication protocol. Is this possible. If yes, how? Any help would be highly appreciated. Thanks, S

  • Changes in Assignmentand costing details

    Hi all, Heartly appreciate for any reply on following... I need to write a query for a Payroll Audit report which will capture the details of all the changes in assignment, costing, element entries for employee along with the person who changed it, a

  • Swings-JEditorPane-email link

    i am having an e-mail link in html file which i am getting from the system and displaying in JEditorPane. The problem is, on clicking the link it is not opening the outlook express new mail box though it is opening it when run independent of JEditorP