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

Function to get terminal ID

former_member75463
Participant
0 Likes
3,683

Hello,

I have used function GUI_GET_DESKTOP_INFO to get terminal ID. The program returns correct value if we run it via SAP GUI

but does not return any value when we run via web service.

I have converted program into iternet service & when I run this service, this function does not return anything.

Does anyone know function which returns terminal ID when we run service via web?

Regards,,,

Sunil Joyous

Hello,

I have used function GUI_GET_DESKTOP_INFO to get terminal ID. The program returns correct value if we run it via SAP GUI

but does not return any value when we run via web service.

I have converted program into iternet service & when I run this service, this function does not return anything.

Does anyone know function which returns terminal ID when we run service via web?

Regards,,,

Sunil Joyous

7 REPLIES 7
Read only

Manohar2u
Active Contributor
0 Likes
2,048

Not sure from webservice - but give a try using CL_GUI_FRONTEND_SERVICES->GET_IP_ADDRESS method.

Read only

0 Likes
2,048

Method CL_GUI_FRONTEND_SERVICES->GET_IP_ADDRESS give control error, so not usefull

Read only

Former Member
0 Likes
2,048

Note that an ABAP system located in an appropriate network zone (away direct access from the internet...) would most likely only see a forward proxy's IP or another gateway - and not the real terminal.

Cheers,

Julius

Read only

Former Member
0 Likes
2,048

check the methods of cl_gui_frontend_services

thoe methods will help

Read only

andrea_olivieri
Contributor
0 Likes
2,048

Hi,

a good starting point should be the RFC enabled function module THUSRINFO that returns the list of active users with the terminal is, otherwise you could use this sample report .


REPORT  ZSDN_TERMID.

data:   opcode_usr_attr(1)  type x value 5,
        terminal            type usr41-terminal.


* determine own Terminal-Id
  call 'ThUsrInfo' id 'OPCODE' field opcode_usr_attr
    id 'TERMINAL' field terminal.


  write:/ 'Terminal:', terminal.

Regards,

Andrea

Read only

0 Likes
2,048

Thanks Andrea. This works. But can you tell me what are the possible values of OPCODE?

Read only

0 Likes
2,048

Hi Sunil,

You can find the list of possible values in include TSKHINCL (from line 245 to line 327).

Best regards,

Samuel