cancel
Showing results for 
Search instead for 
Did you mean: 

SAP PI 7.1: How to read Variable in UDF?

Former Member
0 Kudos

Hi everybody,

how can I read a variable within a UDF in 7.1?

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/909e33f0-738c-2a10-4f87-ce73398b...

does not help

Thanks

Regards Mario

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks!

Former Member
0 Kudos

Hi,

If you defined a variable in your target structure and wish to use this variable in some user defined function, then you should just use it as a regular parameter to this user defined function!

Remember you can drag your target nodes to the current mapping of a given node - this also includes variables.

Regards,

Daniel

Former Member
0 Kudos

Hi Daniel,

my purpose was to read the variable directly in the UDF.

The way you mention is to read it (via drag&drop) and treat it as an UDF-inputparameter .

As my UDF already has already 8 inputvariables I am looking for a way to reduce the the inputparameters via reading the variables directly in the UDF.

Thanks

Regards Mario

Former Member
0 Kudos

Hi,

This is not possible as per my understanding. Also, I don't see why you would wanna do it that way. You then make it less apparent what is happening in your function.

But you can always use the Java Area in a similar way as previous releases to create global variables and then set/get their values using simple user-defined functions. This way u can achieve what u want.

Regards,

Daniel