cancel
Showing results for 
Search instead for 
Did you mean: 

Set adapter specific message attribute in graphical mapping

Former Member
0 Kudos

Hi,

I'm trying to set the mail reply to field in email messages sent by mail receiver adapter.

To do this, I use the ASMA and developped my own UDF

public String setMailFrom(String mailFrom, Container container) throws StreamTransformationException{

DynamicConfiguration conf = (DynamicConfiguration) container

.getTransformationParameters()

.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey key = DynamicConfigurationKey.create(

"http://sap.com/xi/XI/System/Mail",

"THeaderREPLY-TO");

String valueOld = conf.get(key);

if (valueOld != null) {

String valueNew = mailFrom;

conf.put(key, valueNew);

}

return mailFrom;

}

This works but I needed to asign the result of the udf to a node of my target message in order for the udf to be called.

Is there a way to call a UDF without assigning the result to anything in the target message....

Is there a better way to modify the ASMA than using a UDF in a mapping.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Shabarish_Nair
Active Contributor
0 Kudos

assign it to the root node of the target message.

Also use exceptions in your code so that you can do independent testing.

Additional ref:

/people/shabarish.vijayakumar/blog/2009/03/26/dynamic-configuration-vs-variable-substitution--the-ultimate-battle-for-the-file-name

Answers (0)