Skip to Content

how to capture business role usage information in CRM


We have an requirement in SAP CRM . Every time users log in with business role ZSP_MK in web client , we need system to record this log in information as below(user name, number log in a given date) so that whenever we need this information we can pull this formation from CRM system for internal analysis. But we are not seeing any functionality in SAP CRM to achieve this goal . Can I request you give some idea on how to go about it.

User 3/8/2017 3/9/2017 AAAAAA 1 0 MMMM 2 1 SSSSSSSS 10 2

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Mar 16, 2017 at 11:56 AM


    This is currently not supported by SAP standard. However, I can give you a hint how it might be possible to achieve.

    The best place to identify the logon is call CL_CRM_UI_SESSION_MANAGER, method CREATE_NEW_ESID.

    This method is called for each new session that is created. In the request, there is information about the selected role. You can extract it using:

    lv_role = me->server->request->get_form_field( 'saprole' ). 

    The user is given by "sy-uname" and the timestamp can be read from "sy-datum" for date and "sy-uzeit" for exact time.

    These information can be stored in a database table (i.e ZUSER_LOGON_BR) and the statistics could be drawn from there. Make sure that you only store records if the "lv_role" is not initial.

    If you feel like it should be part of the SAP standard for Webclient UI, please create a development request here:

    Best regards, Balazs

    Add comment
    10|10000 characters needed characters exceeded