2009 Jun 02 2:06 PM
Hi Experts,
Need a Function Module which can give me the current Server Name and Client name .
Please help me out.
Thanks
Chandan
Hi Experts,
Need a Function Module which can give me the current Server Name and Client name .
Please help me out.
Thanks
Chandan
2009 Jun 02 2:16 PM
sy-sysid is client name
Sy-HOST is current Server
check in syst table you will get all the system details..
2009 Jun 02 2:20 PM
2009 Jun 02 2:22 PM
Hi,
Check out :
1. "FIND_DB_APPLICATION_SERVER" gives the server name via the export parameter "SERVERNAME" .
2. "TH_GET_ACTIVE_SERVER" gives the server name via the export parameter "SERVER" .
3. "RFC_GET_LOCAL_SERVERS" will give a list containing some info about servers, then you can use the FM "TH_USER_INFO" to get user's host address from the exporting parameter "HOSTADDR". Then you can look-up the list you retrieved by the first FM where the first four characters at the field "HOSTADR" is the same with the user's. The server name is contained at the field "NAME" of the same row.
4. sy-sysid might also be usefull
5. Try this too:
CALL 'C_SAPGPARAM'
ID 'NAME' FIELD 'rdisp/myname'
ID 'VALUE' FIELD ev_server_name.
where ev_server_name is function module export parameter of type BTCTGTSRVR-SRVNAME.
Hope it helps
Best Regards
Sumana
2009 Jun 02 2:26 PM
Hi,
Please check in syst table.
You will find your server name as well as host name.
Regards,
Nikhil.
2009 Jun 02 2:35 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |