0% found this document useful (0 votes)
60 views23 pages

Mail Notification During The Governance Process

Mail notification

Uploaded by

sapmdg87
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
60 views23 pages

Mail Notification During The Governance Process

Mail notification

Uploaded by

sapmdg87
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 23
How To... Master Data Governance for Material: Send an E-Mail notification during the governance process Applicable Releases: EhP5, EhP6, MDG 6.1 Version 1.2 November 2013 © Copyright 2019 SAP AG. All ights reserved. ‘No part ofthis publication may be reproduced or ‘ronsmitted in any form or for any purpose without the cexptess permission of SAP AG. The information contained herein may be changed without prior notice. Some software produets marketed by SAP AG and its ‘distributors contain propriotary software components of other software vendors ‘Microsoft, Windows, Outlook, and PowerPoint are registered trademaris of Microsoft Corporation, IBM, DB2, DB2 Universal Database, 05/2, Parallel Sysplex, MVS/ESA, AIX, $/290, AS/400, 08/290, (05/400, iSeries, pSaries, xSeries, zSeries, 2/OS, AFP, Inteligent Miner, WebSphere, Netfinity, Tivol, Informix, {5/0S, POWER, POWERS, OpenPower and PowerPC are trademarks or registered trademarks of IZM Corporstion, Adobe, the Adobe logo, Acrobat, PostScript, and Reader are ither trademarks or registered trademarks of Adobe ‘Systems Incorporstad in the United States and/or other countries Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/s, and Motif are registered tzademarks of the Open Group. (Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Ine. HTML, XML, XHTML and WoC are trademarks oF registered trademarks of WCB, World Wide Web Consortium, Massachusetts Institute of Technology ‘Java isa registered trademark of Sun Microsystems, In. JavaScript isa registered trademark of Sun Microsystems, Inc. used under license for technology invented and ‘implemented by Netseape. ‘MaxDB isa trademark of MySQL AB, Sweden, ‘SAP, R/9, mySAP, mySAP.com, xApps,xApp, SAP "NetWeaver, and other SAP products and servioss ‘mentioned herein as well as their respective logos are ‘uademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the ‘trademarks of their respective companies. Data contained, in this document serves informational purposes ouly ‘National produet specifications may vary. ‘These materials are subject to change without notice These materials are provided by SAP AG andits affliated companies ("SAP Group") for informational purposes only, ‘without representation or warranty of any kind, and SAP. Group shall not be lable for ersors or omissions with respect to the materials. The only warranties for SAP Group products and servis are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty ‘These materials are provided “es is" without a warranty of any kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. ‘SAP shall not be liable for damages of any kind including ‘without limitation direct, special, indirect, or consequential damages that may result from the use ofthese materials. SAP does not warrant the accuraey or completeness of the information, text, graphics, links or other tems contained, ‘within these materials. SAP has no contral over the {information that you may access through the use of hot Jinks contained in these materials and does not endorse your uso of third party web pages nor provide any warranty ‘whatsoever relating to third party web pages. SAP NetWeaver “How-to” Guides are intended to simplify the product implementation. While specific product features and procedures typically are explained ina practical business contest, iis not implied that those features and procedures are the only approach in salving a specifi business problam using SAP NetWeaver. Should you wish to receive additional information, clarification or support, please refer to SAP Consulting. ‘Any software coding and/or code lines / strings ("Code") {included in this documentation are only examples and are not intended tobe used in a productive system environment. The Code is only intended better explain and visualize the syntax and phrasing rues of certain coding. SSAP does nat warrant the correctness and completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, except ifsuch damages ware caused by SAP intentionally or grossly negligent. Diselaimer ‘Some components ofthis product are based on Java™. Any code change in these components may eause unpredictable tnd severe malfietion end is therefore expressively prohibited, ass any decompilation ofthese components, Any Java™ Source Code delivered with this product is only tobe used by SAP's Support Services and mey not be modified or altered in any way Document History Document Version Description 1.00 First official release ofthis guide 4.40 ‘Small corrections, 1.20 ‘Small corrections ‘Typographic Conventions Icons Type Styl Description leon Description Example Text Words or characters quoted from the screen. These include field names, screen tiles, pushbuttons labels, menu names, menu paths, ‘and menu options. Cross-references to other documentation Caution Note or Important Example Recommendation of Tip Example text Emphasized words or phrases in body text, graphic tiles, and table titles File and directory names and their paths, messages, ‘names of variables and parameters, source text, and ‘names of installation, upgrade and database tools. Example text User entry texts. These are words or characters that you center in the system exactly as they appear in the documentation. brackets indicate that you replace these words and characters with appropriate entries to make entries in the system. EXAMPLE TEXT Keys on the keyboard, for example, F2 oF ENTER, Table of Contents 1 2 Business Scenari Background information... ‘Step-by-Step Procedure.. 34 32 Additional Information. 4a E-Mail notification with eubworkfow. wi 3.1.1 Create Subworkfiow.. 7 2 3.1.2 Customizing BRF+ Tables for CR-Type EM_MATOS 5 3.13 Process. 6 E-Mail notification with BADI system call Method .....ssnnnnennnnnnnn 6 3.2.1. Create service name in IMG 7 3.22 Enhancement spot USMD_SSW_SERVICE_PROCESSOR 001 7 3.2.3. Customizing BRF+ Tables .....s1nnnnnnninnnnnnnnnnnnnn 18 Workitem Notification via E-Mail 16 How To... MDG-M: Send a Mail notification during the governance process Send an E-Mail notitestion7 1. Business Scenario ‘SAP Master Data Governance, material data (MDGM) provides business processes to find, create, change, and delete material master data. It supports the governance of material master data in a ccentral hub and the distribution to connected operational and business intaligance systems. ‘The processes are workflow-driven and can include several approval and revision phases, and the collaboration of all users participating in the master data maintenance. ‘This scenario addresses if the customer requires to notify a person via Email (for example the requestor) when the workflow is in a certain step or completed ‘This How To Guide describes possible solution to send out Email notification from the Rules Based Workflow, 2. Background Information ‘There are different possibilities. A subworkflow for Email notification can be included In the Rules Based Workflow, also a call for @ system method. All ofthis definition occurs within the workflow ‘configuration, November 2013 1 How To... MDG-M: Send a Mail notation during the governance process Send an E-Mail notification” 3. Step-by-Step Procedure 3.1 E-Mail notification with subworkflow ‘The following is a description of how to send an E-Mail notification from the MDG Rules Based Workflow WS60800086 with a subworkfiow. 3.1.1. Create Subworkflow ‘swoo: Workflow Buller - Change ‘Check ‘each November 2013 2 How To... MDG-M: Send a Mall notification during the governance process Send an E-Mail notification Sa” November 2013 3 How To... MDG-M: Send a Mall notification during the governance process Send an E-Mail notification Sa” Activate your subworkfiow. November 2013 4 How To... MDG-M: Send a Mall notification during the governance process Send an E-Mail notification Sa” 3.1.2 Customizing BRF+ Tables for CR-Type EM MATO5 3.1.2.4 Create new CR-Type ‘Change View Type of Change Request’: Overview 3.1.2.2 Single Value Decision Table November 2013 5 How To... MDG-M: Send a Mall notification during the governance process Send an E-Mail notification Sa” 3.1.2.3 Non User Agent Decision Table 3.1.3. Process ‘After activation there an E-Mail willbe issued to the specified user. You can check with transaction SosT: 3.2 E-Mail notification with BADI system call method ‘The following is a description on how to send an E-Mail notification to from the MDG workfiow WS60800086 with a BADI system call method. itis not meant to enable notification of workitem. That ccan be handled via SAP Extended Notification. This is for non-workitem notifications. Itis a first attempt in which some pieces are leveraged from other examples of code. That additional work can be done to create E-Mail types, define related parameters and store message text in one of SAP's text tables. November 2013 6 How To... MDG-M: Send a Mail notation during the governance process Send an E-Mail notification” 3.2.1 Create service name in IMG intnance View of Table UBNO2010_S5W [_wsaesoa242 Subworkflow to Notiy Requestor 599900243 aworslowto Display material OnPLETED_RERCHANT ompleied Merchant Processing Ut p | [2uPDATE_PARENT_SELLSTATUS Ipdate Parent Sellstatus field 3.2.2 Enhancement spot USMD SSW SERVICE PROCESSOR Create a BAD! implementation for definition USMD_SSW_SYSTEM_METHOD_CALLER and use service name as fier for implementation In implementing class of BADI (here itis ZCL_CT_SVS_METHOD_CALLER) November 2013 7 How To... MDG-M: Send a Mail notation during the governance process Send an E-Mail notification” Glass Builder: Class ZCL_CT_SYS_METHOD_CALLER Display 0 6 STATO CALERA STEEN vee easonecne| Example coding: Test s_sey_eyo_petnod Sales Sa STOLE {pe way 70 44 und ceesaest apt, METHOD if_usmd_ssw_syst_method_caller~call_system method. DATA: 1o_crequest 1o_erequest_zflavor Jo_crequest_zparent ao er api_instance ‘Jo_instance de instance ext TYPE REF 70 if_usmd_crequest_epi, TYEE REF 70 if uemd_crequest_api, TYEE REF 10 if usmd crequest api, TYPE REF 10 if usmd crequest api, TYPE REF 70 if usmd model, TYPE REF 70 if usma model_ext, iv_eydatum TYPE usmd_tutlg, lv syuzeit TYPE usmd txtlg, lv_erequest_id TYPE usmd_crequest, Iv_erequest_text TYPE usmd_txtig, Iv_erequest_type TYE usmd_crequest_type, dv zeazcn TYPE usmd reason, Ivparent_id TYPE lvmmscdsl = TYEE, avimm zparent TYPE lvimmzflaver TYPE av sparent_fieldname Av_eflavor_fieldnane zparent, juend_model. VALUE "01", uand entity VALUE ‘ZPARENT', uend_entity VALUE 'MATERIAL', TEPE wand fieldname | VALUE "2UARENT", TYPE usmd_fieldname | VALUE "MATERIAL", 1t_crequest_entity TYFE usnd_t_crequest_entity, ds craquest entity TYPE uend = erequest entity, Itladded_entity TYPE usmd_t_crequest_entity, Az_data structure TYFE REF TO data, November 2013 How To... MDG-M: Send a Mail notation during the governance process Send an E-Mail notification” iz_data_teble TYEE 1r_gpar_data_structure ar gpar data table 1 _amdgflv_data_structure ble REF TO data, TYEE REF 70 data, TYPE REF 70 data, TYEE REF TO date, TYEE REF TO data, Ar_amdgflv data’ lv_entity_fieldnane Lv_flv_geelleca ly par_zsellsta iy spezent TYEE usmd_fieldnane, ‘TvEE om_sell_statua, TYPE em_sell status, ype apavens, lt_entities TYPE usmd_t_crequest_entity, As_entity TYPE usmd_s_crequest_entity, at message TYPE uomd_t message, TYPE TYEE it _erequest 1s_crequest STANDARD TABLE OF usmal200, uemd_s_crequest, Is status txttable TYPE uandL30e, ar data ‘TYPE REF 70 data, lr_table TYPE REF 70 data, it_sel ‘TYEE usnd_ts_sel, As sel TYEE uomd_s sel. 1 TYPE ANY TABLE, TYPE any, TYPE eny, TYPE any, TYPE any, div eratail> TYPE any, TYPE any. YEE any, TYEE INDEX TABLE, TYPE any. CASE iv_service name. WHEN '2NOTIFY_REQUESTOR' * Got and read CR and Jaunch E-mail notification CALL METHOD cl_uemd_crequest ap: EXEORTING iv_crequest IMPORTING e_inet_crequest api .get_instance iv_or_nunber lo_crequest. CALL METHOD 1o_crequest->read_crequest IMPORTING 1s_creque! November 2013 How To... MDG-M: Send a Mail notation during the governance process Send an E-Mail notification” SELECT SINGLE * INTO le_statue_txttable FROM uemdl30¢ WEERE langu = 'EN' AND usmd_creq status = 1s crequest-uend_creq status. CALL FUNCTION *ZCT_USER_SEND_NATL* EXBORTING iv_creguest_id = iv_cr_nunber ivluser_nane = 1s crequest-usmd_created by ct = 1s status_txttable~ iy status: Badi calls Function Module logic to build text and send out as E-Mail. Example coding} FUNCTION zct_user_send mail « s"#tiocal Interface: "IMPORTING + REFERENCE (IV_CREQUEST_ID) TYPE USMD_CREQUEST DEFAULT a "900000000204" «REFERENCE (1V_USER_NAME) TYPE SYUNAME DSFAULT '101012. "REFERENCE (1V_STA ExT) TYPE USMD_TXTME * Example Report for usage of CL_BCS MESSAGE: lo message REF 90 21 bes message, Ax bes_send TYPE REF 10 cx_bes_send, Lv_err_text string, iy_crecuest aut QYPE chavi2, ay status text snd _txtmi, ivmail_address TYPE string, Iv_creator_name TYPE ad_namtext, ly_subject ‘TYEE ctzing, ay Body yee string. PERFORM init USING iv _creque: iv_statie_text CHANGING 1v_ereque: Ly_statue_cext ly mail addvess iv lerestor name. ext IE lv _mail_addvess Is Nov INITIAL. TRY. November 2013 10 How To... MDG-M: Send a Mail notation during the governance process Send an E-Mail notification” CREATE OBJECT lo_message. wee create subject PERFORM creat subject USING — 1v_crequest_ext CHANGING 1v_subject. lo_message->set_subject ( lv_subject ). gle text document body USING — 1v_crequest_ext Ly status text iy leseatce name CHANGING 1v_body. 1o_message->set_main_doc( 1v_pody }. *## create body as PERFORM creat te* set recipient Jo message-Sadd recipient ( Iv mail address ). tee sot attributes lo_message->set_status_mail( 'N' } lo mesaage-Deet requested statua( 'N' ). 1o_message->set_importance( 'N' }. lo message->eet_send_inmediately( ‘x ). t#* send mail lo_message->send( ). lo message-cehow send log( ). CATCH cx_bes_send INTO 1x bos_gend. Ly ere text = 1x bes sendoget text (). MESsacE 1v_err_text TYPE ‘E'. ENDIRY. ENDIF. ENDEUNCTION. * FORM create subject USING iv_crequest_id TYPE charl2 CHANGING ev_subject TYPE string. CONCRIENATE ‘Change Request’ iv crequest_id ‘has been completed’ INTO evy_subject SEPARATED BY space. ENDFORM. "create subi) id USING iv erequest_id TYPE usnd_crequest CHANGING ev_crequest_ext TYPE chari2. November 2013 4 How To... MDG-M: Send a Mail notation during the governance process Send an E-Mail notification” TATA: Lo model QYPE REF TO if uand model, Lt message TYPE usmd_t_message. cl_usnd_model->get_instance ( EXPORTING _uemd model = space IMPORTING eo instance = lo model etmessage - It message ]. LOOP AT 1t_measage TRANSPORTING NO FIELDS WHERE magty CA usmd0_cs magty-severe. ENDLOOP. CHECK NOT sy-subro IS INITIAL. lo madel-sconvert_char_output ( SXPORTING 4_fieldnane = usmd0_cs_fld-crequest auvalus_int = iv_crequest_ad IMPORTING = valus ext = ev_crequest es ENDFORM. " nvert_crequest_id * Form create body “6 FORM create body USING iv_crequest_id TYPZ charl2 dy status text usnd_txtmi ayiee cveazoy ac nantext CHANGING ev_body TYEE etring. constants: lc_linefeed TYPE chaz? VALUE cl_abap_chaz_utilitie: ic_empty line TYPE string VALUE space. DATA: Ly_cr_creator TYPE string, ay linel QYPE string, iv line? TYPE string, iv_arl TYEE string, lv_line3 TYEE string, ay line qYPE string, Ly_Lines TYEE string, ay body, ‘QYPE string. November 2013 12 How To... MDG-M: Send a Mail notation during the governance process Send an E-Mail notification” i? Ly_linel Av_line2 = 'your change request for creating a material has been complete a. * CONCATENATE mnd_entity_value2?SAP-CLIEW 956SAP-LANGI CONFIGID-MDG MM_APP_BS MAT GEN BATCCREQUEST-" 4 CONCATENATE ext INTO 1lv_line3 separated by space. lv lined = ‘Warm Regards, ". ly lines = ‘Apple MDG Adminatrator'. CONCATENATE 1v_linel -_enpty_line Ay_line3 Ic_enpty_line iv Lined Av_lines ‘https: //uxcic5t. wat. sap. corp "change Request ' iv crequest_id ‘ has status: :44371/sap/be/webdynpro/sap/us INGIS_CREQ_MODE=XaSAP-W0- y enequest id INTO Iv url. * 4v_stacus_t maa INTO ev_body SEPARATED BY 1¢_Linefeed. ENDFORM. "ereate body Form init FORM init USING iv crequest id TYPE ivluser nan = TYPE ivistatue_text TYPE CHANGING ev_crequest_ext TYRE evistatus text TYPE evmail adaesss TYPE, ev_ereator_name TYPE usmd_crequest sysname uamd_t: chari2 steing ad_nantext. DATA: Le_nser_data itretuza| Ls_crequest_data TYPS usmdl20c. ‘TYPE bapiaddr3, TYPE bapirettab, ev_statue_text iv_etetus_text. PERFORM convert _crequest_id USING iv crequest id CHANGING ev_crequest_ext. * get email address user name from provided user id CALL EUNCTION 'BAPI USER GET_DETAIL' EXPORTING November 2013 13 How To... MDG-M: Send a Mail notation during the governance process Send an E-Mail notification” username = iv_usex_nane cache results = space IMPORTING address = 1s_user_data TABLES petra Lt _seturn ev_mail_address - 1s_user_data-e mail. * get data of the ange vequest cxeator ERFORM get_crequest data USING | iv_erequest_id CHANGING 1s_crequest_data. CLEAR 1z_usex_data. CALL FUNCTION 'BAPI USER GET _DETAIL* EXPORTING username = 1s_crequest_data-usmi_created by cache results = space IMPORTING address = 1s_user_data TABLES peturn Lt_seturn. ev_creator name Ls _user_data-fullname. ENDFORM. ninit * Form get_crequest data 6 — FORM got_crequest_data USING iv_crequest_id TYPE usmd_crequest CHANGING ev_crequest_data TYPE usmdi20c. SELECT SINGLE + FROM usmdl20c INTO ev_crequest_date WHERE usmd_craquest = iv_crequest_id. ENDFORM. nget_en data November 2013 14 How To... MDG-M: Send a Mall notification during the governance process Send an E-Mail notification Sa” 3.2.3. Customizing BRF+ Tab! 3.2. Create new CR-Type 3.2.3.2 Single Value Decision Table After successful activation of change request (CR Previous step 91 and previous action 31) the notification step is called, Itidentifies next step as 50 which points to the end of the workflow, Condition Alias 89 and New CR Step 98. 3.2.3.3 Non User Agent Decision Table Using tcode, USMD_SSW_RULE, insert call to method in appropriate location. Here the notification is sent to the creator of the workflow upon successful activation. Create an entry fora step in Nor-user agent decision table for process pattern 02 (synchronous. method call) November 2013 16 How To... MDG-M: Send a Mail notification during the governance process Send an E-Mail notitestion7 4. Additional Information 4.1 Workitem Notification via E-Mail Notifications for SAP Business Workflow notify users by E-Mail or SMS about their work items that need to be processed. Notifications are sent to the relevant user in the form of messages. At present, ill messages 11M of tort cnty) end SWI8.meseaues ate Supported, Extended notifications are used to deliver E-Mail notifications to the agents of a workitem that has ‘been sent to them and is waiting for them to process. itis @ Workitem notification and has linksiinformation about the workitem. This notfcation is generated extemal to the workflow template. Ina business scenario, for example you could configure extended nottications so that all approving ‘agents get an E-Mail telling them that they have a workitem in their inbox (POWL/UWL), Itis a notification of a dialog step that they must take action on. Oncs the Extended Notification mail is sent ‘out the workflow step is stil in process waiting for the agent to execute the dialog work iter. EE rievours of Notifications RSWUWEML = Report RSWUWFML = Polling report 1 Uses SMTPISAPconnect mail connection Uses SAP Office's auto-forward address Availabilty: >= 3.41 E-Mail Notifications for Business Workflow = Report RSWUWFML2 1 New Version of RSWUWFML ‘= WinGui Shortcuts instead of R3F attachments m Avallabllity: 46C >= <= 6.20 Extended Notifications for SAP Business Workflow Server notification framework Availabilty: Web AS 6.40 November 2013 16 How To... MDG-M: Send a Mail notation during the governance process Send an E-Mail notification” Notify users about workitems that need to be processed = Send workitems to groupware (E.g.MS Outlook or Lotus Notes) carrying direct callbacks to backend transactions ‘4 Exocution of web-based ‘workitems (Web Dynpro, People contre Ul”) + Execution of workitems via ‘SAP GUI for Windows FART a aE OT zi z thre asaes detoaraion x x rare von hana x x IM ema (Ouoak oy - x Lis new Web Us tO | - e x Serpe vas treraig na : = A x ‘The complete presentation can be found: sywonw.sdn sap comliscn/index?rid=Mibrary/vui/50322608-0/62-2¢10-eb8-acea876f08be Online help: m Jhelp.sap.com/sephelp nw200ds/helodata/enid5/58 1ee8d561247of34cfod66d 1648 1Mrameset ht November 2013 7 www.sdn.sap.com/irj/sdn/howtoguides

You might also like