File name in FCC receiver adapter

How to do this ?
The filename will have the following format:
AAAAAA_BBBB_CCCCCCCC_DDDDDD
Where: AAAAAA  First 6 digits of first  field
BBBB  4 digit  Company Code second field
CCCCCCCC  Current system date in YYYYMMDD format
DDDDDD  Current system time in HHMMSS format.

If you go with Variable substitution, certain things are not possible such as "AAAAAA  First 6 digits of first  field".
However below wiki covers all the possibilities.. please check..
Dynamic file name and directory in Receiver File Adapter - summary of possibilities - Process Integration - SCN Wiki

Similar Messages

  • 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

  • How can I convert my specific file content in the Receiver Adapter(XI 7.0)?

    Hi all,
    I have a document structure as below:
    <MT_MATERIAL>
       <MATERIAL>
             <WERKS>1000</WERKS>
             <MATNR>HAD_00001</MATNR>
             <MAKTX>CHEMICAL MATERIAL</MAKTX>
       </MATERIAL>
    </MT_MATERIAL>
    This document structure is the file content in the Receiver Adapter (File Adapter). In the 'Content Conversion' tab of File Adapter of Communication Channel 'CC_OUT_MATERIAL_FILE', I have configured the parameters as below:
    Recordset Structure: MATERIAL
    MT_MATERIAL.fieldSeparator: '
    MT_MATERIAL.endSeparator: 'nl'
    MATERIAL.fieldSeparator: '
    MATERIAL.endSeparator: 'nl'
    *.fieldSeparator: ,
    But, this Communication Channel 'CC_OUT_MATERIAL_FILE' (in the Runtime WorkBench/Component Monitoring/Adapter Engine/Communication Channel Monitoring) is error with the error message as below:
    Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter '.fieldFixedLengths' or '.fieldSeparator' is missing
    Could anyone please help me to correct this error, how should i configure the parameters in the 'Content Conversion' tab?
    Thanks a lot in advance,
    Vinh Vo

    Hi Vinho,
    Introduction to simple(File-XI-File)scenario and complete walk through for starters(Part1)
    Introduction to simple (File-XI-File)scenario and complete walk through for starters(Part2)
    Have a look at the this blog by Arpit Seth ... its all about FCC at receiver side...
    File Receiver with Content Conversion
    Also have a look at this thread.. might be helps you....
    RECEIVER file CONTENT CONVERSION
    Above links be helpful.
    Regards,
    Jayasimha Jangam

  • How to find the File name using the FTP Adapter

    hi all,
    how to find the File name using the FTP Adapter with BPEL.
    Regards

    Found the solution for this.
    First In the mediator's routing rule use assign property $in.property.jca.file.FileName to $out.property.jca.file.FileName
    In the BPEL's receive activity go to the properties tab and get the property to a BPEL variable. That should do it.
    Thanks for the posts

  • 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.

  • Target Directory & File Name parameters in Receiver File Adapter with ASMA

    Hi Experts..
    I have the following question....
    What am I suppose to inform in the Target Directory & File Name obligatory parameters in Receiver File Adapter if I am using ASMA to fill it? Is it any dummy value?
    Also, if you have any step by step guide/blog to forward on how to use ASMA in file adapter I will be greatful.
    Thanks in advance,
    Daniela

    You can give any dummy value in dir and file name... Just go through these blogs
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    /people/madanmohan.agrawal/blog/2009/05/20/combining-three-different-aspects-of-pi-asma-af-module-and-variable-substitution-in-one-shot

  • 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

  • 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

  • PI 7.11 - FCC Receiver Adapter

    Hi
    I've got a simple xml which i have to convert in a fixed length text file. Is it possible to convert it using FCC with following structure:
              <root>
                   <data>
                        <record>
                             <name>john</name>
                             <surname>doe</surname>
                             <zip>12345</zip>
                             <city>abcd</city>
                        </record>
                        <record>
                             <name>bart</name>
                             <surname>simpson</surname>
                             <zip>131313</zip>
                             <city>springfield</city>
                        </record>
                   </data>
              </root>
    I did this conversion already with PI 7.0, but i removed the <data> element to get a simpler substructure. Is it also possible without removing this?
    I found following entry [Re: File Adapter Reciver Side: FCC Convetion Problum in PI 7.1], but it didn't works for me. Any suggestions?
    Thanks in advance
    Michael

    Hi,
      Are you looking for a content conversion at teh Receiver adapter or the sender adapter?
    If you have defined teh structure in ur Data type as u have mentioned then don't remove anything because ur source file would be containing the following structure itself.
    If you are getting the XML structure at source
    <root>
       <data>
          <record>
                   <item1>
                   <item2>
          </record>
       </data>
    </root>
    the follow the same structure at the receiver side as well. If u want to delete the data node at teh receiver side then delete at teh source side FCC as well.
    Just try and let me know. I will help you out.
    Thanks
    Veeru

  • 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

  • Hadeling multiple files in sender and receiver adapter

    Hi ,
    In my sender FTP server multiple files gets created at a same time i want to send this same files to the target FTP server am not doing any file content conversion. Just pick this multiple files at a single poll and drop it in the target FTP system.
    I gave . in the as file name parameter in the sender file adapter..PI system picks all the files as separate message but if i give . in the receiver adapter itu2019s not creating the file and its giving Java exception..
    Is there any other method to do this without having File content conversion... ?
    Regards
    Shakfie

    I gave *.* in the as file name parameter in the sender file adapter..PI system picks all the files as separate message but if i give *.* in the receiver adapter itu2019s not creating the file and its giving Java exception..
    For receiver adapter you have to give some file name, '.' will not work for receiver adapter. So give any temporary name just to satisfy the mandatory field. And when you selet the ASMA settings in both SENDER & RECEIVER adapter then your Receiver File adapter will write the same file name which it has picked up and NOT the one which you have written in your receiver adapter.
    Note: Set ASMA setting in both else you will not get the same file name at receiver. You can see the same in blog given by Siva. You need not to create any UDF since you are not using any mapping. Just use the ASMA settings.. that's it.
    > Is there any other method to do this without having File content conversion... ?
    You can go through this blog for the same...
    /people/william.li/blog/2006/09/08/how-to-send-any-data-even-binary-through-xi-without-using-the-integration-repository
    Regards,
    Sarvesh

  • 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

  • File Content Conversion in Receiver Adapter Help

    Hi,
    I need to have a flat file at receiver side with the following structure.
    Product
    LineItem
    Notes
    Product
    LineItem
    Notes
    But i am getting as
    Product
    Product
    LineItem
    Notes
    Notes
    Please suggest me the changes to be made in File Content Conversion Parameter
    Your Help will be appreciated.
    Thanks in advance,
    Ashok

    Singh,
    I think we wont give field names in the receiver file adapter. Please find the details below:
    RecordSet Structure: Product,LineItem,Notes.....
    Parameters:
    Product.fieldFixedLengths:30,10...
    Product.endSeparator:'nl'
    LineItem.fieldFixedLengths:30,10..
    LineItem.endSeparator:'nl'
    Notes.fieldFixedLengths:30,10...
    Notes.endSeparator: 'nl'
    Thanks
    Ashok

  • File name issue in mail adapter attachement.

    HI all,
    i built a scenario proxy to mail in which the data will be sent as attachement to the mail id coming from proxy it self.
    I added the transform bean and xi mail adapter bean correctly..
    The scenario is working fine without errors...
    however the issue is. i have given the file name in for module key :
    Transform =   Transform.ContentDisposition =   attachement;filename="xyz.csv"
    but while testing the attachement is coming as "untitled.txt"
    i need the attachement to be named as "xyz.csv" only.
    where went wrong ...please give ur inputs.
    Thanx.

    Hi Kiran
    Then there is no need to use Transformation bean for this
    In Mapping map the mail package Content_type field with
    text/plain;name="xyz.csv"
    and select mail package and keep attachments in receiver mail adapter
    This will work
    Thanks
    Gaurav

  • 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

Maybe you are looking for

  • What is the best way to open close and pass instrument handles from labview in teststand parallel model?

    I have a number of test systems that use a parallel model with labview. We have a good number of instruments(PXI). What is the prefered method for open,closing and passing instrument handles in teststand using labview?  Solved! Go to Solution.

  • Late 2011 Macbook Pro loud fan at 30% cpu usage...

    Im new to to MBP (about 2 a month and half now...) and its whisper quiet when idle or in the first hour ive started using it... but after writing papers or surfing for a few hours the fan kicks on and its surprisingly loud!  My CPU isnt above 30%, an

  • Record count not matching when using HS while querying.

    Hello, We are using 10gr2. I created a Database link connecting to lotus notes using HETROGENEOUS SERVICES and ODBC. When we query the table in Lotus Notes using database link oracle is showing less records. For example. Lotus Notes database have a t

  • Photo album in cs3 dreamweaver

    I am trying to create a photo album on my website in dreamweaver and cannot...what are my easiest choices on building that ... CS3 program

  • Adobe Reader Pro -

    Hello, I have signed into our trial account of the Adobe Reader Pro- I have selected a PDF Document to Convert to Excel.... Once I click on CONVERT I get the message An Error Occurred while signing in.... However I have signed in ok and been able to