File Name Scheme - Receiver Adapter

Hi,
I have a File Receiver Adapter which is using content conversion to take in XML and output a file. I want the output file to be called EOD286ccyymmdd.txt where ccyymmdd is the current date. Seems to be 2 options for file names:
1. Add Time Stamp: No use as this adds the Date & Time. I only want the date.
2. Variables: Don't think I can use this as it only seems to work if the data is part of the XML message packet. The date in ccyymmdd format is not contained in the XML anywhere.
Is there anyway of getting the File Scheme Name I want ?
Cheers,
PaulC.

Hi,
You have one option in the File adapter receiver channel: 'Run Operating System command After message processing", where you can give any std OS command or you can give batch file (.bat) to run after the message processing. In batch file, you can write a set of commands which would rename the file according to your name format.
Another bit complex solution is create your own custom adapter module and change the file name scheme.
Thanks,
RK

Similar Messages

  • Temp File Name Schema in Receiver File adapter

    Hi,
    I have a scenario where i have to write the file in the temperaory location before writing it to the FTP loacation, I have selected the Processing Parameter as "Use Temperory File" but when the file gets created it is padded with the Message Id, is thr any option to get the file name as the temp file name without the Message Id or timestamp.
    Please let me know if any one has come across such scenario.
    thankx,
    shree

    Hi,
    Under Write Mode, specify whether the target file is to be written directly in the specified directory. If an additional step is to be added using a temporary file, choose Use Temporary File.
    You can specify a naming scheme for the temporary file under Temporary File Name Scheme.
    This schema is used to determine the prefix and extension of the temporary file; to ensure a unique file name, a time stamp is also added to the name during processing.
    The schema xitemp.tmp, for example, results in the file name xitemp<timestamp>.tmp
    So you have to customise the file name in schema.
    see below link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    Regards
    Chilla

  • 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

  • Regarding  File name schema in  Receiver  com. Channel

    Hello,
    I have gone thru  the blog
    The specified item was not found.
    "The same filename from a sender to a receiver file adapter - SP14 for Dynamic configuration"  by Michal Krawczyk....And here in this Scenario in ID (in Reeiver communiation channel)what should we give as file name.(or) can we leave it blank.
    If my client wants the name ,then instead of assigning it to the root can I consider a element and assign the udf...In this case how it will effect the Receiver file name schema in Rec Communication channel in ID

    Hi,
    Pass it as %FileName% which will come from dynamic configuration.
    SAP note may give some hints- 746393 and also this thread has got the answer
    Module Processor : Module exception java.lang.ClassCastException
    Thanks
    Swarup
    Edited by: Swarup Sawant on Aug 22, 2008 11:19 AM

  • 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

  • Reciever File Adapter - Temp File Name Scheme using Variable Substitution

    How can I create a temporary file that uses variable substitution? 
    We are having a problem with files merging when we write files using the "Use Temporary File" setting on the FIle Adapter.  So two independent files are merging into a single file.  We are not using the "Append" setting.
    We would like to use a Temp File Name Scheme that would append the message id onto the temporary file name. 
    Using variable substitution we created a msgid variable.  When added to the temporary file name using %msgid% the temporary file name is created with %msgid% in the name instead of the actual message id.  We put the variable into the "File Name Scheme" as well and the end completed file used the message id in the name.
    Any Ideas?
    Thanks,
    Matt

    HI Matthew,
    Why are you adding the message id into the temporary file??
    I understand that you want the output of the filename to contain message id .. and hence you are using variable substitution for the same.
    Temporary file name will anyways get overwritten by the actual file name (here the actual filename will be using variable substituion).
    So i suggest to achieve your scenario you can add any name in the temporary file and maintain the desired filename you require as output in the variable subsititution.
    Temporary File Name option actually acts as a lock - unlock mechanism from PI side while the file is getting written to the file server so that while PI is writting the file no third party application batch program picks it up.
    I hope this helps.
    Cheers
    Dhwani

  • 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

  • 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

  • Changing file name schema

    In my receiver adapter the file name schema is intern_pay%var1%.dat and in variable substitution var1 is defined as message:message_id_hex.According to this i can see the file in the target directory as intern_payb0ba03a0904711dbbb9e00000e252c96.dat
    Can any one please help me out to change the format of the file in the target directory to intern_pay_yyyymmdd.dat
    Briefly, can any one please explain me how to change the file name schema in the receiver adapter.
    Many Thanks,
    Smith.

    Hi Paul,
    You can use DynamicConfiguration in a user defined function to achieve this.
    Go thro these threads, they will provide you the solution.
    Dynamic Directory and File Naming in Receiver Adapter
    In the above thread look at the post that answered the question. It will certainly help you.
    And go thro this also.
    Dynamic  File Name for Receiver File Adapter
    Regards,
    P.Venkat

  • 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

  • Issue with file name in receiver Communication channel

    Hi Experts,
      I am sending the files from SAP Application server to third party Application server.
    In my source folder i have different types of files with different names.
    but i need to pickup the files which is coming as of type sss_3300_was.txt and sss_3400_was.txt.
    what would be the logic for this.what my understanding is if i put sss_* it will works.
    If suppose the file is Exist in the folder as sss_3300_was.txt , so it will picked up and places in target folder.
    and next time if the file type is sss_3400_was.txt then that will pick up and places in the target folder.
    my question is, in the receiver comm channel what would be the file name scheme. i have tried with * and / but system has not been accepted as * can not be given.
    Kindly suggest what should i put in Receiver CommChanne file name sheme.
    Appreciate your inputs
    Thanks,
    Bhaskar

    Hi Satish,
    Thanks for your valuable inputs.
    Actually i need to change the subjet when i am asking other question...
    first thing is suppose i have 10 files like sss_3100_was, sss_3300_was, sss_3400_was........sss_3900_was  in the sender application folder and should be moved to receiver [target] folder with the same name.
    as you said mentioned above below is my undertsanding, please correct me if i am wrong.
    In sender cc
    1.  i will give file name as sss_*
    2. i will flag ASMA and also check file name.
    In receiver cc
    1. I will give file name as sss_*
    2. i will flag ASMA and also check the file name
    The above is my understanding with respect to your inputs,  is it correct?
    in receiver cc i have tried file name scheme as sss_*  but when i see the receiver CC log its telling that * is not allowed.
    may be i have not flaged ASMA at that time, but now i will flag ASMA in receiver CC dose it works? just need to confirm from you.
    Regarding seconf issue.
    when file is picking up from the source folder from SAP Application server as i can see file is picking up well and posting in third party folder and even in the sender cc and receiver cc logs i could see all shown in success.But when i see in the SXMB_MONI in the inbound interface the data are coming in the special charater format like @$??? and so on.But when i checked in SAP Appl server the same file contains the three lines of data like material number purchase order number and so on and it is Text file.
    below mentioned are done configs for sender CC by me.
    MP: file
    TP: NFS [as  it is SAP appl server]
    filepath:/
    file name: sss_*
    file type :text
                   add time stamp
                   ..... and so on
    Kindly advise me if any changes are required and also provide me inputs in case any correction.
    Thanks,
    Bhaskar Reddy

  • Dynamic file name in receiver channal

    Hi, All,
    I would like to set dynamic file name in receiver channal. My xml payload will be like this:
    <file_name>file1.txt</file_name>
    <text_content>balabala......</text_content>
    I would like to output an text file which text content will be the value of <text_content>, file name will be the value of <file_name> in the xml payload.
    Is there anyone could help me?
    Helpful answer will be surely awarded. Thanks
    Yang

    Please look at the below description from help.sap.com. You can use the below steps to name the file from a value in the payload. You would have to use File Content Conversion to insert the value of the <text_content> in the file.
    Variable Substitution (Target Directory/File Name Scheme)
    If you set the Enable indicator, you can enter variables for the Target Directory and File Name Scheme. Enter the names of the variables and references in the table.
    ●      Enter each variable that you reference in the Target Directory and File Name Scheme fields without the surrounding percentage sign under Name of Variables in the table.
    The variables can refer to attributes of the message header or elements of the message payload.
    ○       If the variables are to refer to an attribute of the message header, add the prefix message: to the name of the variable under Reference. You can specify the following attributes of the message header:
    sender_party, sender_service, receiver_party, receiver_service, interface_name, interface_namespace,
    message_id (message ID with hyphens, for example 9fbe1ff1-9a0d-11d9-8665-cbf10a126331)
    message_id_hex (message ID in hexadecimal format, for example 9fbe1ff19a0d11d98665cbf10a126331)
    For example, if you want to specify the interface name from the message header in the target directory or in the file name scheme, enter message:interface_name as the reference.
    If one of the message attributes contains characters that are not permitted in a file name, for example \, /, :, *, ?, ", <, >, |, then these characters are replaced by an underscore ("_").
    ○       If the variable refers to an element in XML schema, add the prefix payload: to the information under Reference. The reference then comprises a pseudo path description in the form of a comma-separated list with the schema namea,na,nameb,nb,....
    namea,nameb,...corresponds to the element name and na,nb,... corresponds to the occurrence of the element name at the respective level in the document.
    The description begins at the root of the document and ends at the respective element.
    To reference the element that is in bold in the example, the following expression is used: payload:root,1,e1,1,e2,2
    The parser searches for the first occurrence of the root element at the first level. It then searches for the first occurrence of e1 at the second level and for the second occurrence of e2 at the third level. The content of the last element (u201CExample Valueu201D) is set as the value for a specified variable.
    <?xml version="1.0" encoding="UTF-8" ?>
    <root>
      <dummy>
         <e1>
            <e2>Data_1</e2>
            <f/>
            <g attr="abc">text</g>
            <e2>Data_2</e2>
         </e1>
      </dummy>
      <e1>
         <e2>illegal/value</e2>
         <f/>
         <g attr="abc">text</g>
         <e2 attr="fghij">Example Value</e2>
      </e1>
    </root>
    Thanks
    Praveen M

  • Use temporary file in FTP receiver adapter

    Hi guys,
    I'm not getting the purpose of "use temporary file" in FTP receiver adapter. Can you describe any situation, where this should be used?
    What is the location of this temporary file?
    Is it deleted after "normal" file is created?
    Thanks a lot,
    Olian

    > I'm not getting the purpose of "use temporary file" in FTP receiver adapter. Can you describe any situation, where this should be used?
    Some times when you create the file on your target dir then if there is another application looking for same file is quite faster to pick the file before it is complety written on target dir then in this situation using temporary file option is very helpful. What it does, it simply creates the file first by using temporary name once all bytes or bits has been transfered then it creates the original name and the temp file get deleted.
    > What is the location of this temporary file?
    Same location, where your original file is suppose to be written.
    > Is it deleted after "normal" file is created?
    Yes.
    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

  • Send port with same file name as receive

    I have a filename "abc.docx". I need to create a send port where I should set the file name in a such a way that I should have the same file name as received.
    I have set the filename in the send port as "%SourceFileName%" but it does not seem to be working.
    How to set the send port to have the same file name as received by the receive port? Send location should hold the same file name

    could you please also mention what is happening when you set
    %SourceFileName% .  what kind of output filename are you getting then when used %SourceFileName%
    ?  incase if you are not getting any file at all in the output, then its not the issue with %SourceFileName%
     macro.
    Please mark the post as answer if this answers your question. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

