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

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

  • 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

  • Regarding file name in the target system

    Hi..
    I have got a file name releated problem in XI.
    I have configured a flow in XI system using proxy and after mapping process creates a output file in target machine as a "Test<Date-Time Satmp>.dat".
    Test is the file name and adding date-time stamp to that.
    I am using file adapter.
    Now my requiremnt is that instead of "<b>Test<Date-Time Satmp>.dat</b>", I need to create a file as
    <b>"<Date-Time Satmp>Test.dat</b>" .
    Please let me know if anyone has come across similar situation.It is urgent.
    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.

    Hi jahangir laskar,
    For the Receiver communication channel, (file adapter)
    Enter in the fields
    1. Under <b>File Access Parameters</b> section,
    <i>File Name Scheme : test.dat</i>
    2. Under <b>Processing Parameters</b>
    <i>File Construction Mode : Add Time Stamp</i>
    This should work, i just tested it out.
    Srinu.

  • 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

  • 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

  • XI 3.0 File receive comm.channel using variable for folder/file name schema

    Hi,
    I prepared a integration message to produce .txt file output of message.
    I prepared message successfully, it's running properly and producing .txt file.
    My problem is to set .txt file name.
    I must set file name using by some information in .txt file.
    I must get some part of the first line of .txt to set filename.
    I declared a variable to do it.
    How can i set referance of variable?
    payload:..?
    Thanks.

    Hi,
    this blogs might be helpful:
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3417800%29ID0935780750DB11281184595516315205End?blog=/pub/wlg/13704
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3417800%29ID0935780750DB11281184595516315205End?blog=/pub/wlg/2664
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3417800%29ID0935780750DB11281184595516315205End?blog=/pub/wlg/1888
    http://wiki.sdn.sap.com/wiki/display/XI/CombiningthreedifferentaspectsofPIinoneshot
    Regards
    Patrick

  • Set file name with XSLT - receiver channel - elements from XML?

    Dear experts,
    I have an XSLT mapping for a message that is sent via a receiver channel to a customer.
    The customer wants a certain file name which is put toghether by elements from the XML message.
    I have looked at:
    Re: Java Map for writing the file
    The java code and the XSLT work perfectly!
    In the line
    fos = new FileOutputStream(new File("Fixed_" + new Date().getTime() + ".xml"));
    a fixed value, date and time are used for the file name.
    But I need some values from the XML message to create my name. But how do I do that? Can I somehow get values from the XML message through that java function or do I have to adapt the XSLT?
    Can someone please help me!
    Thank you,
    Peter

    Hi Udo, Hello experts,
    Now I do have a problem. I am using this XSL file:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:map="java:java.util.Map"
      xmlns:dyn="java:com.sap.aii.mapping.api.DynamicConfiguration"
      xmlns:key="java:com.sap.aii.mapping.api.DynamicConfigurationKey">
    <xsl:output indent="no" />
    <xsl:param name="inputparam"/>
    <xsl:template match="/">
        <!-- change dynamic configuration -->
        <xsl:variable name="dynamic-conf" 
            select="map:get($inputparam, 'DynamicConfiguration')" />
        <xsl:variable name="dynamic-key"  
            select="key:create('http://sap.com/xi/XI/System/File', 'FileName')" />
        <xsl:variable name="dummy"
            select="dyn:put($dynamic-conf, $dynamic-key, 'TOOLDATA_.xml')" />
      <xsl:copy-of select="." />
    </xsl:template>
    </xsl:stylesheet>
    But then the output file is only named "TOOLDATA_.xml". So I assume the XSL is working.
    And I am using this Java-file:
    package pi_mappings;
    import com.sap.aii.mapping.api.*;
    import java.io.*;
    import java.util.*;
    public class SetFileName extends AbstractTransformation
         static final int BUFFER = 1024*1000;
        private Map param;
        public SetFileName(){  }
         public void setParameter (Map map)
              param = map;
              if (param == null)
                   param = new HashMap();
         public static void main(String args[])
              try
                   InputStream in = new FileInputStream(args[0]);
                   OutputStream out = new FileOutputStream(args[1]);
                   SetFileName sfn = new SetFileName();
                   //sfn.setParameter(mapOfMap);
                   sfn.execute(in, out);
              catch (Exception e)
                        e.printStackTrace();
        public void execute(InputStream inputstream, OutputStream outputstream)
        throws StreamTransformationException {
              try
                   DynamicConfiguration conf = (DynamicConfiguration) param.get("DynamicConfiguration");
                   DynamicConfigurationKey KEY_FILENAME = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
                   int len = 0;
                   byte buf[] = new byte[BUFFER];
                   FileOutputStream fos = null;
                   if (conf != null)
                        fos = new FileOutputStream(new File(conf.get(KEY_FILENAME) + new Date().getTime()) ); //sample only
                   else
                        fos = new FileOutputStream(new File("Fixed_" + new Date().getTime() + ".xml"));
                        while ((len = inputstream.read(buf)) > 0)
                             outputstream.write(buf, 0, len);
                             fos.write(buf, 0, len);
                        fos.close();          
              catch(Exception e){ e.printStackTrace();}
         public void transform(TransformationInput arg0, TransformationOutput arg1)
         throws StreamTransformationException {
              getTrace().addInfo("JAVA Mapping Called");
         this.execute(arg0.getInputPayload().getInputStream(), arg1
              .getOutputPayload().getOutputStream());
    Could you please help me find the mistake. I tried to test it locally by changing the main-method but I could not get it to work.
    Thank you very much for any ideas!
    Best regards,
    Peter

  • Dynamic file name (Date) in Receiver File Adapter

    Hi,
    can any one tell me how to create outbound file name with receiver file adapter in format like Name_22-08-2006.dat. I need from a current Date in the name of the message (without any other information). In message payload I don’t have that date. Is it possible to use variable from user defined function in message mapping for that name?
    Regards,
    Naycho

    Naycho,
    that's exactly what I've managed to perform using DynamicConfiguration. Check these links:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/09b16006526e72e10000000a422035/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/03fe1bdc7821ade10000000a1553f6/frameset.htm
    Particularly, I've created a Java API for using setDirectory and setFileName methods through mappings. I use XSLT with java enhancement because it's a million times easier to parse and get node values with XSL than pure java.
    I'm writing a blog on the subject, if you don't resolve the problem until it's out, let me know.
    Regards,
    Henrique.

  • How to generate file name dynamically in receiver FIle adapter? Please help

    Dear Experts,
       I have a scenario where I need to generate output file with the name dynamically pulled from the XI payload.
       In receiver File communication channel I don't see any option where we can specify the XML path for the file name.
       For example:
       If my inbound XML structure (inbound interface) is like below:
       <filename>file123.txt</filename>
       <RootNode>
             <Element1>Product123</Element1>
       <RootNode>
      From this I need to pick the filename value and generate the output file with the same value.
      How can I achieve this? Please help!
    Thanks & Regards
    Gopal
    Edited by: gopalkrishna baliga on May 3, 2011 1:10 PM

    Gopal,
    You can use DynamicConfiguration class for this.
    You need to write UDF for this and with input of filename you want to set and map this UDF to the top level node.
    Refer the below famous blog from Micheal:
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    You can also use Variable substitution to get value from payload, search SDN on this.
    --Divyesh Vasani

  • 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

  • Reciever File name Scheme

    Hi Team,
    We have a requierment for File receiver to create a file with the name SA2345_date_time.txt.
    Could anyone please help me how to define it in receiver file adapter.
    Appreciate your quick response.
    thanks & regards,
    Ranganath.

    Hi ,
    You can do dynamic configuration to achive this. Or you can select Add timestamp in receiver file adapter.
    Please see this.
    Re: File adapter - How to pass File name and path at runtime
    Define Processing Parameters
           7.      Select the Processing tab page.
           8.      Select the File Construction Mode.
    u25CB       Create
    The file is created. The document received last is saved in each case.
    If you want the created file to be overwritten, set the Overwrite Existing File indicator. If you do not set the indicator, processing is stopped until the created file is processed.
    u25CB       Append
    The file is written when the inbound documents are appended.
    u25CB       Add Time Stamp
    A new file is created for each document. A time stamp with the format yyyyMMdd-HHmmss-SSS is added to the file name. The time stamp is added as the last part of the name before the extension.
    This mode guarantees that no file is overwritten. In this way, files that originate from the same adapter configuration can be sorted.
    In Mapping also you can do dynamic configuration.
    UDF
    public String setFileName(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 FileName=SA2345+"_"+getDate()+"_"+getTime();
    conf.put(key,FileName);
    return FileName;
    You need to use this UDF in root node mapping.
    Dont forget to check Use Adapter specific message attribute in receiver file adapter.

  • RFC TO HTTP receiver scenario.Adding file name to HTTP receiver

    Hi All,
    Scenario is ZBAPI  ->XI-> HTTP conncetivity to EXternal Partners .
    ZBAPI sends the Partner data informtaion to XI .  I need to create a Partnerdata xml in XI and pass it to HTTP Connectivity (Certificates ) to External Partners
    Connectivity is working but I need to add the time stamp to the Partner data xml in the HTTP Receiver .
    I dont get the time stamp in ZBAPI
    I checked many blogs to create UDF of getfilename, dynamic configuration , but here there is no FTP sender channel .
    Can someone help me in giving ideas as hope to assign the time stamp in runtime to HTTPS Receiver Channel .
    Thank you ,
    Best Regards,
    Vara

    Hi Vara,
    In your question you actually mentioned three different communication methods (HTTP, HTTPS and FTP), but only one of them can really work with files and it is the FTP adapter. Moreover, what you need is the Receiver FTP Communication Channel, not the Sender one (as you need to deliver your message to an external system, not to collect it from there). What you need to do is find your Receiver Communication Channel, go to Advanced tab and mark "Use Adapter-Specific Message Attributes", as well as the File Name (that appears once you mark the first one). Then, in your message mapping, you just put the current timestamp to the respective dynamic configuration parameter. Find an example of how to make the whole change [here|http://www.****************/Tips/XI/ASMA/Index.htm].
    However, if I misunderstood you and you need to use the current timestamp in the message body instead of the file name, it will be even simpler. In this case, just go to your Message Mapping and in the target field, put the "currentDate" function from the "Date" group, then double click on it, click the "extended view" button and put your expected date and time format.
    Hope this helps,
    Grzegorz

  • 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

  • Variable Substitution for File Name Scheme

    Hi all,
    Please clarify the following issue.
    I have two source fields
    Transfer Order number  -  0000000222
    Transfer Order line item - 0001
    Both i map it into one target field
    The target field output is  - 0000000222#0001
    I need a file name which starts with ABC <TranferOrderNumber>.txt
    The problem is, when i try to use payload i get output
    (ABC0000000222#0001.txt). The reason is i use the target field which was concatenated. I don't have any target field with only transfer order no.
    Please give me a solution where i would get output
    (ABC0000000222.txt).
    Thanks in advance,
    Jose Augastine

    Hi,
    Other way may be like this ..Create a one more segment in your target structure with field name as Transfer Order No. And populate only this no. And in the Reciever File adapter , in the variable sub, use only this field. But this new segment will come in the file. To avoid this, you can make use of " Cut "  Parameter in the File Content Conversion.
    This will hold good, if you have content conversion-
    /people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12
    Otherwise, you can think of Bhavesh's suggestion
    Regards,
    Moorthy

Maybe you are looking for

  • User Exit or BADI for Updating Tax code (MWSKZ) using ME21N

    Hi all, I am trying to fin out an exit or badi for Updating Tax code (MWSKZ) and Unit of Measure in transaction ME21n. The scenario is like this... For Purchase Orders Tax code will be defaulted from Purchasing info record or contract or parameter id

  • Axis adapter receiver handle fault message

    Hi We have a Sync interface which makes a Proxy call from ECC to PI 7.3 and then PI makes Soap(Axis) Sync call to Web sevice. We are having issues when handling SOAP 1.2 fault message. Below is the actual fault response from Webserver: <env:Envelope

  • Before purchase

    Dear Apple I am deaf customer to look for Apple TV. Does the Apple TV have Closed Captioning ?

  • Create materialized view throws insufficient privileges in single schema

    I'm trying to create a complex materialized view in my own schema, using only tables from my own schema: CREATE MATERIALIZED VIEW MYSCHEMA.MYMVIEW AS     SELECT         A.ONE_THING,         B.ANOTHER_THING,         C.A_THIRD_THING     FROM MYSCHEMA.T

  • Wrong values from calculated field (Java API)

    Hi All, Help me please solve the problem. We have a table with calculated text field in MDM repositor. For some records the value of this field in MDM Data Manager differs from the value returned when we read record by MDM Java API. Parameters of sys