cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Logged in System Details

Former Member
0 Kudos

Hi All,

How to get logged in system details?

I want to dispaly User logged in Web Dynpro Abap System details along with its R/3 RFC connected system in a View Page Header as a message.

Ex: NWD for WDA and TEST for R/3 system "You are in NWD and connected to TESTu2019'.

Please let me know how to achieve this..

Thanks,

Raju.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Raju,

I don't know if I understand your question...

But maybe you can use the system variables like sy-sysid (for the system) or sy-uname (for the user)

and show this on your web dynpro application.

Than, just put these values in your context and map this context to the output field in the layout.

Regards,

Andreas

Former Member
0 Kudos

First of all create a message in message class as desired and use sy-sysid for system logged in and sy-uname for current user, and you can add the message in message class in this way...

User & is logged in system & e.g it's message number '77' and ur message class is 'ztest' and message type is E

Now go to the code where you want to write this code. e.g on button click then go the the event hander of that button and write this code

* get message manager
DATA lo_api_controller     TYPE REF TO if_wd_controller.
DATA lo_message_manager    TYPE REF TO if_wd_message_manager.

lo_api_controller ?= wd_this->wd_get_api( ).

CALL METHOD lo_api_controller->get_message_manager
  RECEIVING
    message_manager = lo_message_manager
    .

* report message
CALL METHOD lo_message_manager->report_t100_message
  EXPORTING
    msgid                    =  'ztest' " name of the message class
    msgno                    = '77' " message number
    msgty                    =  'E' " message type e.g E,W,A etc..
*    p1                       =
*    p2                       =
*    p3                       =
*    p4                       =
*    msg_user_data            =
*    is_permanent             = ABAP_FALSE
*    scope_permanent_msg      = CO_MSG_SCOPE_CONTROLLER
*    view                     =
*    show_as_popup            =
*    controller_permanent_msg =
*    msg_index                =
*    cancel_navigation        =
    .

Hopefully it works.