Setting dynamic file name in Receiver file adapter - not from payload

Guys I just remember reading a weblog but can't find it now that I need it, on how to set the file name in message mapping dynamically but not using any payload field.
Please let me know if you remember this.
Thanks a lot,
Viktor Varga

also u can check in
<a href="/people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii file name(XSLT Mapping with Java Enhancement) using XI 3.0 SP12 Part -II</a>
<a href="/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14: The same filename from a sender to a receiver file adapter - SP14</a>

Similar Messages

  • Error dynamic File Name in Receiver File Adapter

    Hi all,
    Dynamic file name for Receiver file Adapter Problem
    my multi mapping look like this in design mode
    messages
         message1
              SD01_E
                   FileName
                   row
         message2
              SD02_E
                   FileName
                   row
    by processing the xml look like this:
    <ns2:SD01_E xmlns:ns2="urn:lsv.de/SAP/XXX">
    <FileName>L40SA939.xiConstant</FileName>
    - <row>
    or
    <ns2:SD02_E xmlns:ns2="urn:lsv.de/SAP/XXX">
    <FileName>L40SA939.xiConstant</FileName>
    - <row>
    in file receivere adapter  i have try this but it dos not work
    payload:SD01_E,1,FileName,1
    Error:com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 0(:main:, row:1, col:0)
    is there any way to have access to Filename  in different root elements??
    regards
    Ralf

    Hi Ralf,
    i think, you need for each XML msg (each different root element) a new adapter -> a new IF determination, new rec agreement and a new channel.
    Regards,
    Udo

  • Dynamic  File Name for Receiver File Adapter

    Hi All,
    How can we use dynamic name for Receiver file adapter?
    Can anyone help.
    Thanks in Advance
    Chemmanz

    Hi Chemmanz,
    The dynamic filename generation concept is as follows.
    In your filename field. just give a variable with % symbols. (eg: %file% ).
    Now, under the option Variable Name Substitution, you can give how the value has to be created.
    It can be your interface name, sender service name, etc or it can be some value dynamically from your payload.
    For the former, your give
    message:interface_name ,etc
    and for the payload part you give,
    Payload: "your element root which u wanna acecss"
    Just check this link out,
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    And read the contents under variable substitution and it will help you understand the concepts better.
    If you have any clarifications, do get back,
    Regards,
    Bhavesh

  • Payload as File name at Receiver File Adapter

    Hi All,
    I have a requirement for a PROXY to File Scenario where Receiver files has to be named dynamically with a value from the Payload that I get. Also the particular field that has the file name should be unmapped with the Receiver.
    For Example,
       <row>
          <Name>Alex</Name>
          <DOB>27062014</DOB>
          <City>Delhi</City>
       </row>
    If this is the Payload I get, I want the Receiver file name to be "27062014.txt". At the same time this particular field should not be mapped at the Receiver end.
    I have tried a few links which confuse me further.Kindly help me,
    Thanks in advance,
    Sree Ram

    Hi Sree,
    Please check if the case is correct. refer the below discussion
    Problem in variable substitution
    reference blog for variable substitution
    Variable Substitution for Directory or File name.
    regards,
    Harish

  • How to give a dynamic File Name for Receiver File/FTP Adapter.

    Hi Experts,
        I have one scenario in which we are creating a flat file of IDOC which is coming from R/3 & sending it to FTP location. For this we have configured Receiver FTP adapter with File Name Scheme as "NT.out"  & in File Consturction mode i have given as "Add Time Stamp".
        therfore while creating a file it is creating as NTyyyyMMdd-HHmmss-SSS.out
    where as my requirement is only to to add Time & not the Date. (NThhmmss.out)
        How to do this ?
        for your info we are using ABAP Mapping.
        Pl help me
    Regards,
    Umesh

    Hi Umesh,
          Add one more field to your target structure for your file name and populate that field as per your requirement like NTyyyyMMdd.out. In receiver communication channel use Variable subtiution option and give the refrence of Payload and file construction mode set as create.
    And refer the below weblogs for Variable Subtiutuion File Name Scheme
    /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
    Hope this way would be solve u r problem.
    Cheers
    Veera
    >>>Reward points, if it is needful

  • Dynamic File name in Receiver File adapter

    Hi,
    My Scenario is Proxy to File.
    I must create filename dynamically in the receiver file adapter by taking the sales order number and divison from the source.
    How can i create a dynamic filename? i searched the forum, but i could not get the correct answer,
    Please help me out.
    Regards
    Srinivas

    Hi Srinivas,
    > My Scenario is Proxy to File.
    > I must create filename dynamically in the receiver file adapter by taking the sales order number and divison from the source.
    public String targetFileName(String Sono, String Div, Container container) throws StreamTransformationException
    DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String MyFileName = sono + div + "<filename>"+".xml";
    conf.put(key, MyFileName);
    return MyFileName;
    File name you can format according to your requirement.
    And one more thing for this you have to specify the ASMA properties. For this check the below link step-1 and step-2.
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    Regards
    Ramesh

  • Dynamic directory name in Receiving File adapter

    Hi,
    In File to File senario, In receiving system i want to create directory name dynamically. In my mapping there is a field called name, the directory name in the receiving system will be value in the name field. Any one can help me how to do this one...
    Thanks
    Rao

    Hello,
    Please follow the below to achieve the same.
    input - Store number,
    UDF
    String dynaname = input;
    DynamicConfiguration conf = (DynamicConfiguration) container
    .getTransformationParameters()
    .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION );
    DynamicConfigurationKey key = DynamicConfigurationKey.create(
    "http://sap.com/xi/XI/System/File","FileName");
    conf.put(key,dynaname);
    return "";
    UDF mapping
    Source[input]   -
    > UDF -->    Rootnode of target structure.           
    Hope it helps.
    best regards,
    raj.

  • Dynamic file name creation using FTP adapter wired from a mediator

    Hi All,
    My Requirement is as follows....
    Mediator is wired to Three FTP adapters to create three files.
    File names are dynamic.
    In the mediator those three routings, mappings and assignment for the directory and file name are being created.
    But out of 3 files, 2 files are being created with the names mentioned during the FTP adapter configuration and the last one is being created
    with the dynamic value.
    Any help in this regard is highly thankful.
    Thank you.
    Srivatsasa.

    Create a UDF in mapping taking counter from IDoc as input parameter
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String totalFilename = "AAAA_" + counter;
    conf.put(key,totalFilename);
    return  totalFilename; 
    Map output of this UDF to Top node at target.
    you will not be able to see the result in test tab of mapping but it works end to end
    Select Adapter Specific Message Attributes in receiver file adapter..here select filename checkbox

  • How can i get message id as file name in Receiver Mail Adapter

    Hi All,
               We are working on file to mail scenario. Client requirement is " Attached file name should be the message id" How can we achieve this.
    Thanks & Regards,
    Purshothamm

    Hi,
    To have the file name as message id, I think the below blogs can help you…
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    /people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii
    Regards,
    Vijay N

  • Renaming attachment file name in receiver mail adapter

    Experts,
    I have a file to mail scenario where an xml file is picked up and transformed into the target format in XI which has to be sent as an attachement in an email on the receiver side.
    I am getting the mail with the attachement. But I would like to rename the attachment as the name of the picked up file.
    I am using Adapter specific message attributes on both sides but the attachment is named as untitled.xml.
    Please advise. Can this be achieved by using the swap bean or the message transform bean?
    Regards,
    Shobhit

    Hi Shobhit,
    The module tab of your mail adapter will look like this.
    Processing Sequence
    Module Name                                                            Type                                      Module Key
    localejbs/AF_Modules/MessageTransformBean   rename LocalEnterpriseBean     
    sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean  mail     Local EnterpriseBean     
    Module Configuration
       Module Key               Parameter Name             Parameter Value
          rename      Transform.ContentDescription                      File
          rename  Transform.ContentDescription  attachement;filename="yourfilename.ext"                                                          
          rename            Transform.ContentType                 application/text;name="yourfilename.ext"
    Thanks
    Amitanshu

  • Variable substitution not working for dynamic file name in Receiver File CC

    Hi Experts,
    I am doing the scenario of Proxy sender to File receiver and my purpose is to Create the text file
    as per the filename available in Source Message payload.
    I am using the Variable Substitution method for this as shown below.
    Source Message Structure:-
         <Row>            -
    having Cocurence 1.1
             <Filename>     -
    having Cocurence 1.1
             <Item>            -
    having Cocurence 1.Unbounded
              <Field1>
              <field2>
             <Item>
             <Item>
              <Field1>
              <field2>
                <Item>        
         <Row>
    Target structure is same as the source structure and i have mapped the Filename field of the Source
    with the Target structure Filename.
    In ID the following is the File receiver CC Configuration.
    File Name Scheme:- %Dyn_filename%
    In Advance tab, I have selected the Enable option and added one row as Variable name %Dyn_filename%
    and Reference as payload:Row,1,Filename,1
    In testing I am getting the Error as 'variable Dyn_filename is not found in Message payload'.
    Please suggest me.
    Regards,
    Jagesh

    Hi Pooja,
    Hi Pooja,
    Thanks for your valuable reply..
    I  tried with the same. but still Filename is appearing in Output file.Giving you some details regarding my Receiver File Configuration settings.
    Target Message Type:-
              <MT_Target_Struct>
                    <Row>----
    1.1 occurence
                            <Filename_test>----
    1.1 occurence
                            <ITEM>----
    1.unbounded occurence
                                  <Field1>
                                  <Field2>
                            <ITEM>
                            <ITEM>
                                  <Field1>
                                  <Field2>
                            <ITEM>
                    <Row>
              <MT_Target_Struct>
    Recordset structure:-  Row,Filename_test,ITEM
    Row.fieldSeparator----
    >'nl'
    Filename_test.fieldFixedLengths----
    >0  (Zero)
    Filename_test.fixedLengthTooShortHandling----
    >Cut
    ITEM.fieldSeparator----
    >,
    ITEM.endSeparator----
    >'nl'
    I want only ITEM node to be written in the output file.
    Please suggest.
    Regards,
    Jagesh

  • Counter in file name in receiver file adapter

    Hi,
    I am using FTP, my requirement is to add counter in the file name i.e XYZ001.
    And added to this i can increment the counter till XYZ020, after this i am supposed to start again from XYZ001.It will be some how handled that when i place XYZ001 for the second time , it will not overwrite the earlier one as it will be proccess by that time.
    I could have used addcounter but it doesnt work for FTP:(...also have seen /people/shabarish.vijayakumar/blog/2009/10/05/pixi-maintaining-sequence-numbers-in-file-name-scheme
    Do we have any new feature added in PI 7.1 for handling this.
    Regards,
    Abhi

    thanks shabz..
    Request you to please let me know how to proceed with the first option which you have mentioned i.e,how to create tables and will i be able to start the counter again from xyz001 once i reach xyz020? is there any abap code to be written (wiil be asking SAP counterpart ) or we need to do it in the dynamic configuration udf? Please let me know how to do the same.
    1. Maintain a table in SAP. Use/Code a RFC call to look up the sequence number from this table, incrementing the value after it is read. The result is then used in a dynamic configuration code, and the file name can be generated at that point.
    Will this impact performance ?..mine is a credit card authentication interface and response time is imp...
    Regards,
    Abhi

  • Reg: File name in receiver FILE adapter

    Hi Experts,
    i have Scenario  proxy to file
    from source side i got input values in one field(long String). in the target side i need to split that field
    finallly i need get the out put file like this
    q2344eretrnnsd                sewewerereefre                wereretrtrtreeterte                    ertrterwytdyt           rtretyeytyutueyt
    sdgfghfhyghhjhj                sdfgfdhdghgjgjh                  sdfgdfhgfhjgjgjfgh                     dfgdhdgghgh           dfghfgfgfgfgfgf
    sfdggggggggddf               sdfdfsddfdfdfdfd               sdfdfdfdfdfddfdfs                       sdfsdfdfdsfd           asdfsdafdsfds
    the problem is while place file  in the target directory  the file  need save as according to the "version no" (it is included in the long string of source field)
    file name should be change according to the "version no"
    so please suggset to me how can i change the file name according to the version no which is include in the long string in the source side
    Thanks in advance

    Hi Mani kandan,
    thanks for the reply can you please tell me one more thing in FCC
    source side we have only one field which is long string so we need put the value of that field in to the below format in target location
    source (field value==<line>sapsdnforumsprocessintigration</line>) ocurs multiple times
    in target file it has to appear as in below format.
                      sap  sdnforums  processintegration
                      sap  sdnforums  processintegration
                      sap  sdnforums  processintegration
                      sap  sdnforums  processintegration
    please suggest wat type of file cotent conversion parameter rquired to achive this in the receiver communication channel
    Thanks in advance
    Edited by: katakoti on May 17, 2011 8:44 AM
    Edited by: katakoti on May 17, 2011 9:28 AM

  • Dynamic attachment name with receiver mail adapter and use mail package

    We need to send mapped XML payload as attachment (with dynamic name) to a recepient (recepient email id is part of input xml payload, but not part of the mapped XML payload).
    I could probably do this using the adapter module (as per the following link),
    http://wiki.sdn.sap.com/wiki/display/XI/Adapter%20Module%20PI%207.0%20Set%20Attachment%20Name?bc=true
    I would like to explore if this would be feasible using Mail package and XI payload.I already have a Java mapping that is converting the input XML to required Output format. If I am using Mail package (XI Payload), how do I go about sending this Output XML from java mapping as attachment to email id available in the input payload?

    Hi,
    1) XML payload as attachment (with dynamic name)
    2) recipient (recipient email id is part of input xml payload, but not part of the mapped XML payload)
    These two is possible by using Mail Package. You have a standard xsd for mail package which you can download from the SAP Note 748024.
    The xml created in you java mapping which will be your attachment should be put into the <content> tag of the mail package xml structure. and the file name can be set in the <Content_Type> tag.
    <?xml version="1.0"; encoding="UTF-8"?>
    <p2:Mail xmlns:p2="http://sap.com/xi/XI/Mail/30">
    <Subject>My Invoice</Subject>
    <From>from email address<;/From>
    <To>to email address</To>
    <Content_Type>text/plain;name="MyFile.csv";</Content_Type>  --> file name here
    <Content>123;A49;aaa</Content>   -> attachment xml here
    </p2:Mail>
    And you have to select MailPackage in the receiver mail adapter.
    Regards,
    Aravind

  • Dynamic attachment name in receiver mail adapter for 1 attachment?

    Hi,
    seems to be a tricky thing....
    The sender interface (file) picks up an xml file and a pdf document.
    The receiver wants to get the xml file as a txt file and the pdf, both sent together by mail.
    We are following this thread:
    "Sending multiple attachments winthin a single Receiver Mail adapter in required format".
    So far we are able to generate the txt file and send it together with the pdf to the recipient.
    The txt file gets its name from the payload of the xml file.
    Unfortunately the pdf should be renamed to the same name as the txt file.
    And here we are stuck.
    We generate the filename for the txt file in the mapping to the mail message (as usual ximail30.xsd).
    But for the pdf we are only able to set a static name in the channel module page using
    Transform.ContentDisposition.
    Any ideas how to solve this are really welcome!!!!
    (Solutions that do not talk about using a new module to be written are prefered.)
    Regards
    Dirk

    Hi,
    seems to be a tricky thing....
    The sender interface (file) picks up an xml file and a pdf document.
    The receiver wants to get the xml file as a txt file and the pdf, both sent together by mail.
    We are following this thread:
    "Sending multiple attachments winthin a single Receiver Mail adapter in required format".
    So far we are able to generate the txt file and send it together with the pdf to the recipient.
    The txt file gets its name from the payload of the xml file.
    Unfortunately the pdf should be renamed to the same name as the txt file.
    And here we are stuck.
    We generate the filename for the txt file in the mapping to the mail message (as usual ximail30.xsd).
    But for the pdf we are only able to set a static name in the channel module page using
    Transform.ContentDisposition.
    Any ideas how to solve this are really welcome!!!!
    (Solutions that do not talk about using a new module to be written are prefered.)
    Regards
    Dirk

