cancel
Showing results for 
Search instead for 
Did you mean: 

Parameterized XSLT mappings

Former Member
0 Kudos

Hello,

I've a question concerning parameterized XSLT mappings... How can I access the parameters which I've specified in the operation mapping. The SAP Help isn't very helpful at this topic. It says: "When the XSLT mapping program is implemented, you access the mapping program parameters by accessing the get and set methods of the Java mapping API in the XSLT program". But these get and set methods can only be accessed within a java mapping and not within an XSLT mapping. The relevant class InputParameters (from the Java mapping API), which should be used to access the parameters can not be used directly. So, how can I access the parameters?

I hope anybody can help.

Thanks in advance.

Best Regards,

Lars

Accepted Solutions (1)

Accepted Solutions (1)

jagdishwar_b
Active Participant
0 Kudos

you can access the parameters within an XSLT mapping:

using..

..<xls:value-of select="$SenderService"/>

...

have a look on below two links:

http://help.sap.com/saphelp_nw70/helpdata/EN/43/03fe1bdc7821ade10000000a1553f6/content.htm

http://help.sap.com/saphelp_nw70/helpdata/EN/73/f61eea1741453eb8f794e150067930/content.htm

thanks,

Jagdishwar.

Answers (2)

Answers (2)

Former Member
0 Kudos

Ckeck the below link for

XSLT Mapping with Java Enhancement

[http://help.sap.com/saphelp_nw70/helpdata/EN/43/03fe1bdc7821ade10000000a1553f6/frameset.htm]

Former Member
0 Kudos

Hi,

I think this is also not the correct solution... How should I access the Parameters which I've stored in the operations mapping? The dynamic configuration do not contain these parameters...

I've just found a blog [https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/8654] [original link is broken] [original link is broken] [original link is broken]; which handles my topic. In the section "Comment to this blog" the author give a response to the same question I had, but its unclear for me how this should work? The author links to the following SAP Help page [http://help.sap.com/saphelp_nwpi71/helpdata/en/43/cf76cb869f05f6e10000000a11466f/frameset.htm] and says: I'd mainly pay attention to step 2. under "Activities" in that help link. Basically you need to "lean" on a parameterized Java mapping. Once that's complete, you can use the XSLT with Java enhancement feature to incorporate parameters into your XSLT mapping.

But how can I transfer data from a java mapping to a following XSLT mapping? As I know there is no global container or something else where I can store the information from the java mapping...

Best regards,

Lars

Former Member
0 Kudos

have u already tried this one.

in Operation mapping create a parameter with the name param1 of type string (of type Import) and create one more parameter with the name param2 of type string (of type export).

in your xsl,

//declare the parameters.

<xsl:param name="param1"/>

<xsl:param name="param2"/>

........

//access the parameters..

<xls:value-of select="$param1"/>

<xls:value-of select="$param2"/>

Former Member
0 Kudos

hi, guy. did you resolve this issue? I got the same question.....

Former Member
0 Kudos

Hello,

no, I haven't solved the problem... I think currently it is not possible to use dynamic parameters from the operations mapping within an XSLT mapping.

I've searched within SDN and SAP Help regarding this issue and haven't found a satisfying solution.

Perhaps some guys from SAP can help us...

Best Regards,

Lars

former_member200962
Active Contributor
0 Kudos

The XSLT mapping that you implement should have a refernce to a JAVA mapping (which is actually getting the values from ID)

There is a blog on XSLT mapping using JAVA Enhancement......you can refer that.

Standalone Parameterized Message and JAVA mapping is possible but not XSLT mapping. For Parameterized to work JAVA mapping has to be included.....not other way out at least till now.

Regards,

Abhishek.

Former Member
0 Kudos

Hi Abhishek,

thanks for the reply... But unfortunatley I have a problem to reference a Java mapping from an XSLT mapping. How can I do this?

Regards,

Lars

former_member181962
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi,

sorry to say this, but as I have tried, this won't slove my problem. I will not access the standard system parameters. I try to access the parameters which I can define in an Operation Mapping (SAP PI 7.1 and higher) and set the values about the configuration. These parameters, as I know, can't be accessed in such an easy way... Exactly this is my problem...

Hope that I can get a hint how to access these "selfdefined" parameters...

Best Regards,

Lars