on ‎2024 Aug 07 4:14 AM
hello,
Is there any other way to retrieve the MAC address of the network card of the message server in the front-end SAP GUI?
Thanks!
Request clarification before answering.
Hi,
retrieving the MAC address of the network card of the message server directly from the SAP GUI front-end is not a straightforward task because SAP GUI does not typically expose this level of hardware detail through its standard interfaces.
In some cases, you can execute OS commands from within ABAP if you have the necessary authorizations. These authorizations are not normally assigned for security reasons.
Here is an example of how to send an OS command via ABAP (the precondition for the MAC determination is that you have the IP)
DATA: lv_command TYPE string,
lt_result TYPE TABLE OF string,
lv_ip TYPE string.
lv_command_linux = 'ifconfig -a | grep ' && lv_ip.
lv_command_windows = 'arp -a ' && lv_ip.
CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
EXPORTING
commandname = 'Z_MY_OS_COMMAND'
additional_parameters = lv_command_linux
TABLES
exec_protocol = lt_result
EXCEPTIONS
no_permission = 1
command_not_found = 2
parameters_too_long = 3
...
IF sy-subrc = 0.
LOOP AT lt_result INTO DATA(lv_line).
WRITE: / lv_line.
ENDLOOP.
ENDIF.Greetings
Dom
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.