cancel
Showing results for 
Search instead for 
Did you mean: 

Email Notification in SAP MDG.

Former Member
0 Kudos

Hi ,

We are using BRF plus for the email notification . We are displaying CR number to the users in the email. We have to also display the fields changed in the mentioned CR along with the CR number. Need experts help. Please provide with the document if anyone have with them .

Accepted Solutions (1)

Accepted Solutions (1)

akshay_sinha
Explorer
0 Kudos


Hi Rohit,

Please see the below mentioned link. Hope this is useful.

http://scn.sap.com/docs/DOC-15088

Best Regards,

Akshay

former_member206605
Active Contributor
0 Kudos

Hi

Go through below thread for in detail explanation....

Kiran

Former Member
0 Kudos

Thanks for the response.

Also need one more help . If you can provide me some idea.

Looking for a BaDI which can fecth all the fields which we have changed in the CR and display in the email notification ,

Thanks in advance

former_member206605
Active Contributor
0 Kudos

Hello Rohit

For email notification we are using 2 programs -

RSWUWFML2

RSWUWFML

Kiran...

Former Member
0 Kudos

Hi Rohit,

It is very difficult to display all the fields which are changed via the CR, but you can provide the link to the CR and the User can click on the link to go to the CR display and click on the Change Log button to see the list of fields changed. Please find below code which will help you to create a link to the CR in an email notification.

FUNCTION Z_MDG_BUILD_URL_FOR_EMAIL.

*"----------------------------------------------------------------------

*"*"Local Interface:

*"  IMPORTING

*"     REFERENCE(IV_CREQUEST_ID) TYPE  USMD_CREQUEST

*"  EXPORTING

*"     REFERENCE(OV_URL) TYPE  STRING

*"  EXCEPTIONS

*"      URL_NOT_FOUND

*"----------------------------------------------------------------------

   DATA:

             lo_navigation_handler       TYPE REF TO if_usmd_wf_navigation_handler,

             ls_navigation_parameters    TYPE usmd_s_wf_obn_params,

             ls_navigation_parameter     TYPE usmd_s_namevalue,

             lv_application_id           TYPE string,

             lv_action                   TYPE usmd_action,

             key_value_pairs_for_mapping TYPE usmd_t_namevalue,

             url_parameters              TYPE usmd_t_value,

             lo_ui_service               TYPE REF TO if_usmd_ui_services,

             ID_WI_ID                    TYPE SWW_WIID,

             lv_main_component           TYPE REF TO IF_WD_COMPONENT,

             lv_value_list               TYPE USMD_TS_SEQNR_VALUE,

             lv_url                      TYPE string,

             lv_WDY_KEY_VALUE_TABLE      type WDY_KEY_VALUE_TABLE,

             lv_APB_LPD_T_PARAMS         type APB_LPD_T_PARAMS,

             lt_para                     type TIHTTPNVP,

             lv_para                     type IHTTPNVP.

   DATA:

             fieldname_value_pair TYPE usmd_s_value.

   DATA:

       lv_accessibility TYPE abap_bool,

       lv_langu(2)      TYPE c,

       lo_application   TYPE REF TO if_wd_application,

       lv_shm_instance TYPE shm_inst_name,

       lv_guid               TYPE guid_32,

       ls_rfc                TYPE rfcsi.

   CONSTANTS : lc_client        type string value 'SAP-CLIENT',

               lc_language      type string value 'SAP-LANGUAGE'.

   FIELD-SYMBOLS:

         <key_value_pair> TYPE powl_namevalue_sty.

   lo_navigation_handler = cl_usmd_wf_navigation_handler=>get_instance(

           iv_workitem_id    = id_wi_id

           iv_crequest_id    = IV_CREQUEST_ID ).

   ls_navigation_parameters = lo_navigation_handler->get_navigation_parameters( ).

   lv_application_id = ls_navigation_parameters-ui_appl.

   READ TABLE ls_navigation_parameters-parameters INTO ls_navigation_parameter

     WITH KEY key = cl_usmd_wf_navigation_handler=>gc_par_logical_action.

   IF sy-subrc = 0.

     lv_action = ls_navigation_parameter-value.

   ELSE.

     CLEAR lv_action.

   ENDIF.

   key_value_pairs_for_mapping = ls_navigation_parameters-parameters.

*--------------------------------------------------------------------*

   LOOP AT key_value_pairs_for_mapping ASSIGNING <key_value_pair>.

     fieldname_value_pair-fieldname = <key_value_pair>-key.

     fieldname_value_pair-value     = <key_value_pair>-value.

     APPEND fieldname_value_pair TO url_parameters.

   ENDLOOP.

   fieldname_value_pair-fieldname  = lc_client.

   fieldname_value_pair-value = sy-mandt.

   INSERT fieldname_value_pair INTO TABLE url_parameters .

   CALL FUNCTION 'CONVERSION_EXIT_ISOLA_OUTPUT'

     EXPORTING

       input  = sy-langu

     IMPORTING

       output = lv_langu.

   fieldname_value_pair-fieldname  = lc_language.

   fieldname_value_pair-value = lv_langu.

   INSERT fieldname_value_pair INTO TABLE url_parameters.

   loop at url_parameters into fieldname_value_pair.

     if fieldname_value_pair-fieldname NE 'WDAPPLICATIONID'.

       lv_para-name = fieldname_value_pair-fieldname.

       lv_para-value = fieldname_value_pair-value.

       INSERT lv_para into TABLE lt_para.

     endif.

   endloop.

   cl_wd_utilities=>construct_wd_url(

   EXPORTING

     application_name = lv_application_id

     in_parameters    = lt_para

   IMPORTING

     out_absolute_url = lv_url ).

   IF lv_url is not initial.

     move lv_url to OV_URL.

   else.

     RAISE URL_NOT_FOUND.

   endif.

ENDFUNCTION.

Answers (0)