10-19-2007 6:39 PM
Hi to all
I need to read all the information of the Local machie, like IP address, DNS, WINS, file system, RAM memory, VM,, Processor, Operating System, C drive, etc...
My machine is Windows, and I think read the registers, (the registers that I view in regedit.exe).. But,... I don´t know with wath FM I can read this information,.
Someboy knows how to extract this information ?
thank you very much
Dario Rodriguez.
10-19-2007 6:42 PM
use this FM <b>SYSTEM_INFO</b>
this works in program, directly you can't run it.
if you see this FM you can understand how to pass get the parameters which you need..
if you want version then you need to pass 'SAP_VERSION' to key, you will get the value. like that all the data....
function SYSTEM_INFO.
*"----
""Lokale Schnittstelle:
*" IMPORTING
*" VALUE(KEY) TYPE CLIKE
*" EXPORTING
*" VALUE(VALUE) TYPE SIMPLE
*"----
data : begin of TAB occurs 20,
KEY(21),
VALUE(69),
end of TAB.
case KEY.
when 'SAP_VERSION'.
TAB-KEY = 'SAP version'. "#EC NOTEXT
when 'SAP_SYSTEM_ID'.
TAB-KEY = 'SAP system id'. "#EC NOTEXT
when 'OPSYS'.
TAB-KEY = 'operating system'. "#EC NOTEXT
when 'MACHINE_TYPE'.
TAB-KEY = 'machine type'. "#EC NOTEXT
when 'DBSYS'.
TAB-KEY = 'database system'. "#EC NOTEXT
when 'DBNAME'.
TAB-KEY = 'database name'. "#EC NOTEXT
when 'DBUSER'.
TAB-KEY = 'database owner'. "#EC NOTEXT
when 'DBHOST'.
TAB-KEY = 'database host'. "#EC NOTEXT
when 'CTYPE'.
TAB-KEY = 'LC_CTYPE'. "#EC NOTEXT
when 'OPSYS_VERSION'.
TAB-KEY = 'OP system release'. "#EC NOTEXT
when 'KERNEL_KIND'.
TAB-KEY = 'kernel kind'. "#EC NOTEXT
when others.
VALUE = SPACE.
endcase.
if TAB-KEY <> SPACE.
call 'SAPCORE' id 'ID' field 'VERSION'
id 'TABLE' field TAB-SYS.
read table TAB with key KEY = TAB-KEY.
if SY-SUBRC = 0.
VALUE = TAB-VALUE.
endif.
endif.
endfunction.
Thanks & Regards
ilesh 24x7
10-22-2007 5:41 PM
Thank you very much,.
But, I need information of the presentation layer, of the user,..
The function SAPCORE, get information of the application server, but I need the informacion of the user.
Thank you very much.
Regards.
Dario Rodriguez.
10-22-2007 6:03 PM
Hi,
Try
CL_GUI_FRONTEND_SERVICES=>GET_IP_ADDRESS
and
GUI_GET_DESKTOP_INFO
1) Give type = '5' and return = 1. It will give you network user name.
2) Type = '6' and return = 1. It will give you Platform.
Also check
Please reward if it helps
Lokesh