cancel
Showing results for 
Search instead for 
Did you mean: 

Machine/Host information available to ABAP

Former Member
0 Kudos

Would anyone know how could I find out the specs of the host where an (the current) ABAP program is running?

I know there is the SY-HOST field available to identify the host name, but I couldn’t find any other system fields.

I am interested in the following:

1) OS on machine

2) OS version

3) Memory on machine

But most importantly ...

4) The types of CPU (Brand, Model & speed)

Any help would be great! Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

athavanraja
Active Contributor
0 Kudos

Hi,

check out the class CL_GUI_FRONTEND_SERVICES and the following methods in that class.

GET_COMPUTER_NAME

GET_DESKTOP_DIRECTORY

GET_DRIVE_TYPE

GET_FREE_SPACE_FOR_DRIVE

GET_DRIVE_FREE_SPACE_MEGABYTE

GET_IP_ADDRESS

GET_PLATFORM

Regards

Raja

Former Member
0 Kudos

Thanks, Raja. That class seems to be very useful.

But that gives the information of the frontend PC. I need to know the application server information.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Sumit,

If you look at it one way, the solution to your query is quite simple. All the details that you are asking can be found via the menu path System-->Status. Now this menu is there virtually on every screen in SAP. So one would like to think that there ought to be a Function Module for that!! Now if you debug for a few seconds, you will find that the FM is <b>STATUS_ANZEIGEN</b>.

Of course this FM will have a screen which would be used to display the information. What you need to look at is the code of the FM other than the call to the screen. Just try this piece out.

DATA: BEGIN OF VERSION_INFO OCCURS 0,
        LINE(80),
      END OF VERSION_INFO.

CALL 'SAPCORE' ID 'ID' FIELD 'VERSION'
               ID 'TABLE' FIELD VERSION_INFO-*SYS*.

loop at version_info.
  write : / version_info.
endloop.

Now just don't ask me to explain you the call to the C-Function. It's a secret !!:-)

Have fun. And get back if you have trouble.

Regards,

Anand Mandalika.

ChristianFi
Active Participant
0 Kudos

Mabye there are some function modules starting with TH* which could help you.

Christian

ssimsekler
Active Contributor
0 Kudos

Hi Sumit

You can make use of following FMs

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.

Hope this helps...

Regards

*--Serdar

ssimsekler@yahoo.com

athavanraja
Active Contributor
0 Kudos

Also checkout

RFC_GET_SYSTEM_INFO