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

Similar Messages

  • Accessing the sender file name in the response email

    Hi,
    I have an asynchronous proxy scenario wherein I am calling an outbound proxy within an inbound proxy.
    Basically a file is sent from an external partner and response is sent back to them if there are any errors. Also email notification will be sent and that email should include the sender file name so that they can know which file is erroneous and can resend that file after making changes. Any help will be appreciated.
    Many Thanks.

    Hi,
    Have a look just two threads below yours !!
    File recr Adapter : How to set target directory based on sender interface ?
    See "Adapter-Specific Message Attributes" for a Sender File Adapter
    http://help.sap.com/saphelp_nw70/helpdata/EN/e3/94007075cae04f930cc4c034e411e1/content.htm
    I suppose your flow is:
    1. File -> PI -> proxy_req     (request)
    2. proxy_resp -> PI -> Mail   (response)
    Thanks to "Adapter-Specific Message Attributes" ofr a Sender File Adapter, you will be able to store filename in DynamicConfiguration and then you will able to use a UdF to catch the source file and provide it somewhere in your proxy_req.
    After for the returned flow "2. proxy_resp -> PI -> Mail   (response)", your proxy_resp has to returned to PI the filename providen with the 1st step.
    And then, In PI you will be able to send by email the source filename.
    Regards.
    Mickael

  • How to Get the Source File Path in the Receiver Side

    Hi Experts,
    Here We are Trying to Do How to Get the Sender Information ( File Name & Path ) on the Receiver Side .
    According to the Michal Blog
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    Here we Are Able to Get only the File Name.
    But If I Want to get the Total File  Path Also means What Should I Do Here ????
    Please Let Me Know
    Regards
    Khanna

    Khanna,
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey fkey = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    DynamicConfigurationKey dkey = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory");
    String fname = conf.get(fkey);
    Sring path = conf.get(dkey);
    String final=fname""path;
    return ""final"";
    Best regards,
    raj.

  • File name in the Receiver Adapter

    Hi,
    I need to create a file with the name as ZZZCCYYMMDDHHMMSS.txt
    where ZZZ is the constant
    CCYYMM is the date of file creation
    DDHHMMSS is the time of file creation.
    There MUST NOT be any spaces in the file name
    Eg ZZZ20110314152530.txt
    I am using the Receiver File Adapter with Cntent Conversion. I tried using Add Time stamp option. But that does not sattisfy the required Naming conventions for file name.
    Any help would be appreciated.
    Regards
    Harry

    Hi Harish,
    Your requirement is to generate a dynamic file name @ target side right??
    If so best option is go for  UDF. (I hope you heard about UDF already)
    There is something called ASMA... (check it out)
    Have a look @ following. So that you can get some Idea about ASMA
    In Google Type : dynamic file name in Pi
    Select 1st link- sap technical
    After this try to write own UDF to get desired file name @ target side..
    Thanks,
    Saravanan

  • 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

  • Dynamic file name of the attachment in sender mail adapter

    Hi
    I have configured a sender mail adapter which receives some attachments.
    Right now the file name of the attachment is hardcoded to "MailAttachment-1" "MailAttachment-2" using the content-description from "AF_Modules/PayloadSwapBean" module.
    I want to set it to dynamic ie. instead of "MailAttachment-1"... i want it with real name of the attach.
    please suggest a solution w/o the need to develop a custom adapter module.
    Thanks!
    Regards,
    Mariano.

    Thanks Prateek,
    Now, i can see that the name of the original file is into the content type named as  text/xml; name"name of the file.xml" when i send the email from outlook.
    If i send it from hotmail, this is not happend.
    Do you know why happend this?
    If i always would have the original name inside the content type, my problem will be solved.
    Edited by: Mariano Vidal on Feb 13, 2009 2:26 PM

  • 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

  • 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

  • Dynamic file name of the attachment in receiver mail adapter

    Hi
    I have configured a receiver mail adapter which receives the payload as an xml attachment.
    Right now the file name of the attachment is hardcoded to "invoice.xml".
    I want to set it to dynamic ie. instead of "invoice.xml"... i want it as "invoice<invoicenumber>.xml".
    Invoice number is present in the payload.
    please suggest a solution w/o the need to develop a custom adapter module.
    Thanks!
    Regards,
    Faria Mithani

    Hi,
    Go through this thread..
    Dynamic  File Name for Receiver File Adapter
    Regards,
    Sarvesh

  • Retrieving the file name in the adapter module in the sender file adapter

    hi,
    i need to retrieve the file name, in the adapter module. This module is placed in the sender file channel.
    After the file adapter has picked up the file from the file directory, the file is placed in the archived directory.Custom adapter mofule is place in the file shanel. i need to retrieve the file name of the file in the adapter module. Is it possible to retrieve the file name?
    Also is it possible to retrieve the archive directory path in module?
    Regards,
    Meenkashi

    Hi Meenakshi,
    I guess you are looking for this
    /people/daniel.graversen/blog/2006/10/05/dynamic-configuration-in-adapter-modules
    Regards
    Suraj

  • Adding file name in the sender Adaptor

    Hi ,
    I am facing some problem in adding file name .
    The scenario is like this :
    The file needs to be send from on system  and needs to be Archived . Once processed, the archived file should be prefixed with ARCH_ so that it is not picked up again .And the other thing given is the file name used will be of the format XXX_YYY_nnnnnnnnnn.DAT where nnnnnnnnnn is the date stamp .
    Please help it's urgent ......
    Thanks and regards
    Anita

    Hi,
    if you can have XML achvived files you can use
    standard
    processing mode: Archive
    with one swich you can set the timestamp mode
    yyyMMdd-hhMMss-SSS_.
    ref
    http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm
    Regards,
    michal

  • File Name in the Send Port with PGP Encryption

    Hello,
    The File Name in the Send Port should be set with the mask like ABC.txt.pgp. Since I have used the PGP Encryption Component it is generating the File name like ABC.pgp.txt.pgp. But what I need is just the ABC.txt.pgp. How can be this be done. Any help is
    greatly appreciated.
    Thanks

    What you are seeing is the expected behavior.  If you are referring to this:
    https://code.msdn.microsoft.com/windowsdesktop/BizTalk-Sample-PGP-ebcbc8b2
    or one of it's derivatives, it will internally modify FILE.ReceivedFileName to append .pgp if that property is set.
    So, if you use just %SourceFileName%, you will likely get the desired result.  Otherwise, you will have to explicitly set FILE.ReceivedFileName to ABC.txt somewhere before the PGP component.
    You can also modify the source code to remove this behavior.

  • How to not append '.PART' to the file name of the currently downloading file, and just download the file with its normal filename

    In Windows, when Firefox (I'm currently using 7.0) downloads a file, it appends ''.PART'' to the file name of the currently downloading file and just renames it to its original file name after it finishes downloading.
    I sometimes like to watch a currently downloading video file, so it will be better if Firefox just downloads the file to its actual filename (like what Opera does), so I can easily double click the incompletely downloaded file and watch it with the video player assigned to that file extension, rather than the awkward ''Right click -> Open With -> Choose Default Program'' route with .part files.
    Does anyone know how to set Firefox to do this?

    It is possible that your anti-virus software is corrupting the downloaded files or otherwise interfering with downloading files by Firefox and prevents Firefox from renaming the .part file.
    Try to disable the real-time (live) scanning of files in your anti-virus software temporarily to see if that makes downloading work.
    See "Disable virus scanning in Firefox preferences - Windows"
    * http://kb.mozillazine.org/Unable_to_save_or_download_files

  • When I send a mail from my iPhone, it displays the mail server name to the receiver if the mail and does nog display my name or e mail address. This only since upgrading my iPhone5 to iOS7

    When I send a mail from my iPhone, it displays the mail server name to the receiver if the mail and does not display my name or e mail address. This only since upgrading my iPhone5 to iOS7. I've checked all settings etc. anyone have a solution please?

    Rectory wrote:
    Please can someone tell me how  I can change this so when I send a mail from my phone and from the IPad that it reads from me.
    You need a separate email address but you've already ruled out that solution.

  • Missing file name in the sequence

    Hi All,
    I have struck with the problem which is finding the missing file name in the file_name column. This column also have sequence.
    FAX_NAME RECEIVED SENDER FAX_SIZE
    fax000000433.tif 01-JAN-07 redro 10k
    fax000000434.tif 01-JAN-07 redro 10k
    fax000000435.tif 01-JAN-07 redro 10k
    fax000000436.tif 01-JAN-07 redro 10k
    fax000000437.tif 01-JAN-07 redro 10k
                                  One file name missing
    fax000000439.tif 01-JAN-07 redro 10k
    fax000000440.tif 02-JAN-07 redro 10k
    fax000000441.tif 02-JAN-07 redro 10k
    fax000000442.tif 02-JAN-07 redro 10k
    fax000000443.tif 02-JAN-07 redro 10k
    fax000000444.tif 02-JAN-07 redro 10k
    fax000000445.tif 02-JAN-07 redro 10k
    fax000000446.tif 02-JAN-07 redro 10k
    fax000000447.tif 02-JAN-07 redro 10k
    fax000000448.tif 02-JAN-07 redro 10k
    fax000000449.tif 02-JAN-07 redro 10k
    fax000000450.tif 02-JAN-07 redro 10k
    Here i want to retrive the Faxname(fax000000438) which is missing
    The output like..
    I've Designed one BIRT rptdesign for this this in the bellow formate..
    FAX_NAME RECEIVED SENDER FAX_SIZE     Missing_Faxes
    I've tried with bellow query but i did't get.
    select Fax_Name digits from(select min(digits) MN from (select translate(s, '0' || translate(s, '1234567890', ' '), '0') digits 7 from (select filename s from received_faxes))) connect by level8 minus select distinct digits from (select translate(s, '0' || translate(s, '1234567890', ' '), '0') digits 10 from (select filename s from received_faxes))
    Could you pls help me..

    This?
    SQL> with t1 as
      2  (select 'fax000000433.tif' nam from dual union
      3  select 'fax000000434.tif' from dual union
      4  select 'fax000000435.tif' from dual union
      5  select 'fax000000436.tif' from dual union
      6  select 'fax000000437.tif' from dual union
      7  select 'fax000000439.tif' from dual union
      8  select 'fax000000440.tif' from dual union
      9  select 'fax000000441.tif' from dual),
    10  t2 as
    11  (select to_number(mid(nam,4,9)) faxno from t1),
    12  t3 as
    13  (select max(faxno) ma, min(faxno) mi from t2)
    14  select (mi+level - 1) faxno from t3 connect by level <= ma - mi + 1
    15  minus
    16  select faxno from t2
    17  ;
         FAXNO
           438
    SQL>

Maybe you are looking for

  • HP Officejet 4630 e-all-in-one - Quick Forms

    Is there a way to disable the Quick Forms on a HP Officejet 4630 e-all-in-one ?

  • Flash CS5 wont open after working for years? Entry point Not Found

    Hi Guys, I am having a problem opening my Flash CS5 after it working fine since I installed it forever ago. I do not know what could have caused this, and my other cs5 programs are opening fine. Dreamweaver and Fireworks didnt change all (these 3; al

  • What does registering FCP with Apple do?

    If I am selling an old, unused copy of FCP with a unique serial number, how do I license it to my friend if I have already registered it with Apple? Will that make a difference? The License agreement says I can transfer ALL rights to a new person, pr

  • Can't scroll down in itunes

    the bit where there's meant to be a scroll bar that you drag to scroll up and down is like it's cut off..title explains it all basically. can't scroll in music library, sync windows, store.

  • Zen V Plus pau

    Just purchased? the above. st MP3. I am an OTR truck driver, and listen to audio books. I was tired of checking out CD's from my library. Poor selection, and damaged CD's. Found out about Netlibrary/Recorded Books, where you can download for free. I