Skip to Content
author's profile photo Former Member
Former Member

Email Notification in SAP MDG.

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 .

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jan 20, 2014 at 12:03 PM


    Hi Rohit,

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

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

    Best Regards,

    Akshay

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.