cancel
Showing results for 
Search instead for 
Did you mean: 

Easy and efficient way to set dynamic attributes

Former Member
0 Kudos

My integration scenario is quite complex involving many different receivers and an integration process. For some receivers I have to set dynamic attributes.

I know that I can set them by using a UDF, however in my case I mostly use XSLT so this is not applicable.

Is there any other way to do this relatively easy so that I can avoid Java Mappings? Problem ist that I would need to use several Java Mappings to set the attributes where no transformation to the payload itself is taking place which seems to be too much for me. Especially when I consider that these Java Mappings are hard to maintain as they have to be imported again and again if any changes occur.

So my question is:

1. Do I really have to go for several Java Mappings just to set some dynamic attributes ?

2. If so, should I use different Java Packages or is it advisable to leave all Java Mappings in one package?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Florian,

yes, you can!

set dyn atts in XSLT:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:map="java:java.util.Map" xmlns:dyn="java:com.sap.aii.mapping.api.DynamicConfiguration" xmlns:key="java:com.sap.aii.mapping.api.DynamicConfigurationKey">

....

<xsl:if test="REFERENCEQUALIFIER='MSU'">
	<xsl:variable name="dynamic-conf" select="map:get($inputparam, 'DynamicConfiguration')"></xsl:variable>
	<!--  mit dem folgenden Key-Key-Paar muss dann via UDF die Adresse aus den dyn. Attr. gelesen werden -->
		<xsl:variable name="dynamic-key" select="key:create('http://sap.com/xi/XI/System/Mail', 'MAILADRESS_SU')"></xsl:variable>
		<xsl:variable name="dummy" select="dyn:put($dynamic-conf, $dynamic-key, $MAILADRESS)"></xsl:variable>
		<xsl:comment>Mailadresse SU ermittelt: <xsl:value-of select="$MAILADRESS"></xsl:value-of>
		</xsl:comment>

Hoffe es hilft.

Grüße

Mario

Edited by: Mario Müller on Oct 15, 2009 1:47 PM

Former Member
0 Kudos

Thanks for this helpful advice!

Just one more question. What is tested here, so what means REFERENCEQUALIFIER and MSU?

:<xsl:if test="REFERENCEQUALIFIER='MSU'">

Former Member
0 Kudos

Hi,

forget:

<xsl:if test="REFERENCEQUALIFIER='MSU'">

has nothing to do with the dyn Attrs.

delete it!

Regards Mario

Answers (0)