cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic variable to identify system env

vkaushik82
Active Participant
0 Kudos

Hello All,

I would like to know if there is any dynamic varibale which can be used in PI message mapping to indenty which env i am currently.

Like Dev, Q or Prod.

Please let me know if anyone can help.

Regards,

Vikrant

Accepted Solutions (1)

Accepted Solutions (1)

justin_santhanam
Active Contributor
0 Kudos

Vikrant,

Yes you can. Use the below UDF to achieve the same


String sysname = (String) System.getProperty("SAPSYSTEMNAME");

if(sysname.equals("D05")
{
//statement
}
else if(sysname.equals("Q05")
{
//statement
}
else
{
//statement
}

PS: In my system, I'm getting D05, Q05- You have to first write something like below to see what you are getting from your environment.

String sysname = (String) System.getProperty("SAPSYSTEMNAME");

return sysname;

Hope it helps!

vkaushik82
Active Participant
0 Kudos

Thanks a lot, it solved my problem.

Answers (0)