on 11-24-2011 2:01 PM
Dear Friends,
I want to identify the environment ( DEV, QA, PROD) the map being executed at run time to dynamically return url from java user defined function to be used in message mapping.
If you could help with some thoughts , it would be great help and appreciate it.
Thanks.
Suraj.
Hi
You can try this.
java.util.Map map = container.getTransformationParameters();
String machineName = "";
AbstractTrace trace = container.getTrace();
try{
machineName = java.net.InetAddress.getLocalHost().getHostName();
}catch (java.net.UnknownHostException e){
trace.addWarning("Can't get hostName");
}
........
Regards
Luis.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Guide to use Mapping runtime constants -http://help.sap.com/saphelp_nw04/helpdata/en/43/09b16006526e72e10000000a422035/frameset.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
another to possibility to avoid to do such a test and to hardcod URL (or another dynamic info) in your message mapping, it's to use:
- a value mapping: defined in Integration directory, and used in MM.
- or why not an Operation Mapping's parameter: defined in the Receiver Interface, and used in MM. See: the Parameterized mapping:
[|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/8654] [original link is broken] [original link is broken];.
[|http://help.sap.com/saphelp_nwpi71/helpdata/en/43/bbb7fd90f5332ee10000000a11466f/frameset.htm]
[|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/909e33f0-738c-2a10-4f87-ce73398bcf08]
regards.
mickael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suraj,
You can use Fixvalues mapping. Based on the sender function mentioned by Martin, you can further get the URL based on the Fixed Value mapping.
Regards
Krish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
in message mapping there is a function under Constants called sender or receiver which return the sender or receiver business system.
Otherwise, in a UDF you can use the Java system property SAPSYSTEMNAME which returns the SID of the SAP instance:
java.lang.System.getProperty("SAPSYSTEMNAME");
Regards, Martin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.