‎2010 Apr 06 3:50 AM
Experts:
How can i get user computer hostname in ABAP statement ?
Thanks a lot!
‎2010 Apr 06 3:54 AM
HI
Use class CL_GUI_FRONTEND_SERVICES and method GET_COMPUTER_NAME
GET_IP_ADDRESS
cl_gui_frontend_services=>get_computer_name(
CHANGING
computer_name = computer_name ).
* EXCEPTIONS
* cntl_error = 1
* error_no_gui = 2
* not_supported_by_gui = 3
* others = 4
* ).
CALL METHOD cl_gui_cfw=>update_view.Cheerz
Ram
‎2010 Apr 06 3:54 AM
HI
Use class CL_GUI_FRONTEND_SERVICES and method GET_COMPUTER_NAME
GET_IP_ADDRESS
cl_gui_frontend_services=>get_computer_name(
CHANGING
computer_name = computer_name ).
* EXCEPTIONS
* cntl_error = 1
* error_no_gui = 2
* not_supported_by_gui = 3
* others = 4
* ).
CALL METHOD cl_gui_cfw=>update_view.Cheerz
Ram
‎2010 Apr 06 4:29 AM
CALL METHOD CL_GUI_FRONTEND_SERVICES=>GET_COMPUTER_NAME
CHANGING
COMPUTER_NAME = PCNAME.
u201CPCNAMEu201D is not type-compatible with formal parameter "computer_name".
I should how to define PCNAME?
‎2010 Apr 06 4:32 AM
Hi Andy,
If you need any further feel free to revert back
data : computer_name type string. " Declare it like this
start-of-selection.
cl_gui_frontend_services=>get_computer_name(
CHANGING
computer_name = computer_name ). " I Just executed this and working fine on ECC6.0
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
others = 4
).
CALL METHOD cl_gui_cfw=>update_view.Cheerz
Ram
‎2010 Apr 06 7:13 AM
‎2010 Apr 06 4:01 AM
‎2010 Apr 06 5:44 AM
Hi,
SY-HOST is the system variable for computer host name.
Thanks & Regards,
SHAIIK.