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
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 1 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 = sy-mandt.
IF sy-subrc = 0.
lw_system_id_temp = lw_logsys.
ENDIF.
READ TABLE et_variables INTO lw_variables WITH KEY name = 'USER_ID'.
IF sy-subrc EQ 0.
lw_user = lw_variables-value.
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 sy-subrc EQ 0.
CONCATENATE lw_user_details-address-title_p lw_variables-value INTO lw_variables-value SEPARATED BY space.
MODIFY et_variables FROM lw_variables index sy-tabix.
ENDIF.
ENDENHANCEMENT.
*$*$-End: (1)---------------------------------------------------------------------------------$*$*
Email content after modifications
Hope this might be useful for the other's who has same requirement.
Thanks
KH