cancel
Showing results for 
Search instead for 
Did you mean: 

How to get XI host name & IP address in Message Mapping

Former Member
0 Kudos

Hi,

Does anyone have an idea how we can get XI host name & IP address dyanamically in our mapping.

Thanks in advance.

Regards,

Sarvesh

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member238007
Contributor
0 Kudos

Hi,

Please find the code below for the UDF which serves the function: to check value for the PI system id (probably use System.getProperty("SAPSYSTEMNAME")) - if the system name is PIP then the function returns u201CPu201D; otherwise the function should return u201CTu201D

String SystemID = null;

SystemID = System.getProperty("SAPSYSTEMNAME");

if (SystemID.equals("PIP"))

result.addValue("P");

else result.addValue("T");

No input is required for the UDF and also no import packages required apart from the default ones in UDFs..

regards,

Kishore

stefan_grube
Active Contributor
0 Kudos
Former Member
0 Kudos

Thanks for your replies..

I was able to get the Host Name & IP.

Regards,

Sarvesh