cancel
Showing results for 
Search instead for 
Did you mean: 

Runtime Constant in XSLT :-(

SD78
Explorer
0 Kudos

Hi together,

I have one problem with constant at the runtime.

The tag <RCVPRN> is empty, but I need this for my IDoc communication.

In the SAP help stands this:

Runtime Constants

$ReceiverService

Service on the receiver side that receives the message. For example, the name of a business system.

As of SAP XI 3.0, use this constant instead of the constant RECEIVER_SYSTEM used previously.

Yes

See also: Service

If you want to access one of the constants in the XSLT program, you first have to declare the constant as a parameter, for example:

<xsl:param name="MessageId" />

In my XSLT mapping I have this:

<RCVPOR>empty</RCVPOR>

<RCVPRT>LS</RCVPRT>

<xsl:param name="ReceiverService"/>

<RCVPRN>

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

</RCVPRN>

</EDI_DC40>

But during the runtime the constant is empty

<RCVPOR>empty</RCVPOR>

<RCVPRT>LS</RCVPRT>

<RCVPRN />

</EDI_DC40>

Have you an idea for my problem?

Bye

Stefan

Accepted Solutions (1)

Accepted Solutions (1)

udo_martens
Active Contributor
0 Kudos

Hi Stefan,

plz explain more your scenario. What do you want to do with that mapping?

The EDI_DC40 fields will be overwritten anyway by the IDoc adapter. May be you looked to that result? Then mark the channel checkbox "Take receiver from payload".

Regards,

Udo

SD78
Explorer
0 Kudos

Hi Udo/all,

Thank you for your answer.

Please see in my last post:

I mark in my channel:

Take Sender from Payload and Take Receiver from Payload

I must set control field by xslt maping, because the receiver is flexible.

With your setting I became a converting error to an ALE logical system.

I need the runtime constant in the xslt mapping.

Idea?

bye

stefan

udo_martens
Active Contributor
0 Kudos

Hi Stefan,

ok, your runtime constant is obvisiosly empty and so you get "cant convert to an ALE logical system". That means, everything is working except the constant. Try to declare (element 'param') outside of template and test again.

Control mapping result in SXMB_MONI. Have a look to "Call an adapter/SOAP Header/IDoc Inbound" to check what the IDoc adapter is doing with EDI_DC40.

Regards,

Udo

SD78
Explorer
0 Kudos

Hi Udo,

It is works now

Merci

Stefan

Answers (0)