Skip to Content
avatar image
Former Member

Filename should Pick dynamically from Mapping

Hi All,

I have to pick file name from the mapping , where i will give file name as customer id and invoice and current date, so what should i do in this case , what should i do in communication channel , please help me in that it is very urgent

thanking you

srdhar

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Apr 21, 2008 at 03:15 AM

    hi

    refer these

    Problem in dynamic file name in File reciever adapater

    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14

    /people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping

    write the UDF in mapping for the same and also use the adapter specific message attribute in the file communication channel.

    rgds

    Arun

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Sridhar,

      You have to go through the below blog for the settings in the receiver adapter.

      /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14

      The code in the UDF should be like this

      DyanmicConfiguration conf = (DynamicConfiguration)container.getTransforamtionParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

      DynamicConfigurationKey Key = DynamicConfigurationKey.create ("http://sap.com/xi/XI/System/File", "FileName");

      *Create the string file name required by you

      for ex:*

      String sfileName = CustID + Invoice+..;

      Put the file name in

      conf.put(Key, Sfilename);

      Regards,

      Krishnaraju