Skip to Content

Hi,

Recently i got a requirement to add title i.e Mr./Ms. as a prefix to the user full name in GRC email’s content. We do not have facility to add title attribute to the MSMP workflow.And if add the attribute,how do we map the value to that attribute?…

Email content before modifications

Before.JPG

I posted my requirement in the community and many of the experts gave their suggestions Email content in GRC access request.

.I’m very thankful to them…….But some workaround made my task easier.

I made changes to the method GET_NOT_VARS_AND_ATTACHMNTS ( ) of ( i.e enhancement) to MSMP Notification Handler class ( CL_GRFN_MSMP_NOTIFICATION )

Below is the enhancement code :

“””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””$”$\SE:(1) Class CL_GRFN_MSMP_NOTIFICATION, Method GET_NOT_VARS_AND_ATTACHMNTS, End                                                                          A
*$*$-Start: (1)———————————————————————————$*$*
ENHANCEMENT ZGRC_EMAIL_TITLE.    “active version

DATA: lw_fullname        TYPE string,
       lw_variables      
TYPE grfn_s_msg_variable,
       lw_logsys         
TYPE logsys,
       lw_system_id_temp 
TYPE string,
       lw_user           
TYPE grac_user,

       lw_return          TYPE int4,
       lW_user_details   
TYPE grac_s_user_detail.

        ” To get the system details(Logical system) from which the user is requesting.
       SELECT SINGLE logsys  INTO lw_logsys FROM t000 WHERE mandt = symandt.
      
IF sysubrc = 0.
         lw_system_id_temp
= lw_logsys.
      
ENDIF.

READ TABLE et_variables INTO lw_variables WITH KEY name = ‘USER_ID’.
  
IF sysubrc EQ 0.
     lw_user
= lw_variablesvalue.
    
TRY.

             “Get Details for a User
             
CALL METHOD cl_grac_ad_access_mgmt=>get_user_detail
               
EXPORTING
                  iv_system_id   
= lw_system_id_temp
                  iv_user        
= lw_user
               
IMPORTING
                  ev_return_code 
= lw_return
                  es_user_details
= lw_user_details.
           
CATCH cx_grfn_exception .                   “#EC NO_HANDLER
         
ENDTRY.

   ENDIF.

   READ TABLE et_variables INTO lw_variables WITH KEY name = ‘USER_FULL_NAME’.
  
IF sysubrc EQ 0.
    
CONCATENATE lw_user_detailsaddresstitle_p lw_variablesvalue INTO lw_variablesvalue SEPARATED BY space.
    
MODIFY et_variables FROM lw_variables index sytabix.
  
ENDIF.

ENDENHANCEMENT.
*$*$-End:   (1)———————————————————————————$*$*

Email content after modifications

After.JPG

Hope this might be useful for the other’s who has same requirement.

Thanks

KH

To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

  1. Bindu Sai

    Hi Katrice,

    Thanks for sharing. I have a doubt. As per document i understood that you will read SU01 “Title” value and maintain that in notification email when sending notification to users. So a user who is already existing in the system will have a title “Mr” or “Mrs” etc.

    If a new user raised a GRC request for access to particular system, since his UserID is not yet available in target system, from where do you capture “Title” value? 

    Correct me if my understanding was wrong, I too have a similar requirement so wanted to make use of the approach suggested by you.

    Thanks,

    Sai.

    (0) 
    1. Katrice Hawkins Post author

      Hi Padmavathi,

      In your scenario, there will no title( i.e title will be blank) because in new user creation request, there is no facility to add title in the standard screen.

      After approval process, If you check the created user id in SU01, the title will be blank.

      Thanks

      KH

      (0) 

Leave a Reply