cancel
Showing results for 
Search instead for 
Did you mean: 

Parameterized XSLT Mappings

Former Member
0 Kudos

Hello,

I'm trying to implement a Parameterized XSLT Mapping. But in the documention is a gap (see http://help.sap.com/saphelp_nwpi711/helpdata/en/43/bbb7fd90f5332ee10000000a11466f/frameset.htm). In Action 2 is written:

"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 (see also: XSLT Mapping with Java Enhancement, Parameterized Java Mappings)."

But when I follow the link of " XSLT Mapping with Java Enhancement " the example only shows the acces to the StreamTransformationConstants which do not contain the user parameters. How can I access the Importparameters, which I have defined in the binding in Operationmapping in my XSLT? Is ther a well working Java routine available, which could be called in the XSLT?

I have already working examples for pure ParameterizedJava Mapping and graphical Mapping but I'm missing this XSLT stuff

Kind regards

Manfred Schmidt-Voigt

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I just found the same question more than 1 Year ago ( ). But without a real answer to that question. Only the normal replies from people, guessing that they have understood the question.

So, This problem is not solved yet? Has nobody a real solution for that? Has SAP replied something about that more specific?

I would realy have a solution for that, because sometimes it makes life more easy if you can reuse mappings without copying them only to replace a constant or so.

Kind regards

Manfred Schmidt-Voigt

Former Member
0 Kudos

Something wrong with that question?

Nobody has done it?

Nobody needs it?

Greets

Manfred Schmidt-Voigt

Former Member
0 Kudos

Hi,

same findings here. We've followed the topic for a year too now, and chance has it that I've just spent 1,5 days trying to get this to work. The only reserved xsl parameter that is documented by SAP is the inputparam, which gives you access to the runtime constants, but not the parameters. With this parameter I've called a Java class (still according to the SAP Library), but I've not been able to reach the mapping parameters in memory.

I've 2 more options which I haven't the time now to explore:

- Call the XSLT from a Java mapping. We do have (well documented) access to mapping program parameters in a Java mapping

- Try to read the mapping program parameters from the InputAttachment, which is accessible through the StreamTransformationConstants.

I'm keeping an eye open on this one.. good luck !

kr,

Peter Glas

Former Member
0 Kudos

Thank you for the answer. But I thought there must be a simpler solution according to the saphelp. I have tried the different methods to access the parameters (get...) in a java function called from the XSLT, but I allways failed on passing the payload including the defined User Parameters. I didn't get the trick.

Maybe somebody from SAP, who is involved in such projects, can answer this.

Kind regards

Manfred Schmidt-Voigt

Former Member
0 Kudos

Hi Manfred,

I've written a [blog on an alternative using the java mapping|/people/peter.glas3/blog/2010/09/08/pi-parameterized-xslt--a-flexible-alternative ]. Thought this might interest you. It's complete with code ^^

kr,

Peter Glas

Former Member
0 Kudos

Hi Peter,

sorry for answering late but I had my yearly vacation.

Your solution solves my problem. I have tried it. So you got my points. Maybe this will help you!

Thanks again

Manfred

Answers (0)