cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing runtime constants with XSLT doesn't work

Former Member
0 Kudos

Hi PI-experts,

I'm trying to insert the Message ID from my message in a XSLT Mapping. I followed the description in SAP Help:

First declare a param:

<xsl:param name="MessageId"/>

Later, use it:

<MESSAGE_ID><xsl:value-of select="$MessageId"/></MESSAGE_ID>

But the field MESSAGE_ID is always empty.

Any explanations ?

What do I need to do, to make it work ?

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

>>>What do I need to do, to make it work ?

maybe you're doing it inside a BPM...

Regards,

Michal Krawczyk

Former Member
0 Kudos

Hi Michal,

i forgot to mention, i'm doing that inside a BPM. Does that matter ?

Sven

udo_martens
Active Contributor
0 Kudos

Hi Sven,

plz read Michals blog [XI: How to... retrieve MESSAGE_ID from a BPM|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1842] [original link is broken] [original link is broken] [original link is broken];

Regards,

Udo

former_member200962
Active Contributor
0 Kudos

>

> Hi Michal,

>

> i forgot to mention, i'm doing that inside a BPM. Does that matter ?

>

> Sven

yes it matters.....you cannot access these details inside a BPM....you need to get these details outside the BPM....in the Interface Determination step of Sender ---> BPM flow.

Former Member
0 Kudos

Hi Udo,

I already read this blog and solved the problem with an added Transformation Step, but wanted to verify, why I can't seem to access the runtime contants in XSLT Mapping.

Is it correct to say, it's because the Mapping is called inside the BPM via Transformation Step? Then why does it work with Message Mapping. Seems weird.

Best Regards

Sven

former_member200962
Active Contributor
0 Kudos

The place where you have used your mapping is wrong......the mapping has to be included in the Interface Determination step of your Sender ---> BPM communication....and if using Sync call then in the response mapping program of the sync call..

Inshort ensure that the details (MESSAGE_ID) are in the message before the message enters the BPM

Regards,

Abhishek.

udo_martens
Active Contributor
0 Kudos

Hi Sven,

accessing the message id should be independend from technology (MM or XSL). It wont work inside BPM transformations, the blog recommends to pick it up before and store it in a additional (temporary) field.

Regards,

Udo

Former Member
0 Kudos

Hi Udo and all,

i have a bpm, where i first collect some messages and then execute a transformation step, which calls a XSLT Mapping to merge multiple messages into one. After this Transformation Step i added another Transformation Step, which calls a Message Mapping. This Message Mapping is a one to one mapping (every field in the source gets mapped to its twin in the target structure, both messages are the same). Only one field is changed, i wrote user-defined function as proposed in Michal's blog, retrieve the MessageID and set it to this field. I tested the BPM and it definitly works, the Message ID is set to the correct value.

Is this a different behaviour than you have experienced in the past?

I'm running on PI 7.0 with SP 16.

Best Regards

Sven

udo_martens
Active Contributor
0 Kudos

Hi Sven,

>Is this a different behaviour than you have experienced in the past?

Obvisiously, plz write a blog

Udo

Answers (0)