Skip to Content
avatar image
Former Member

Dynamic configaration

I want create dynamic file name in the target system based target payload.

I think we need to create UDF for this.

My question is where we need map this UDF in mapping level

Regards,

Chandu

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • May 30, 2017 at 03:40 AM

    Hi Chandra,

    There are three option to create the dynamic file name. Dynamic configuration, Variable substitution, and operating system command.

    For your scenario, the variable substitution will work as you have derived the name from output field value. Please refer the below wiki for more details

    https://wiki.scn.sap.com/wiki/display/XI/Dynamic+file+name+and+directory+in+Receiver+File+Adapter+-+summary+of+possibilities

    regards,

    Harish

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 30, 2017 at 05:10 AM

    whenever using dynamic configuration we need to create UDF right. that time where we need to map the UDF in mapping.

    Add comment
    10|10000 characters needed characters exceeded

    • UDF is for dynamic configuration varibale. Please check the wiki, the UDF sample code is given in that

      String filename = new String("");
      DynamicConfiguration conf1 = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
      DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","FileName");
      filename = "xi_output_" + variablePart + ".xml";
      conf1.put(key1,filename);
      return variablePart;

  • May 30, 2017 at 06:20 AM

    Hi Chandu!

    As Harish has already explained you create UDF to put element value to DC and in your message mapping you can map its result to target message's root node, for example, or to variable that you create for target structure.

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 30, 2017 at 06:14 AM

    we need write Java coding ok but where we need to use in this UDF in mapping level.

    Add comment
    10|10000 characters needed characters exceeded