Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Dynamic variable to identify system env

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

replied

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!

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question