Send a Mail Notification During the MDGF Process

March 26, 2018 | Author: imanimesh0980 | Category: Business Process, Ibm Db2, Email, Ibm System I, Icon (Computing)


Comments



Description

SAP How-To Guide Master Data Governance for FinancialsHow To… Master Data Governance for Financials: Send a Mail notification during the governance process Applicable Releases: EhP5 Version 1.0 August 2011 © Copyright 2011 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, Informix, i5/OS, POWER, POWER5, OpenPower and PowerPC are trademarks or registered trademarks of IBM Corporation. Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks 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 only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services 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 “as 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 of these materials. SAP does not warrant the accuracy or completeness of the information, text, graphics, links or other items contained within these materials. SAP has no control over the information that you may access through the use of hot links contained in these materials and does not endorse your use 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 in a practical business context, it is not implied that those features and procedures are the only approach in solving a specific business problem 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 to be used in a productive system environment. The Code is only intended better explain and visualize the syntax and phrasing rules of certain coding. SAP does not 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 if such damages were caused by SAP intentionally or grossly negligent. Disclaimer Some components of this product are based on Java™. Any code change in these components may cause unpredictable and severe malfunctions and is therefore expressively prohibited, as is any decompilation of these components. Any Java™ Source Code delivered with this product is only to be used by SAP’s Support Services and may not be modified or altered in any way. Document History Document Version 1.00 Description First official release of this guide . source text. screen titles.Typographic Conventions Type Style Example Text Description Words or characters quoted from the screen. upgrade and database tools. and menu options. Variable user entry. Cross-references to other documentation Example text Emphasized words or phrases in body text. These are words or characters that you enter in the system exactly as they appear in the documentation. messages. pushbuttons labels. These include field names. and names of installation. for example. F2 or ENTER. Icons Icon Description Caution Note or Important Example Recommendation or Tip Example text Example text <Example text> EXAMPLE TEXT . Angle brackets indicate that you replace these words and characters with appropriate entries to make entries in the system. names of variables and parameters. Keys on the keyboard. menu paths. menu names. graphic titles. User entry texts. and table titles File and directory names and their paths. .................................................................................................................................................................................................................Table of Contents 1....................................................................... Business Scenario....2 3......................................................................................... 3.........6 Create a New Workflow ......................... 11 Configuration ......................5 3... 14 ..4 3. 4 Modify Activation Step ................................................1 3.................... 1 Background Information . 2 Modify the Workflow Container .......................... 1 Step-by-Step Procedure . 7 Add a Mail Notification Step ..................................................................................................................... 2 3..........................................................................................3 3............. 13 Example Coding for Program-Exit Class .................................................................................. 2................................... and the collaboration of all users participating in the master data maintenance. It supports the governance of financial master data in a centeral hub and the distribution to connected operational and business intelligence systems. 2. Business Scenario SAP Master Data Governance for Financials (MDGF) provides business processes to find. Background Information A new workflow step is added into the workflow template. This scenario addresses when a change request is finally approved. You may adjust at which point the sending mail step can be inserted as long as you have maintained the elements in workflow container. The processes of MDGF are business workflow-driven and can include several approval and revision phases. create. Master data in MDGF is maintained by change request.Send a Mail Notification During the MDGF Process 1. The Email contains change request metadata as well as the data that has been maintained during processing of the change request. September 2011 1 . change and delete financial master data. This How To Guide describes possible solution to send out Email notification from the workflow. all users affected will get an Email with a protocol of the change request. Example is developed in QV5/Client 005. Select Workflow in menu and select “Save as…” September 2011 2 .Send a Mail Notification During the MDGF Process 3.1 . The workflow WS75700040 only contains three dialog steps. tested in QV5/Client 405. At cross client. The scenario takes workflow WS75700040 as an example. After the activation step add a new step with type “Send Email”. Step-by-Step Procedure The following is a description of how to send an Email notification after activating a change request.. The idea is that add a program-exit to the activation step of workflow. Create a New Workflow 1. 3. enter transaction SWDB. Fill workflow “WS75700040” and press ENTER 2.. September 2011 3 . In the prompted window.Send a Mail Notification During the MDGF Process 3. Activate the workflow. fill in abbreviation and name. Click 4. A new workflow number is generated automatically. Modify the Workflow Container a. Create a new structure and new table type in the DDIC using transaction SE11.Send a Mail Notification During the MDGF Process 3. This will handle the assigned object list of the change request. b.. Create a data type “Structure” 1.2 .. Create a data type “Table Type” September 2011 4 . Use the context menu to create two new container elements September 2011 5 . Select “Workflow Container” at the left side. Go to transaction SWDD.Send a Mail Notification During the MDGF Process 2. 3. input the workflow that just created automatically. The properties are shown as below. September 2011 6 . It’s of type SWHACTOR. b.Send a Mail Notification During the MDGF Process a. CREQUEST_OBJLST This element is used to store master data in change request. EMAILRECEIVER This element is used to store users that need to be notified by Email. Modify Activation Step 1. select step “000298 Änderungen aktivieren” in Navigation area.. September 2011 7 . In transaction SWDD.3 .Send a Mail Notification During the MDGF Process 3.. choose the option “Copy and Edit Task” from the dropdown list of Task ID. 3. At right panel. Note: There may be errors in setting work item text here. September 2011 8 . Fill in all fields like following. You may set the work item text after binding.Send a Mail Notification During the MDGF Process 2. September 2011 9 . Set the data type and properties just like before. Save the task and go back to the step definition.Send a Mail Notification During the MDGF Process 4. create two new container elements CREQUEST_OBJLST and EMAILRECEIVER. 5. Binding the workflow container element with task container element. In tab Container. 6 Example Coding for Program-Exit Class 8. Save the workflow and click at the top of the activity. The example code of the class can be found in 3. 7. go to tab Program Exits and add class ZCL_WORKFLOW_EXIT. Create a new class using transaction SE24. In step activation. which inherits interface IF_SWF_IFS_WORKITEM_EXIT. Implement the method IF_SWF_IFS_WORKITEM_EXIT>EVENT_RAISED to set the container element EMAILRECEIVER and CREQUEST_OBJLST. September 2011 10 .Send a Mail Notification During the MDGF Process 6. The example class ZCL_WORKFLOW_EXIT is added at bottom. 4 Add a Mail Notification Step 1. select „Step Types That Can Be Inserted“.Send a Mail Notification During the MDGF Process 3. At left area of workflow builder. and then move the „Send Mail“ and drop down after the activation step. September 2011 11 . 4. Fill in information to the step. 3.Send a Mail Notification During the MDGF Process 2. (Availability of the parameters SIGN & ENCRYPT depend on the setup of the workflow and might not be available. 5. ) September 2011 12 . maintain the standard task using transaction PFTS. If you run into locking issues. You may insert element via icon „Insert Expression“. Double click the new task and create a new element CREQUEST_OBJLST in the container jsut like steps before. Binding between workflow container element and task container element. Click tab Control and create a new task. Go to node General Settings->Process Modeling>Workflow->Other MDG Workflows->Define Workflow Step Numbers.grp. tab Mail sy. At MDG client. To make users in SAP system can receive and email. Method“ to „E-mail“ in SU01 c. following settings are needed. Create a change request type with the new created workflow. Add the email address in SU01 (or make sure it’s there) b. Reset buffer September 2011 13 .Send a Mail Notification During the MDGF Process 6. 2. 3. In SO16. Set „Comm. The change request type can be created at MDGIMG->General Settings->Process Modeling->Change Requests->Create Change Request Type 3. radio button „ Send to Home Addresses of Users“ d. go to transaction MDGIMG. Activate the whole workflow. a. tab Addressing. Add three steps for the new created workflow.5 Configuration 1. at the top of the activity. In SO16. Assign agents in MDGIMG->General Settings->Process Modeling->Workflow->Other MDG Workflows->Assign processor to Workflow Step Number (Simple Workflow) 4. Save the workflow and click 7. usmd_s_entity_prop. usmd_crequest. usmd_s_fdep. usmd_t_message. swcont-value. DATA: lo_workitem TYPE REF TO if_swf_ifs_parameter_conta iner. string. zusmd_t_entity. swhactor. REF TO if_usmd_model. usmd_edition. September 2011 14 . usmd_model. lt_objlst lv_return ls_swotobjid lv_crequest lv_edition lv_edtn_type lv_model lo_model lt_message lt_message1 lt_objlst_ele lr_data ls_objlst ls_objlst_ele lv_obj ls_entity_prop ls_fdep ld_entity lv_entity_txt lv_field_txt ls_receiver lt_receiver_temp lt_receiver lr_badi_wf_agent ld_agent_filter lo_table lo_struct lo_line TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE usmd_ts_crequest_objkey. usmd_edition_type. sysubrc. swotobjid. zusmd_s_entity. REF TO usmd_wf_agent.Send a Mail Notification During the MDGF Process 3. usmd_value. usmd_s_crequest_objkey. REF TO data. REF TO cl_abap_tabledescr. usmd_entity. REF TO cl_abap_structdescr. usmd_t_message. tswhactor.6 Example Coding for Program-Exit Class Example Coding: METHOD if_swf_ifs_workitem_exit~event_raised. tswhactor. usmd_value. REF TO cl_abap_datadescr. CALL METHOD cl_usmd_model=>get_instance EXPORTING i_usmd_model = lv_model IMPORTING eo_instance = lo_model et_message = lt_message. lv_crequest = ls_swotobjid-objkey+0(12). TYPE REF TO cl_abap_typedescr. CATCH cx_swf_cnt_elem_not_found . * Get Change request number TRY. TYPE any. * * Get object list of the change request Get data model SELECT SINGLE usmd_edition FROM usmd120c INTO lv_edition WHERE usm d_crequest = lv_crequest. TYPE any. CATCH cx_swf_cnt_container . CALL METHOD lo_workitem->get EXPORTING name = '_WI_OBJECT_ID' IMPORTING value = ls_swotobjid. CATCH cx_swf_cnt_unit_type_conflict . *Get instance of workflow item lo_workitem = im_workitem_context->get_wi_container( ). TYPE any. SELECT SINGLE usmd_model FROM usmd010c INTO lv_model WHERE usm d_edtn_type = lv_edtn_type. ENDIF. IF lv_model IS NOT INITIAL. FIELD-SYMBOLS: <f_obj> <f_value> <f_struct> <f_obj_tab> * The email is sent only after the activation of master data CHECK im_event_name EQ if_swf_ifs_workitem_exit=>c_evttyp_after_execut ion. IF sy-subrc EQ 0. CATCH cx_swf_cnt_elem_type_conflict . ENDTRY. SELECT SINGLE usmd_edtn_type FROM usmd020c INTO lv_edtn_type WHE RE usmd_edition = lv_edition. TYPE ANY TABLE.Send a Mail Notification During the MDGF Process ls_comp lo_type TYPE abap_compdescr. ENDIF. IF sy-subrc EQ 0. September 2011 15 . lo_struct ?= lo_line. CLEAR: lv_obj.Send a Mail Notification During the MDGF Process ENDIF. lo_line = lo_table->get_table_line_type( ). CALL METHOD lo_model->if_usmd_model_crequest~crequest_get_objlist EXPORTING i_crequest = lv_crequest IMPORTING ets_crequest_objkey = lt_objlst et_message = lt_message1. LOOP AT <f_obj_tab> ASSIGNING <f_struct>. RECEIVING r_text * Get master key of ld_entity READ TABLE lo_model>dt_entity_prop INTO ls_entity_prop WITH KEY usmd_entity = ld_entity. CONCATENATE lv_entity_txt ':' INTO lv_obj SEPARATED BY space. IF lo_line->kind = cl_abap_typedescr=>kind_struct. CHECK lo_type->kind = cl_abap_typedescr=>kind_table. ENDIF. ASSIGN <f_obj> TO <f_obj_tab>. IF lo_line->kind = cl_abap_typedescr=>kind_struct. lo_struct ?= lo_line. September 2011 16 . ASSIGN ls_objlst-r_data->* TO <f_obj>. * Get text of entity type CALL METHOD cl_usmd_services=>fieldname2entity EXPORTING io_model = lo_model i_fieldname = ls_objlst-fieldname RECEIVING r_entity = ld_entity. APPEND LINES OF lt_message1 TO lt_message.ld_entity. lo_type = cl_abap_typedescr=>describe_by_data( <f_obj> ). IF <f_obj_tab> IS ASSIGNED. CALL METHOD cl_usmd_services=>entity2text EXPORTING io_model = lo_model i_entity = ld_entity = lv_entity_txt. IF lt_message IS INITIAL. LOOP AT lt_objlst INTO ls_objlst. ls_objlst_ele-entity = ls_objlst-fieldname. CLEAR ls_objlst_ele. lo_table ?= lo_type. * Get text of field name CALL METHOD cl_usmd_services=>fieldname2text EXPORTING io_model = lo_model i_fieldname = ls_fdep-masterfield = lv_field_txt. TRY. IF sy-subrc EQ 0. ENDTRY. CATCH cx_swf_cnt_container . ENDIF. GET BADI lr_badi_wf_agent FILTERS agent_filter = ld_agent_filter. ld_agent_filter = if_usmd_wf_agent=>gc_filter-standard. ************************************************************* **** *Set parameter EMAILRECEIVER ** Call BAdI to get agents IF ld_agent_filter IS INITIAL. ENDIF. CATCH cx_swf_cnt_elem_not_found .Send a Mail Notification During the MDGF Process LOOP AT lo_model>dt_fdep INTO ls_fdep WHERE fieldname EQ ls_entity_prop-r_fprop>fieldname. APPEND ls_objlst_ele TO lt_objlst_ele. CATCH cx_swf_cnt_unit_type_conflict . ENDIF. CATCH cx_swf_cnt_elem_type_conflict . ENDIF. ls_objlst_ele-value = lv_obj. ENDLOOP. ENDLOOP. ENDIF. CONCATENATE lv_obj lv_field_txt ' ' <f_value> ' ' INTO lv_obj SEPARATED BY space . IF lr_badi_wf_agent IS BOUND. ASSERT <f_value> IS ASSIGNED. ASSIGN COMPONENT ls_fdepmasterfield OF STRUCTURE <f_struct> TO <f_value>. CALL METHOD lo_workitem->set EXPORTING name = 'CREQUEST_OBJLST' value = lt_objlst_ele. CALL BADI lr_badi_wf_agent->get_agents RECEIVING r_value EXPORTING September 2011 17 . ENDLOOP. IF lr_badi_wf_agent IS BOUND. APPEND LINES OF lt_receiver_temp TO lt_receiver. ENDTRY. CATCH cx_swf_cnt_elem_type_conflict . TRY. IF lr_badi_wf_agent IS BOUND. APPEND LINES OF lt_receiver_temp TO lt_receiver. ENDIF. CALL BADI lr_badi_wf_agent->get_agents EXPORTING id_appstep = '3' id_crequest = lv_crequest if_single_proc = '' id_index = 0 IMPORTING et_agent = lt_receiver_temp et_message = lt_message. ENDMETHOD. CATCH cx_swf_cnt_elem_not_found . CALL METHOD lo_workitem->set EXPORTING name = 'EMAILRECEIVER' value = lt_receiver. ENDIF.Send a Mail Notification During the MDGF Process id_appstep id_crequest if_single_proc id_index = = = = '1' lv_crequest '' 0 IMPORTING et_agent et_message = lt_receiver_temp = lt_message. ENDIF. September 2011 18 . CALL BADI lr_badi_wf_agent->get_agents EXPORTING id_appstep = '2' id_crequest = lv_crequest if_single_proc = '' id_index = 0 IMPORTING et_agent = lt_receiver_temp et_message = lt_message. APPEND LINES OF lt_receiver_temp TO lt_receiver. CATCH cx_swf_cnt_unit_type_conflict . IF lv_return IS INITIAL. ENDIF. CATCH cx_swf_cnt_container . www.sap.sdn.com/irj/sdn/howtoguides .
Copyright © 2024 DOKUMEN.SITE Inc.