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

Hi,
Does anyone have an idea how we can get XI host name & IP address dyanamically in our mapping.
Thanks in advance.
Regards,
Sarvesh

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

Similar Messages

  • How to get a host-name representing a WebLogic cluster

    Hi guys,
    We are using weblogic to deploy a service. Service uses the below property to connect on managed port and get datasource informations
    PROVIDER_URL=t3://abc.com:20005
    Now this is fine but in PRODUCTION we have cluster who have 2 machines-manged server (mt1 and mt2) on which service is deployed. 
    Now what could be the PROVIDER_URL value inside the service code? we can't choose any of the mt1 (or mt2) as if that server down then service will not respond. We need to use a kind of abstarct host name so that this t3:// access
    always will be there. In the env we have LBR but that is an OHS which listen http only. Can any body tell me how to fix this issue?
    Thanks in advance.

    Here you can find some examples:
    Oracle Fusion Middleware Programming JNDI for Oracle WebLogic Server - 11g Release 1 (10.3.6)
    Best Regards
    Luz

  • How to get PC host name using labview

    hi,
    I have a need to display the pc host name(login name) in my application. How can i get it using labview in runtime i.e. if i write a program and execute it in different PC systems/same system with different users, then i should get the corresponding login names.
    Can any one help me on this?
    Thanks,
    Regards,
    Arvinth
    Solved!
    Go to Solution.

    Well, the PC host name and the login name are two different things, so which one are you trying to get? Darin's snippet gives you the login name. If you want the PC name use this method.

  • How to get the Host name of Unix server

    Hi all,
    I am need to use the Host name of application server for some purpose.
    where can i see the host name of the unix server ?

    SYST-HOST or SY-HOST contain the name of the application server.
    You may also use the following internal call to get the actual application server
      call 'C_SAPGPARAM'
         id 'NAME'  field 'rdisp/myname'
         id 'VALUE' field servername.
    For the IP adress
      CALL FUNCTION 'DB_DBRELINFO'
        IMPORTING
          dbinfo = dbinfo.
      READ TABLE kernel_version INDEX 11.
      kinfostruc-ip_address = kernel_version-data.
    Regards

  • How to get the Host name and port number

    Hi all,
    I am working in xRPM. I need to get the server name, host name & port number for the portal and i need to diaplay as a link in the Workflow step. I cant give the portal link as static, as it will vary depends on the DEV, QUAL, PROD. Is there any FM or class is available, so i can get the server name, port no. for my purpose?.
    Regards,
    Vinoth

    Hi Kanagaraja,
    My client has configured the portal and backend in different stack. So when i execute the FM you provided and with class: CL_HTTP_SERVER, CL_WD_UTILITIES, i am getting only the backend host name and port no. not the portal's info. So please help is there any way we can get the portal's info.
    Thanks for your reply.
    -Vinoth

  • How can I get the host name from Email address?

    hi
    When I using socket to develope an email-sending servlet,I don't know how to get the host name from emial address.can you help me,thanks

    Stripping off the user name will give you the domain of from field in the message. This is not the same as the host. Take a look at:
    http://www.stopspam.org/email/headers/headers.html
    Theres a pretty good discussion about email headers and how to use the information. You probably want to check the information here against the RFC.
    Sean

  • How to get the country name from IP address?

    Hello All,
    I am able get the IP address of the visitors by using
    String ipAddress = request.getRemoteAddr(); .
    I'm also getting the host name by using
    InetAddress iaddress = InetAddress.getByName( ipAddress );
              String ipaddr = iaddress.getHostName();
    But... I'm not able to find the Country's name from which that IP is coming from.
    Is there any class in JAVA that will help me find the respective country's name??
    Thank u!!!

    There is no magic way to tell country from IP address. You can guesstimate the country using a IP-to-country mapping database, with some accuracy.
    I use the free version of the GeoIP (google for it) database; it is a file that you download, and they have a Java API or you can roll your own. They also have better quality databases for a fee, and apparently a web service. I prefer a file because it's faster and more reliable to check against a memory data structure than to make a long distance TCP/IP call. The web service isn't magic either; it is just an interface to the same database, and it doesn't give 100% accuracy, nothing will. If you use the file you may want to make it a monthly to-do item to download the latest version. There are other similar databases around too; google for "geolocation".

  • How can i get my system name / IP address in JAVA

    Hi i need to get the system name / IP address of the machine where the JAVA program is running. Please help me in this.

    Try this
    java.net.InetAddress addr = java.net.InetAddress.getLocalHost();
    System.out.println(addr.getCanonicalHostName());
    System.out.println(addr.getHostName());
    System.out.println(addr.getHostAddress());Col

  • How to resolve a host name from IP using JNDI/DNS service provider

    Hi
    I got two questions on JNDI/DNS service provider:
    1) How to resolve a host name when i got an IP
    I understand How I do it inverse.
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.dns.DnsContextFactory");
    env.put(Context.PROVIDER_URL, "dns://"+server+"/"+domain);
    DirContext ictx = new InitialDirContext(env);
    Attributes attrs1 = ictx.getAttributes(host, new String[] {"A"});
    2) This example above works when I specify the domain in the provider url.
    If I am not specifing a domain but only the dns server I got an NameNotFoundException.
    What should I do if I don't got the domain?
    get the availible domains and loop on them?

    Hi,
    if your DNS server supports that, you can do a reverse DNS lookup. This works as follows:
    String server = "your.dns.server";
    String domain = "in-addr.arpa";
    String ip = "4.3.2.1";
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.dns.DnsContextFactory");
    env.put(Context.PROVIDER_URL, "dns://" + server + "/" + domain);
    DirContext ictx = new InitialDirContext(env);
    Attributes attrs1 = ictx.getAttributes(ip, new String[] {"PTR"});1: Use the pseudo-domain in-addr.arpa
    2: Use the reverse IP address for lookup, i.e. if your host has 1.2.3.4, use 4.3.2.1!!
    3: Request the PTR attribute
    see also [http://en.wikipedia.org/wiki/Reverse_DNS_lookup|http://en.wikipedia.org/wiki/Reverse_DNS_lookup]
    Martin

  • Get Client Host Name

    Dear Experts,
    I am using
    String ipAddress = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getClientHostAddress();
    retrieve client ip address.
    When I use getClientHostName(), it still present client ip address.
    Regarding the client hostname, how do I get it?
    thank you.
    Regards,
    Weng

    Use this
    String hostName = WDProtocolAdapter.getProtocolAdapter().
    getRequestObject().getClientHostName();
    You also have one more method to get IP address.
    String Address = WDProtocolAdapter.getProtocolAdapter().
    getRequestObject().getClientHostAddress() ;
    for more check this forum link
    How to get the system name of the client?
    thanks

  • How to get or change the ip address of MAXDB database node ?

    Good morning,
    I am having a problem configuring a sap server that is running on a SUSE enterprise linux VMWARE image, the image itself is delivered paused with the server running already but when i shut it down to change hardware configuration and then restart it, the sap server doesnt start, the startsap command gives the error "DB startup failed" i traced the  startdb.log file and found that it "failed to connect to server socket" after more searching i found out that it is possible that the ip defined in the /etc/hosts file for my node is getting changed after restart since i am able to start the database itself using dbmcli command the problem is still connecting to the node, i would like to know how to get the newly assigned ip address for the node so i can put it in the hosts file or a way to keep its ip static between restarts of the OS, any help is appreciated.

    Hi,
    This is SAP Business one system administration forum. Please find correct forum and re-post your discussion to get quick reply.
    Please close this thread by marking helpful answer.
    Thanks & Regards,
    Nagarajan

  • How to get the remote user IP address if behind the proxy or firewall

    Hi
    How do i get the remote user Ip address who is invoking the servlet behind from a firewall.
    When i use getRemoteHostAddr it gives the proxy ip address not the actuall user host address... Kindly let me know how to get the actual user ip address
    satish

    There is no reliable way to determine the original IP, and such information is not useful to you if the original IP is behind a firewall. What do you propose to use it for? There is probably an alternative way to do things that does not require the remote IP.

  • How to get a computer name in teststand step ?

    how to get a computer name in teststand step ?

    Hi,
    Use an ActiveX Automation Adapter with the following settings,
    ActiveX Reference : RunState.Engine
    Automation Server: TestStand API (depends on your version)
    Object Class: Engine (IEngine)
    Action: Get Property
    Property: ComputerName
    Then set your Parameters: to pickup the String ComputerName.
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • How to get the Text name to pass in the  parameter header in save_text

    Hi,
      I am trying to change the long text of operation for historical order by using the flat file.I am using the save_text to do this.I would like to know how  to get the text name in order to pass the parameter header in save_text.
      I went to the tcode iw62 to get the header information of the long text.300100000009200000001
    i would like to know what this 1000000092 indicates and where is this value updated in the table so that i can link it thru the order no  to get the link and pass it in the text_name.
      can anyone help me out?
    krishnan

    Hi,
    Your query is.
    I went to the tcode iw62 to get the header information of the long text.300100000009200000001
    i would like to know what this 1000000092 indicates
    In above number
    300 - Client
    1000000092 - AUFPL - Routing number of operations in the order (You can fetch this from table HIVG)
    00000001 - APLZL - General counter for order ( You can fetch this from table HIVG).
    BR,
    Vijay

  • How to get the specific name of the workset which is currently selected by the user in sap portal 7.0

    Dear Expert,
    I have one requirement like to read the selected workset name in portal by the current user.I have read two documents regarding how to retrieve the PCD contents (iViews, Pages, Worksets and Roles) and its properties like Created by, Changed by, Last changed by and others using PCD API.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/6112ecb7-0a01-0010-ef90-941c70c9e401?overridelayout=true
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/508baf88-9335-2d10-efa6-c6ad61e5fc4b?quicklink=index&overridelayout=true
    But I am not able to understand how to get the specific name of the workset which is currently selected by the user.Can you please help me.
    I am using portal 7.0.
    Thanks & Regards,
    Patralekha

    Hi Expert,
    I found that we can use Interface INavigationHelperService to read Portal Role selected by user at runtime from http://scn.sap.com/thread/52194
    But this class is available in SAP NetWeaver 7.30 Enterprise Portal .
    But in SAP NetWeaver 7.0 Enterprise Portal that interface is not available.
    INavigationService is available there.
    But didn't get any proper discussion on this interface for the same requirement.
    Can you please help me.
    Thanks & Regards,
    Patralekha

Maybe you are looking for