on 05-17-2011 8:44 AM
Hi,
I'm looking for a solution (not using mail package) for using data from the payload and putting it in the subject line..
Edited by: Zevik Heinoch on May 17, 2011 1:32 PM
Hi,
To set the subject dynamically first set the Adapter specific message attributes in the UDF
public String setSubject(String var1, Container container) throws StreamTransformationException{
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey parmValue;
parmValue = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/Mail", "THeaderSUBJECT");
conf.put(parmValue, var3);
return var1;
}
In the receiver mail communication channel, go to advanced tab and tick the option of Use Adapter specific Message attributes and the Variable transport binding.
and enter under Variable header 1: THeaderSUBJECT
By this you can have the value from payload as you mail subject.
Regards,
Aravind
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
When you use this UDF in the graphicall mapping. you can mapp any one of the required field as the input to this function. So in the code var1 will hold its value.
Sorry, it was a mistake in the above code, instead of var3 its var1
parmValue = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/Mail", "THeaderSUBJECT");
conf.put(parmValue, var1);
Regards,
Aravind
Hello all,
I have a scenario: Idoc (ORDERS) -> XI/PI -> Mail. I have to retrieve data from the payload and putting it in the subject line. For this scenario I don't have message mapping. How can I do this? thx.
best regards,
Fanglin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had used the below excellent blog by Stefan to generate mail using java mapping.
/people/stefan.grube/blog/2007/04/17/xi-mail-adapter-an-approach-for-sending-emails-with-attachment-with-help-of-java-mapping
Where yo uwould be having flexibility in setting any mail attributes...
--Divyesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
check this link [http://help.sap.com/saphelp_nw04/helpdata/en/6b/4493404f673028e10000000a1550b0/frameset.htm]
use an udf for adapter specific message attributes and set the one mentioned there THeaderTO
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.