Maybe you are looking for

  • How do I uninstall OS Lion and revert to Snow Leopard

    Hi all, I need to use Microsoft Office Mac Version in my work. And OS X Lion don't support that. I am desparate to know how do I unistall the OS X Lion, and revert to Snow Leopard so that I can resume working on my MacBook Pro. Please help.....

  • How to ignore programmatically some items during a query ?

    Hi all, The process of my application is like this : first of all the end-user enters some criteria , then he/she presses a button to search for the possible results matching the criteria entered (execute_query). The possible results are displayed th

  • Replication problems with slow ( 20kB/s line)

    Yesterday we noticed on our production database that replication did not run anymore because of an error in one record. This forced us to re-iniitalize the subscription. Maybe this is exactly what we should not have done but we did . The result was t

  • Restore Failure from Drive Image backup

    I have just restored three OS partitions from backups made by Drive Image 7.  My problem is that one of them failed to boot, and the follwing error messages were returned: Broadcom UNDI PXE-2.1(Build 082) v6.2.11 Copyright(c)  2000-2003 Broadcom Corp

  • OCA (1Z0-042)

    Hi guys, I want to prepare for OCA exam. Which among the following books would you recommend? 1. Sybex OCA Preparation 2. Osborne Oracle Press All in One Certification Guide. If any others do lemme know. Thanks. Cheers.