Skip to Content
0

Source File name passing to Traget field name

May 09 at 10:03 AM

20

avatar image

Hi Experts ,

I am having one requirement to read the source filename and pass this value to Target field name.

I used Dynamic configuration UDF :

  String FileValue = "";
  try{
    //Get the DynamicConfiguration instance
    DynamicConfiguration config = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
  
    //Define key to read from the Dynamic Configuration
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
  
    //Read the FileName parameter from the Dynamic Configuration based on the key
  String filename = conf.get(key);
  }catch(Exception ee)
{
    FileValue = "";
  }
  return FileValue;

I am getting an error like while activating mapping :

String filename = conf.get(key) is not valid .

Can anyone suggest, how to fix this.

Best , Shiva

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Vivek Jain May 09 at 10:20 AM
0

Hi Shiva,

It should be conf.get(key1)

Regards,

Vivek Jain

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Sorry , should be config.get(key1);

Regards,

Vivek Jain

0