How to retreive the dynamic file name in the AAE configuration?

Hi Guys,
I have configured File to File with the integrated configuration and in the mapping i need to retreive the file name dynamically and i am unable to retreive it from the run time in AAE configuration. I am able to retreive with the normal configuration where integration engine is the run time.
I am using the code as below.  Is it possible to retreive the file name dynamically in the AAE configuration? any help or suggestions would be appreciated.
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String ourSourceFileName = conf.get(key);
return  ourSourceFileName;
Thanks,
Srini

Hello Srinivas,
Brief Solution:
1. Using dynamic configuration, set the attribute value of payload dynamically to ASMA
2. Using AF module, write the value of ASMA in a variable
3. Using the variable substitution, set the receiver file name schema
Plz go through the below link:
http://wiki.sdn.sap.com/wiki/display/XI/CombiningthreedifferentaspectsofPIinoneshot
Thanks,
Satya Kumar

Similar Messages

  • 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 depending on the Source File name

    Hi Experts,
    I have a problem like Dynamic File name depending on the Source File Name. I will explain with example as follwos
    Source File name                 Targer Folder/Filename
    NK01.VR59.L2007030         VR59/Rec.l200
    NK01.VR71.L2017030         VR71/Rec.l201
    NK01.VR77.L2027030         VR77/Rec.l202
    See above the exaple, Depending on the Source file name, I am deciding where i need to place my file and what name i need to name it.
    So please suggest me the solution and How can i do this with a single communication channel ? Do i need to create multiple CC for each folder??
    Points will be rewarded for Valuable anwer.
    Thanks in Advance,
    Best Regads,
    Vijay

    Hi VIjay,
    Thanks for quick reply. But i am getting error in End to End Scenarios only. If i remove the Return " "  statement from the UDF, while activating it is showing the error saying like missing return statement. I also mapped to the top most node to this UDF.
    I am getting the following error in End to End error Scenarios:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
      <SAP:P1>com/sap/xi/tf/_MM_Target_File_determined_</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:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>During the application mapping com/sap/xi/tf/_MM_Target_File_determined_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>

  • How to handle Dynamic File Name

    Hello All,
    I have a  requirement, I have to download a file from application server to my ABAP program which will be executed in the background. The problem is the file name is a dynamic file name with timestamp on it. So how do I read the file from the application server. I know there are certain function modules but I don't think so that they can work in background.
    So If anyone has worked on it before your reply would be helpful.
    Thanks and Regards,
    Sushil

    Hi,
    Use this funcation module this will return you the list of files in a directory...
    It will work even in back group processing also..
    SUBST_GET_FILE_LIST
    or if it is unix environ ment.
    data: begin of t_tabl occurs 0,
    line(132),
    end of t_tabl,
    data: lc_command(100) type c.
    Get all the file name falling under specified directory...
    lc_command(3) = 'ls '.
    lc_command+3(45) = p_dir. " Directory of file path
    call 'SYSTEM' id 'COMMAND' field lc_command
    id 'TAB' field t_tabl-sys.
    Check any files exits in the directory.......................
    if t_tabl[] is initial.
    message e006 with 'No files exist in the specified directory ' p_dir.
    endif.
    here you will have all the file names in t_tab1 you can sort by name and will get the latest file in order..
    Thanks
    Mahesh
    Message was edited by:
            I Can Solve It

  • 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

  • Dynamic file name inside the ZIP file

    Hi Experts,
    I have done proxy to file scenario, reciever side is the file ZIP file, i have done successfully done Zip file using adapter modules in Communication Channel.
    The file name is hard coded like this.
    contentType-----Transform.ContentType--
    text/plain;charset="UTF-8";name="Billing.txt"
    Is there any possible to do dynamic file name instead of hardcoded like add time stamp.
    Kind Regards,
    Praveen.

    hi,
    you can always do it using an adapter module like shown in my blog:
    /people/michal.krawczyk2/blog/2006/02/23/xi-dynamic-name-in-the-mail-attachment--pseudo-variable-substitution
    Regards,
    Michal Krawczyk

  • Dynamic File name in File Adapter

    Hi,
    I have a requirement to pass dynamic file name in File Adapter.
    Is there any way to pass a variable for the file name attribut in file adapter.
    I am looking for some options apart from %yyMMddHHmmss%,%SEQ%...etc
    Please suggest if any of you have information on how to put values from a variable to file name attribute in file adapter
    regards
    Saiju

    Hi Saiju,
    Yes there is.
    Assign your file name to a variable, let's say 'fileName'.
    Now go to your invoke activity(for the specific fileadapter) -> Property tab-> find a property call jca.file.FileName -> in the value field assign 'fileName' variable.
    That's it... (assuming you are using 11g)
    Arik
    Edited by: Arik on Jun 27, 2012 3:12 PM

  • Dynamic file names in outbound file adapter

    I have to configure a flow in XI system wich takes an input file from one machine and after mapping process leaves the output file in target machine with the same name of input file.
    Name of input file won't be always the same (*.dat) so i cannot hardcode this name in outbound file adapter.
    Does anyone know how to transfer input filename from inbound file adapter to XI message and then to outbound file adapter?
    I know there is an option to create dynamic file names in file adapter but i think it isn't enought to solve my problem.

    I have to configure a flow in XI system wich takes an input file from one machine and after mapping process leaves the output file in target machine with the same name of input file.
    Name of input file won't be always the same (*.dat) so i cannot hardcode this name in outbound file adapter.
    Does anyone know how to transfer input filename from inbound file adapter to XI message and then to outbound file adapter?
    I know there is an option to create dynamic file names in file adapter but i think it isn't enought to solve my problem.

  • Dynamic file name from messsage payload

    Hi Friends,
    My requirement is to read one .xml file , which has  Purchase Order deatails and place .html file on receiver side, we are using XSLT for mapping.
    The file name should be "POnumber.html " , i've gone through below but couldn't get much
    http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm
    Can any one send the that code , and steps to add that code in side XSLT.
    Thanks
    John

    Hi,
    With above links
    /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
    See in the below Michal blog , how to conver the file as html , take that part only.
    /people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter
    Regards
    Chilla

  • Dynamic file name(Context)

    Hello All,
    I am using Dynamic file name function in my message mapping. Below is the code that I am using inside UDF:
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String fileName = conf.get(key);
    return fileName;
    Now the questions is as per my requirement, I need to generate multiple file names. Can some one help me how can change the above code for catering multiple returns
    Thanks
    Regards
    Moorthy

    Hello,
    Now the questions is as per my requirement, I need to generate multiple file names. Can some one help me how can change the above code for catering multiple returns
    If you are using multi-mapping (0..n), only one will be accessed. See link below from SAP Help
    http://help.sap.com/saphelp_nw70/helpdata/EN/43/09b16006526e72e10000000a422035/frameset.htm
    Or you can use variable substitution for filename generation (search in SDN).
    Hope this helps,
    Mark

  • Dynamic file name in communication channel

    hello
    is it possible to give in the communication channel, under the 'File Access Parameters', a dynamic file name?
    to get it out of a table or something?
    Thanks
    Kfir

    Hi,
    Yes its bit possible to use the dynamic file name at File access paramters
    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,
    Refer below links for more in depth details about it
    Re: Dynamic file name in Receiver File Adapter
    http://help.sap.com/saphelp_nw2004s/helpdata/en/21/6faf35c2d74295a3cb97f6f3ccf43c/frameset.htm
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    /people/sap.user72/blog/2005/10/01/xi-new-features-in-sp14
    /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i
    /people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii
    /people/michal.krawczyk2/blog/2006/02/23/xi-dynamic-name-in-the-mail-attachment--pseudo-variable-substitution
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    Check out this URL
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    Check these weblogs as well...
    /people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12
    /people/sameer.shadab/blog/2005/09/23/an-interesting-usage-of-variable-substitution-in-xi
    Thanks
    Swarup

  • Dynamic File Name on Receiver Side using XSLT mapping

    Hi,
      My scenario is a Proxy to File scenario.The File on the receiving side is a TEXT file generated due to XSLT mapping. The file name has to be dynamic like- TEST<DDMMYYHHMMSS>File.DAT.
    If somebody knows how to do the same please help.
    Regards
    Ritu

    Hi Ritu,
    I agree to Krishna.With your XSLT mapping create a XML output which can be converted to a text file with content conversion.
    And for the dynamic file name, i guess its the date that matters which needs to be in DDMMYYHHMMSS format. the same can be accomplished by a Java function and calling it in your XSLT .
    Do refer this weblog it will help you accomplish the same.
    >>> /people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners
    Regards,
    Shabarish

  • Export with dynamic file name

    Hi everyone.
    I want to know how export oracle tables with dynamic file name on windows XP platform.
    bye.

    You'd have to generate the export command-line or par file using a script -- Windows or SQL !
    It would be easy to use SQL to generate the script.
    So you could have a BATch file that
    a. Calls the SQL to generate the export command-line or parfile
    b. Executes the export
    even possibly run in a loop.
    Hemant K Chitale

  • Dynamic file name while sending to target FTP

    Hi Experts,
    we have a scenario wherein we are trying to implement dynamic file names.
    The scenario is IDOC to file, and  we need to append the data corresponding to all the IDOC triggered n a daily basis.
    Its like  the file abc_01will contain data for day 1(data of oll the IDOC in that day).For day to we need to dynamically name the file as abc_02 and so on.
    But before naming the file as abc_02 we need to check if abc01 is present or not .If abc_01 is not present then for day 2 file  we need to give the name as abc_01 and so on_.This condition is need to be checked becasue there may be the case that a file may not be picked by the script running  at the target system.
    can anyone let me know how to check whether file are correctly picked at target.
    Regards,
    srinivas.

    Hi  Srinivas,
    I think you can achieve this with the next scenario:
    - For getting all the Idocs info, you need a ccBPM to collect them, and then, download them to a file.
    - To dynamically put the filename, you need to use Dynamic Configuration at the File Receiver Adapter (in the Message Mapping, you can write a UDF.)
    - And to check if the daily file exists, you can also write an UDF and then decide the name of the output file.
    Hope this helps,
    Regards,
    Juan

  • How to include a dynamic file

    Hi,
    The following syntax does not work:
    <%@ include file="htmls/mydocs/<%=dynamicFileName%>.htm" %>
    could you tell me how to include a dynamic file?
    thanks,
    peterzhu

    The include directive <%@ include ... does not work with dynamic file names, because it is evaluated at compile time.
    You have to use the include standard action <jsp:include page=... This is executed during runtime, and hence a dynamic file name can be used.

Maybe you are looking for