Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Server Name and Client Name

Former Member
0 Likes
8,636

Hi Experts,

Need a Function Module which can give me the current Server Name and Client name .

Please help me out.

Thanks

Chandan

For Server name FM is DB_DBHOST

5 REPLIES 5
Read only

Former Member
0 Likes
2,720

sy-sysid is client name

Sy-HOST is current Server

check in syst table you will get all the system details..

Read only

Former Member
0 Likes
2,720

For Server name FM is DB_DBHOST

Read only

Former Member
0 Likes
2,720

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

Read only

Former Member
0 Likes
2,720

Hi,

Please check in syst table.

You will find your server name as well as host name.

Regards,

Nikhil.

Read only

Former Member
0 Likes
2,720

Thanks for the response.