cancel
Showing results for 
Search instead for 
Did you mean: 

Multi-Mapping and Dynamic Configuration

Former Member
0 Kudos

Hello,

Is it possible to use dynamic configuration in mulltip-mapping? (message split?)

in a proxy-mail scenario I am using a multi-mapping. The message gets splited by a specif field.

(Field of source message-SplitByValue(Value Change)-CollapseCOntext->Target Message(1..N)

WIthin the graphical mapping I have a dynamic configuration for the "Mail Subject"

DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey keySubj = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/Mail", "THeaderSUBJECT");

conf.put(keySubj, pSubject);

return pSubject ;

I have mapped this field to a field in the target message.

The messages are being splitted as expected and the value of pSubject is also correct.

BUT when receiving emails the subject field has the same value for all splitted messages.

My Question is "conf.put(keySubj, pSubject);" overwitting all splitted outgoing messages?

Thanks for the Help

EMW

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

This is not possible.

The multi message header is not transported to the individual headers of the single messages, those are created in adapter framework and do not inherit the dynamic configuration headers.

You can only put values in the individual headers with help of an adapter module, when the value is still in the payload after the mapping.

Regards

Stefan

henrique_pinto
Active Contributor
0 Kudos

As stated in http://help.sap.com/saphelp_nw70/helpdata/EN/43/09b16006526e72e10000000a422035/frameset.htm

Adapter-Specific Attributes and Multi-Mappings

In multi-mappings, there are multiple message headers with adapter-specific attributes. The mapping API can only access one message header. This has the following consequences depending on whether there are multiple source or target messages:

● 1:n Transformation

If there are multiple target messages, the header for the adapter-specific attributes is copied for each message. This means that you can only create one header for all adapter-specific attributes, and not individual headers.

● n:1 Transformation

This variant is only possible for multi-mappings in integration processes. If there is more than one source message, read-access to the adapter-specific attributes of the various message headers is not possible at runtime.

● m:n Transformation

All afore-mentioned restrictions apply here. Developers can at most write the same adapter-specific attributes for all target messages to the header, without read-access to the attributes of the source messages. m:n transformations are only supported within integration processes.

Regards,

Henrique.

Answers (1)

Answers (1)

Former Member
0 Kudos

Thanks

Former Member
0 Kudos

had the same problem and hit on this ..

[http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3414700)ID1461496650DB11812195761888750468End?blog=/pub/wlg/4623]