Beruflich Dokumente
Kultur Dokumente
In our example we will build a cross-system supplier self-service registration and approval process. A
supplier registers via a website and enters some initial data such as company name, street, city and
postal code. These global attributes are stored in NetWeaver MDM for further distribution to Non-SAP
systems. When the supplier is approved by the master data specialist a change request is
automatically generated in SAP Master Data Governance. A workflow in SAP Master Data governance
ensures that all ERP specific attributes are maintained. After final approval in SAP Master Data
Governance the new supplier is activated and distributed. After activation a notification is send to
the original requester.
(1) The initial supplier registration web page triggers the start web-service of the BPM
process
(2) The global attributes from the registration web-page are used to create a new supplier
record in SAP NetWeaver MDM
(3) In this human interaction step a new supplier is being approved
(4) BPM calls a SAP Master Data Governance Web Service to create a change request with
the initial supplier data. This also triggers a SAP Business Workflow in SAP Master Data Governance.
(5) This step in BPM is called an intermediate message event. The process waits for a
message to come in from Master Data Governance before the flow commences. Early in the SAP
Business Workflow process we have inserted a task to call BPM. In this call we transmit the ID of the
change request.
(6) BPM uses the change request ID from SAP Master Data Governance to send an e-mail to
the original requestor. The e-mail contains a link to the SAP Business Workflow log. Using this link
the original requestor can monitor the status of the change request in MDG.
(7) After sending an e-mail the BPM process waits again for a message from SAP Master
Data Governance. This time SAP Master Data Governance sends a message at the end of the SAP
Business Workflow process and after the Supplier has been finally approved and activated. The
message includes the final ID of the Business Partner in the primary persistence.
(8) The last step in the BPM process informs the original requestor that the new Business
Partner has been created and activated.
Implementation Steps
Integration between NetWeaver MDM and BPM has already been sufficiently documented on SDN. In
this section the focus is on the integration between SAP Master Data Governance and NetWeaver
BPM. Therefore we look specifically at the three integration points numbered step 4, step 5 and step
7 in figure 3 above. In step 4 we show how the inbound communication to SAP Master Data
Governance was realized using a standard Web Service. The steps 5 and 7 are technically very
similar in the sense that they both use a web service client proxy to transmit process status
information from the SAP Business Workflow back to SAP NetWeaver BPM.
CALLMETHODcl_mdg_bp_bupa_si_in=>if_mdg_upload_proxy~setup_for_file_upload
EXPORTING
iv_instance=1
*IO_UPLOAD_DIALOG=
it_user_setting=lt_user_setting.
endif.
ENDMETHOD.
The code first checks the scope-id-element in the message header. The SAP Master Data
Governance load will only continue if the scope-id-element is set to BPM. The proxy implementation
of the inbound service uses the context of the SAP Master Data Governance-file-upload-framework
to determine how the incoming data has to be processed. We use the enhancement spot to set the
file upload framework context in such a way that the incoming data is stored in the SAP Master Data
Governance staging area and a change request of type SUPPL01 (Create Supplier) is being created.
If key-mapping information was send as part of the Web Service call, the key-mapping for the new
supplier will automatically be updated.
The ABAP code in the Enhancement Sport looks for the first process type SUP1 in table USMD1601
and takes the change request type from that line. In our example LRDEMO will be selected as
change request type when the web service is called (refer to table USMD1601 in figure 4 below). You
may have to adapt the ABAP code to ensure your custom change request type (as defined in the
following section _ Customizing the governance process_) is correctly assigned in the Enhancement
Spot.
Look up the id of the workflow template for Create Supplier: Open MDG IMG activity Create
Change Request Type and find the row with change request type SUPPL01 (Create Supplier). In the
same row you find the workflow template id for this change request type.
Open the Workflow Builder (transaction swdd) and create a copy of the SAP delivered
workflow template for Create Supplier (use the workflow template id from the previous step). Do not
forget to save and activate you new workflow template.
In MDG IMG activity Create Change Request Type create a copy of the SAP delivered change
request type SUPPL01 (Create Supplier). Assign the new workflow template id from the previous step
to the new change request. In our example we have created a custom change request type LRDEMO
which is linked to workflow template WS99900008 (Firgure 5 below).
In MDG IMG activity Define workflow step numbers create a copy of the rows from the SAP
delivered workflow template for the create supplier workflow template. In your copied rows change
the workflow template id to the id of your custom workflow template.
To ensure the receiver determination will work for your new change request type enhance
the BRF+ table GET_AGENT. Start transaction BRF+ and search for MDG as shown in figure 7 below.
Generating a SAP Business Workflow log URL from a change request id in SAP
MDG
https:// <HOSTNAME> : <PORT> /sap/bc/webdynpro/sap/usmd_crequest_protoco
l2?SAP-CLIENT=<CLIENT> &SAP-LANGUAGE=EN&CREQUEST= <insert the change
request number here>
For sending the change request id to NetWeaver BPM a task was added after the Set Initial Status of
Change Request task at the beginning of the workflow (figure 9). In the object method section of the
task maintenance screen (figure 10) a custom class and method is selected. The called method calls
the web service proxy to transmit the change request id. To be able to select your custom class from
the workflow task it must implement the interfaces BI_OBJECT, BI_PRESISTENT and IF_WORKFLOW
(figure 13). You can find more information regarding ABAP OO for workflow in the references section
at the bottom of the article.
Figure 13: Interface tab of the class that gets called from the custom workflow task
NetWeaver BPM. After approval and activation of the Business Partner the Business
Partner id is transmitted to NetWeaver BPM. You can use transaction sxi_monitor to
view incoming and outgoing messages.
Summary
In this article it was shown how SAP Master Data Governance can be used as part of a NetWeaver
BPM cross-system master data process. The article also highlights how the capabilities of the build in
governance processes can be easily extended using SAP NetWeaver BPM. The combination of SAP
Master Data Governance with SAP NetWeaver BPM and SAP NetWeaver Master Data Management
addresses a wide range of scenarios in the area of Enterprise Master Data Management.