Maybe you are looking for

  • Do I use compressor to rip High School football game from DVD?

    I am making a recruitment video for a Senior in High School.  I film all of his local games, but two weeks ago they played out of state.  He just gave me a DVD of the game footage.  Would I use compressor to turn the footage back into an editable for

  • How do I erase history of file use in "search for" sidebar in finder window

    I just upgraded to Leopard and noticed that the "search for" sidebar in the finder window reveals every file I've ever opened in the past. I know I can turn it off in the finder preferences but I prefer being able to erase the history. I can't find a

  • Email in Photoshop Lightroom 4

    The new email feature in LR4.0 is nice, however it does not recognize my Outlook email contacts. When I send an email I have to type in the recipients email addresses every time, or create a separate address book just for Lightroom. This is kind of a

  • All of the sudden Siri and Dictation on Mountain Lion don't understand anything!!!

    Is anyone else having this problem or is it just me? I used to drive for work every day and send emails and text using different dictations, meaning numeral one and it would produce a 1, and over the past couple months Siri just stinks! Doesn't under

  • DFS-R - Office Documents locked problem

    Dear Forum Members, Recently I faced a really "threatening" problem, which you may seen before so know the solution for it. We had an old File Server, used Disk2VHD to move it's complete D: drive to another Windows Server 2012 R2. After this, we enab