Anda di halaman 1dari 51

How-to Guide

SAP NetWeaver ‘04s

How To…
Create Master
Data Centrally
Using Guided
Procedures
Version 1.00 – May 2006

Applicable Releases:

SAP NetWeaver ‘04s


© Copyright 2006 SAP AG. All rights reserved. contained in this document serves informational
purposes only. National product specifications may vary.
No part of this publication may be reproduced or
transmitted in any form or for any purpose without the These materials are subject to change without notice.
express permission of SAP AG. The information These materials are provided by SAP AG and its affiliated
contained herein may be changed without prior notice. companies ("SAP Group") for informational purposes
only, without representation or warranty of any
Some software products marketed by SAP AG and its kind, and SAP Group shall not be liable for errors or
distributors contain proprietary software components of omissions with respect to the materials. The only
other software vendors. warranties for SAP Group products and services are those
that are set forth in the express warranty statements
Microsoft, Windows, Outlook, and PowerPoint are
accompanying such products and services, if any.
registered trademarks of Microsoft Corporation.
Nothing herein should be construed as constituting an
IBM, DB2, DB2 Universal Database, OS/2, Parallel additional warranty.
Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400,
These materials are provided “as is” without a warranty
iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent
of any kind, either express or implied, including but not
Miner, WebSphere, Netfinity, Tivoli, and Informix are
limited to, the implied warranties of merchantability,
trademarks or registered trademarks of IBM Corporation
fitness for a particular purpose, or non-infringement.
in the United States and/or other countries.
SAP shall not be liable for damages of any kind including
Oracle is a registered trademark of Oracle Corporation.
without limitation direct, special, indirect, or
UNIX, X/Open, OSF/1, and Motif are registered consequential damages that may result from the use of
trademarks of the Open Group. these materials.

Citrix, ICA, Program Neighborhood, MetaFrame, SAP does not warrant the accuracy or completeness of
WinFrame, VideoFrame, and MultiWin are trademarks the information, text, graphics, links or other items
or registered trademarks of Citrix Systems, Inc. contained within these materials. SAP has no control
over the information that you may access through the
HTML, XML, XHTML and W3C are trademarks or use of hot links contained in these materials and does not
®
registered trademarks of W3C , World Wide Web endorse your use of third party web pages nor provide
Consortium, Massachusetts Institute of Technology. any warranty whatsoever relating to third party web
pages.
Java is a registered trademark of Sun Microsystems, Inc.
SAP NetWeaver “How-to” Guides are intended to
JavaScript is a registered trademark of Sun Microsystems, simplify the product implementation. While specific
Inc., used under license for technology invented and product features and procedures typically are explained
implemented by Netscape. in a practical business context, it is not implied that those
features and procedures are the only approach in solving
MaxDB is a trademark of MySQL AB, Sweden.
a specific business problem using SAP NetWeaver. Should
SAP, R/3, mySAP, mySAP.com, xApps, xApp, and other you wish to receive additional information, clarification
SAP products and services mentioned herein as well as or support, please refer to SAP Consulting.
their respective logos are trademarks or registered
Any software coding and/or code lines / strings (“Code”)
trademarks of SAP AG in Germany and in several other
included in this documentation are only examples and
countries all over the world. All other product and
are not intended to be used in a productive system
service names mentioned are the trademarks of their
environment. The Code is only intended better explain
respective companies. Data
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.

-2-
Table of Contents
Table of Contents........................................................................................................................ 3

Introduction ................................................................................................................................. 5

Prerequisites............................................................................................................................... 6

Process flow ............................................................................................................................... 7

Process flow diagram.................................................................................................................. 8

Step 1: Unarchive MDM Repository............................................................................................. 9

Unarchive ................................................................................................................................ 9

Test connection ....................................................................................................................... 9

Step 2: Create Portal System and Test...................................................................................... 11

Create MDM Folder ............................................................................................................... 11

Create MDM System ............................................................................................................. 11

Create system alias ............................................................................................................... 12

Create user mapping for testing ............................................................................................. 13

Test Connection .................................................................................................................... 13

Step 3: Create Role................................................................................................................... 15

Create Role in PCD ............................................................................................................... 15

Make Role an Entry Point ...................................................................................................... 15

Add vendor search page to role ............................................................................................. 16

Change ‘Display Columns’ parameter .................................................................................... 17

Add User to Role for Testing.................................................................................................. 19

Step 4: Create Group and Assign Roles .................................................................................... 21

Step 5: User Mapping for Group ................................................................................................ 22

Step 6: Create Users................................................................................................................. 24

Step 7: Import CAF / GP content ............................................................................................... 25

Import content using Software Deployment Manager (SDM) .................................................. 25

Releasing the content ............................................................................................................ 25

Assign default roles to process .............................................................................................. 26

Step 8: Create portal page for GP ............................................................................................. 29

Copy process URL ................................................................................................................ 29

Create WebDynpro iView and page ....................................................................................... 29

-3-
Set ‘Application Parameters’ property for iView ...................................................................... 31

Assign WebDynpro page to Vendor role ................................................................................ 32

Step 9: Configure the UWL Connector for GP............................................................................ 33

Step 10: Test Scenario.............................................................................................................. 34

Create new business partner ................................................................................................. 34

Add data to business partner ................................................................................................. 35

Approve business partner ...................................................................................................... 37

Extending the application .......................................................................................................... 41

Appendix................................................................................................................................... 49

Files required for this How-To guide....................................................................................... 49

Skills required........................................................................................................................ 49

Related Content .................................................................................................................... 49

Disclaimer & Liability Notice ...................................................................................................... 50

Copyright ......................................................................................Error! Bookmark not defined.

-4-
Introduction
This article will show you how to implement a central master data management scenario using guided
procedures in a short timeframe using SAP NetWeaver as a platform. The scenario will focus on the central
creation of business partner master data.

The distribution of the master data to backend systems connected to a SAP MDM Server requires additional
configuration steps that are not part of this guide.

The figure below shows the basic process that you will implement using this guide. There are three distinct
roles and each role will have to carry out certain tasks before a new business partner is created on the MDM
Server.

Figure 1: Create a new business partner centrally

If you are interested to find out which skills are required to follow the article please have a look in the
appendix.

-5-
Prerequisites
The following software has to be installed in order to follow the instructions in this how-to guide.

• MDM Server, MDM Console and MDM Data Manager (all components MDM 5.5 SP3 Patch 1)

• NetWeaver Portal 7.0 (NW2004s SPS6)

• CAF Core (latest version)

• CAF GP (latest version)

• MDM Business Package (for MDM 5.5 SP3 Patch 1)

The setup described in this article was tested only with the product releases mentioned above. You may
choose to use different versions. If you experience difficulties in particular connection problems to the MDM
server you may need to make changes to the source code. Follow the instructions in section Extending the
application on page 41. In this context it is most important that you update the library MDM4J.jar in the DC
libmdm1 to the version that matches the MDM Server version that you have installed.

Please consult the installation guides at http://service.sap.com/instguides for instructions on how to


download and install the required packages.

The MDM Business Package consists of four files that have to be deployed using the Software Deployment
Manager (SDM). Make sure that the Business Package has the same patch level as the MDM 5.5 Server.

You will also need a portal user (referred to as administrator throughout this guide) that has the following
roles assigned:

• super_admin

• com.sap.caf.eu.gp.roles.superuser

• com.sap.caf.eu.gp.roles.runtime

• com.sap.caf.eu.gp.roles.designtime

• com.sap.caf.eu.gp.roles.administration

Attention

Important updates to this how-to guide will be posted on SDN. Please check the article weblog for updates.

-6-
Process flow
The table below lists individual descriptions for each of the steps involved in setting up the scenario to
centrally create business partner master data in MDM.

Step Process Step Name Description Page

1 Unarchive MDM Use the MDM Console to unarchive the repository that is delivered 9
Repository as part of this how-to guide.

2 Create Portal System To allow applications running in the portal to access the MDM 11
and Test server a portal system needs to be defined.

3 Create Role The purpose of this step is to create a portal role called Vendor. 15
This role will contain two pages: search / create business partner.

4 Create Group and Create a group called mdm and assign the Vendor role that was 21
Assign Roles created in step 3 to this role.

5 User Mapping for Group All users that are part of the mdm group use the same user / 22
password to access the MDM server. To achieve this you do a
user mapping for the mdm group in this step.

6 Create Users You will need a few portal users set up to run the full scenario. 24
That’s what this step is about.

7 Import CAF / GP content Probably most important is the actual ‘create business partner’ 25
application. The application consists out of several WebDynpro
applications and Guided Procedure configuration.

8 Create Portal Page for Create an iView and a portal page to be used for starting the
Guided Procedure (GP) ‘Create Business Partner’ process. You will assign the newly
created page to the Vendor role that you created in step 3. 29

9 Configure the UWL To display tasks originating from Guided Procedures also in the 33
Connector for Guided Universal Worklist you have to register the UWL Connector for
Procedures Guided Procedures.

10 Test Scenario Final test of the full scenario. 34

11 Extending the You are a developer and what to make changes to the application. 41
application

-7-
Process flow diagram

-8-
Step 1: Unarchive MDM Repository
In this section you will unarchive and load the vendor repository that is delivered as part of this article. The
exact filename of the archive is provided in the appendix section.

Unarchive

To unarchive the repository first copy the .a2a file to the archive directory of your MDM server installation. If
you have a default installation this directory is located under \Program Files\SAP MDM
5.5\Server\Archives.

Next open the MDM Console and start your MDM server. Right-click on the server icon and select Unarchive
Repository. Follow the steps of the wizard.

Figure 2: Unarchive Repository in MDM Console

Test connection

When your have finished unarchiving the repository (patience - this might take a little while), you should load
the repository as shown in the picture below.

Figure 3: Load the repository

-9-
After the repository is loaded successfully you can close the MDM Console. Please open the MDM Data
Manager to test the connection to the repository. You should be able to connect to the repository using
portal/portal as username and password respectively.

Figure 4: Use the MDM Data Manager to check the connection to the repository

When you have confirmed that you can log on to the repository with the MDM Data Manager you can
continue with the next step in the how-to guide.

- 10 -
Step 2: Create Portal System and Test
To allow applications running in the portal to access the MDM server, a portal system needs to be defined. In
this section you will create a MDM system and test the connection to the MDM server.

Create MDM Folder

First create a folder in the Portal Content Directory (PCD) to store systems, iViews, pages and roles created
for this scenario.

Navigate to System Administration -> System Configuration -> System Landscape. Then create a folder
called Mdm under Portal Content.

Create MDM System

In the Mdm folder you can now create a system. Choose the System (from template) option as shown in the
picture below.

Figure 5: Create a system (from template)

When the system wizard opens you can proceed through the steps entering the information provided in the
table below.

- 11 -
Step Parameter / Value

1 System Template: MDM System

2 System Name: mdmlocal


System ID: mdmlocal

3 MDM Server: localhost

4 Repository: Vendor_Portal

5 Language: Automatic

6 Schema Language: EN

7 Summary

Table 1: Input for the create table wizard

When you have finished the system wizard your summary screen in step 7 should look similar to the one
shown below.

Table 2: Summary of system creation wizard

Create system alias

To be able to do a user mapping later on you will need to create an alias for your mdm system. Open your
system in the iView editor and in the Display drop down box select System Aliases. Create a system alias
with the name SAP_MDM_Repository_Vendors (the exact name is important). Save your changes.

- 12 -
Figure 6: Create system alias

Create user mapping for testing

To test the connection to the MDM Server you need to provide user mapping information. The quickest way
to do this, is by clicking on the Personalize link on the top right hand corner of you portal screen. In the left
hand menu select User Profile and then select the user mapping tab on the right hand side.

In the System drop down box select SAP_MDM_Repository_Vendors and enter portal / portal as user /
password and save your settings.

Figure 7: User mapping

Test Connection

You have created a mdm system, an alias for the system and done the user mapping. Now you are ready to
test the connection to the MDM Server.

Still in the system editor with your mdmlocal system open, select Connection Tests in the Display drop down
box. Tick the box that says Connection Test for Connectors and press the test button. Continue with the next
section if the test was successful.

- 13 -
Figure 8: Test connection to the MDM Server

- 14 -
Step 3: Create Role
The purpose of this step is to create a portal role called Vendor. This role will contain two pages: a search
page and a create business partner page.

Create Role in PCD

To create a role in the Portal Content Directory (PCD) navigate to Content Administration -> Portal Content.
Locate the Mdm folder in the PCD tree, right click and select New -> Role.

Figure 9: Create role

Use the input from the table below to populate the entry fields in the wizard.

Step Parameter / Value

1 Role Name: Vendor


Role ID: vendor

Table 3: Input for create role wizard

Open the Vendor role in the PCD role editor to continue with the next section.

Make Role an Entry Point

Make the role an entry point (creates an entry in the Top Level Navigation) by selecting Yes for the Entry
Point property of the role as shown in the picture below.

- 15 -
Figure 10: Make role an entry point

Add vendor search page to role

The business package for MDM contains a vendor search page. You can use this page in your vendor
role.The exact path to locate the vendor search page in the Portal Content Directory (PCD) is

Portal Content -> Content Provided by SAP -> specialist -> MDM Application -> Pages -> Vendors -> Search

With your Vendor role still open in the role editor on the right hand side of the screen select the search page
and add it to the role as a delta link (shown in the figure below).

- 16 -
Figure 11: Add search page to role

Change ‘Display Columns’ parameter

To avoid error messages on the vendor search page you must change the Display Columns parameter in the
Result Set iView. The easiest way to do this is to start from the role editor where you still have the Vendor
role open. Select the Search page and press the Edit button.

- 17 -
Figure 12: Edit search page

You should now see the screen shown below. Tick the box for the Result Set iView and press the Open
button.

Figure 13: Vendor search page

To locate the Display Columns parameter select Show All in the Property Category drop down menu. Then
scroll down until you see the Display Columns parameter. Change the values as shown in the screenshots.

- 18 -
Figure 14: Show all properties of the result set iView

Figure 15: Change the Display Columns field

Add User to Role for Testing

To make sure that your new role is working it is recommended to test the role with the administrator user.
This test can only be successful if the user mapping was done correctly.

Open the newly created vendor role (User Administration -> Identity Management) and add the administrator
user in the Assigned Users tab.

Figure 16: Assign administrator to Vendor role

- 19 -
After you have saved your settings you can press the refresh button in you browser to load the updated Top-
Level-Navigation (TLN). You should now see a Vendor entry in you TLN and from the Vendor entry you can
access the MDM Search page as shown below.

Figure 17: Testing the Vendor role

- 20 -
Step 4: Create Group and Assign Roles
In this section you create a group called Mdm and assign three roles to this group. When you create portal
users in the next section you will assign these users to the Mdm group.

The table below contains role assignment for the group.

Groupid Assigned roles

mdm com.sap.caf.eu.gp.roles.runtime, eu_role, vendor

To create the group navigate to User Administration -> Identity Management. In the drop down select Group
and then press the Create Group button. Enter the group name and group id. Next select the Assigned Roles
tab strip. Assign the three roles as shown below and afterwards save your changes.

Figure 18: Assign roles to Mdm group

- 21 -
Step 5: User Mapping for Group
All users that are part of the mdm group use the same user / password to access the MDM server. To
achieve this you do a user mapping for the mdm group in this step.

In order to do the user mapping you must first edit the permissions for the mdm system object that you have
created before. When editing the permissions you need to add read and end user permissions for the group
mdm as shown below.

Figure 19: Add permissions for group mdm

After you have changed the permissions go to User Administration -> Identity Management to do the user
mapping for the group using portal / portal as username and password respectively.

- 22 -
Figure 20: Create user mapping for group mdm

- 23 -
Step 6: Create Users
You will need a few portal users to run the full scenario. In this step you create these users and assign them
to the groups specified in the table below.

To create the users navigate to User Administration -> Identity Management.

Userid Name Description Group

md_user Jessica Gould BP create requester mdm

md_spec Sara Price Add BP data mdm

md_manager Michael Adcock Approve BP request mdm

md_admin Alex Lam Oversees process mdm,


administrators

Table 4: User details

- 24 -
Step 7: Import CAF / GP content
Import content using Software Deployment Manager (SDM)

In this step you will use the Software Deployment Manager (SDM) to deploy two files [HTGWD], [HTGGP]
(refer to the appendix for the filenames). These files contain the application and logic for the central master
data scenario.

For detailed instructions on how to deploy files with SDM please refer to SDM Remote GUI Client on the
SAP Help portal.

Figure 21: SDM after the two archives have been loaded

You may receive some warning messages during the deployment. These can be ignored.

Releasing the content

To access the Guided Procedure (GP) for the central master data scenario in the GP Designer you must first
release the objects that you have deployed in the previous step.

Open the GP Admin Homepage in your portal. On the Administration workset page click on Manage
Imported Objects.

- 25 -
Figure 22: Administration workset page

Select IDES_MDM -> MDMBupaRequest to see a list of the objects that you need to release. Add all objects
individually or alternatively select the MDM Business Partner Request process and all other development
objects will be imported automatically.

Figure 23: Select all objects individually or just select the process

Follow the wizard to release the objects.

Assign default roles to process

After releasing the objects you are almost ready to use the Guided Procedure (GP) application. However
because the business process for creating business partners involves several steps that are executed by
different roles you will need to assign users (roles or groups are also possible) to these process roles.

- 26 -
The table below provides an overview of the roles that you have in the GP process and the users that you
want to assign to these roles.

Process Role Userid User Name

Overseer md_admin Alex Lam

Requester md_user Jessica Gould

Approve md_manager Michael Adcock

Processor of Add Data md_spec Sara Price

Administrator md_admin Alex Lam

Owner md_admin Alex Lam

Table 5: Process role to user assignment

The figures below show how to navigate to the MDM Business Partner Request process.

Figure 24: Navigate to the MDM Business Partner Request process

- 27 -
Figure 25: Open the process for edit

Next locate the process tab strip and select the Default Roles tab. You will find that none of the roles on the
left are assigned to any users. Assign users to the process roles according to Table 4 and save your
changes when you are finished.

Figure 26: Assign users to roles

- 28 -
Step 8: Create portal page for GP
Copy process URL

In the portal navigate to Guided Procedures -> Design Time and here to IDES_MDM -> MDMBupaRequest -
> MDM Business Partner Request (process). Open the process for edit and locate the process tab strip. On
the tab strip select the Instantiation tab. Select both tick boxes that are shown and press the button Generate
Instantiate URL.

You will see a URL string appearing in the white box. From this string copy everything behind the question
mark to Microsoft Notepad (or any other text editor). You will need these URL parameters again in one of the
next steps.

Figure 27: Copy request URL

Create WebDynpro iView and page

In this section you will create the WebDynpro iView that is used to start the create business partner process.
The iView will be placed on a page that can then be assigned to your Vendor role.

Figure 28: Create new iView in the Mdm folder

- 29 -
In the Portal Content Directory (PCD) locate your Mdm folder and right click. To create a new iView select
New -> iView. Use the input values from the table below to fill in the values in the iView wizard.

Step Parameter / Value

1 Source Type: WebDynpro application

2 iView Type: single full-page iView

3 Source Objects:
sap.com/caf~eu~gp~ui~inst/com.sap.caf.eu.gp.ui.inst.AInstantiation/AInstantiation

4 iView Name: Create Business Partner

5 Page Creation: Open page wizzard

6 Page Template: WebDynpro proxy

7 Page Name: Create Business Partner


Page Id: cbp

8 Page Layout: One Column (full width)

9 Summary

Table 6: Input for iView creation wizard

In step three of the iView wizard you are asked to select the WebDynpro application for the iView. Choose
the AInstantiation application as shown in the figure below.

- 30 -
Figure 29: Step 3 of iView creation select source object

When you have completed the wizard you should see a summary screen that looks similar to the one shown
below.

Figure 30: Summary screen with details of the iView and page creation process

Set ‘Application Parameters’ property for iView

Once you have created the iView you need to open it with the iView editor to change the Application
Parameters property. If you can not find the Application Parameters property make sure that you have Show
All selected in the Property Category drop down box.

Remember the string that you have copied to Notepad (or some other text editor) at the beginning of this
section? Copy this string into the Application Parameters value field as shown in the figure below (note that
your URL will be slightly different to the one displayed).

- 31 -
Figure 31: Editing the Application Parameters iView property

Assign WebDynpro page to Vendor role

As final step in this section you will assign the Create Business Partner page to your Vendor role.

To do this, open the Vendor role in the role editor and right click the Create Business Partner page in the
PCD tree. Select Add Page to Role -> Delta Link.

Figure 32: Add the process start page to the Vendor role

- 32 -
Step 9: Configure the UWL Connector for GP
To display tasks originating from Guided Procedures in the Universal Worklist (UWL) you have to register
the UWL Connector for Guided Procedures. Navigate to System Administration -> System Configuration ->
Universal Woklist & Workflow -> Universal Worklist – Administration. Click the New button. As Connector
Type select GuidedProcedureConnector from the drop down. As System Alias enter localsystem (or any
other string). Saving your setting will automatically activate the connector.

Figure 33: Configure Guided Procedure Connector for UWL

- 33 -
Step 10: Test Scenario
Congratulations, you have completed all the steps and are now ready to test the full central master data
management scenario. The test will involve three distinct process steps. Each process step will be executed
by a specific user and you will need to login and logout a few times.

Create new business partner

You start the process as the user with the id md_user. This is the local purchaser who will identify the need
for a new business partner to be created and submits the initial application.

Figure 34: Create new business partner

Figure 35: A business partner (BP) search reveals that a new BP needs to be created

- 34 -
Figure 36: A new BP is requested

Figure 37: Confirmation page

Add data to business partner

The accounting specialist receives a task in his inbox that a new business partner was requested, reminding
him to add accounting data for this business partner.

- 35 -
Figure 38: Add data to business partner

Figure 39: Universal Worklist task for accounting specialist to add accounting data

- 36 -
Figure 40: Accounting specialist adds accounting details for BP

Figure 41: Confirmation Page

Approve business partner

The master data manager (user id md_manager) will need to approve the new business partner request.
After the manager logs in to the portal he will find a task in the Universal Worklist, reminding him to approve
the new business partner. Before the final approval the manager does a master data search to ensure that
the business partner does not already exist.

- 37 -
Figure 42: Approve business partner

Figure 43: Approval task in the Universal Worklist

- 38 -
Figure 44: Check business partner data

Figure 45: Confirmation page

- 39 -
Figure 46: Use the MDM Data Manager to check if the business partner has been created

- 40 -
Extending the application
You have configured the application according to the instructions in this guide and everything is running fine.
Now you want to change the scenario to fit your requirements.

There are many things that you may want to change. For example you want to change the business partner
request input screens, add or remove input fields or extend the business process. To change the screens
WebDynpro and Java development skills are required. Some process changes may require a deeper
understanding of Guided Procedures.

Teaching WebDynpro, CAF, or Guided Procedure skills are out of the scope for this ardicle. There are many
examples on the SAP Developer Network and additional documentation on the SAP Help website to get
familiar with these technologies. Have a look at the references section for a list of related information.

In this section we want to focus on the architecture of the application and get you started with setting up the
project in your SAP NetWeaver Developer Studio. You should then be in a good position to start making
changes to the application.

In the figure below you can see the different objects that make up the Guided Procedure and how they are
related.

Figure 47: Architecture of the Create Business Partner Guided Procedure

Four of the callable objects in the figure above are WebDynpro components that implement the
IWebDynproCO interface. The callable object CreaBupa implements the interface
IBackgroundCallableObject.

- 41 -
To get started with development first extract the source code delivered with this article (see the appendix for
download link) to the LocalDevelopment folder of your NWDS installation (for example
...\.dtc\LocalDevelopment).

Figure 48: Extract source code archive to LocalDevelopment folder

In the figure above you see how your directory should look like after you have extracted the source code zip
archive.

The files in the zip archive are read only. To make changes or even to build and deploy the Development
Components (DC’s) you should remove the read only flag on all files below the LocalDevelopment folder
(select Apply changes to this folder, subfolders and files). Figure below illustrates this step.

- 42 -
Figure 49: Remove read only attributes on all files below the LocalDevelopment folder

Next you can open your NWDS and switch to the Development Configurations perspective. In the Local DCs
view open the tree under MyComponents. You should now see the DCs that you can import. Select the DCs
as shown below and create projects out of them by selecting Create Project in the context menu.

- 43 -
Figure 50: Create projects

Once the projects are created you can switch to the Navigator perspective and should be able to see all the
projects as shown below.

Figure 51: Projects in the Navigator perspective after the import

You are ready to make your own changes now. For example to add or remove fields on the Create Business
Partner input screen, open the WebDynpro perspective open the DC reqbupa1, navigate to the views, open
the view RequBupaV, change to the Layout tab and start making your changes.

- 44 -
Figure 52: The WebDynpro view Create Business Partner

As somebody who has done WebDynpro development in the past you know that there is a bit more to it then
just changing the Layout of course, but here is a starting point.

As mentioned above, the callable object CreateBupa is implementing the interface


IBackgroundCallableObject which is accessed by the Guided Procedure. The figure below shows the
relevant code of the CreateBupa class.

package ides.com.mdm.bco;
[...]
public class CreateBupa implements IBackgroundCallableObject {
[...]
public void execute(IExecutionContext executionContext)
throws TechnicalException {
[...]
Create crea = new Create();
[...]
ret = crea.addRecord(
VAT, //vat_reg_nr,
VendorNumber, //vendor_nr,...
}

- 45 -
[...]
}

Implementation of IBackgroundCallableObject.execute(IExecutionContext), which is called by


Guided Procedure, creates an instance of Create class, which is the entry point of MDM Java API call, and
passes WebDynpro values to Create class. This entry point will also access Connect and Schema to
connect to MDM server and then create corresponding MDM data.

This example application only shows the workflow of MDM data creation. In case other actions like
modification and deletion are required, you may append new classes like ModifyBupa and Modify to
implement other MDM function calls.

Because the application shipped with this article is just an example application to get you started with a
similar project, some parts of the application have room for improvement.

For example the classes that create the business partner in the backend: At the moment the connection
parameters including username and password are hard coded. You may want to change this to retrieve the
connection parameters from the portal system landscape service.

The figures below show the location of the Connect class and the relevant part of the source code that
contains the hard coded system data.

Figure 53: Locating the Connect class

The source code below shows the Connect class. It contains connection information for the MDM
repository.

package ides.com.mdm.bco;

import java.io.InputStream;
import java.util.Properties;
import a2i.common.CatalogData;
import a2i.generated.RC;

- 46 -
public class Connect {

static private CatalogData catalog = null;

static private String hostname = "localhost";


static private int port = 2000;
static private String username = "portal";
static private String password = "portal";
static private String language = "English [US]";

After you have made changes to the application you need to build and deploy the effected DC’s.
Deployment is straight forward. To deploy the complete application you need to deploy the four WebDynpro
DC’s (figure below) and two J2EE libraries DC’s.

Figure 54: Deploy WebDynpro DC's

- 47 -
Figure 55: Deploy library DC's

Just, in case you wonder how to deploy the Background Callable Object contained in the Java DC. To deploy
the Background Callable Object CreateBupa you must wrap it in a J2EE library DC and then deploy the
library DC. This was already done for you and the wrapper library DC is called libcrbup. More detailed
information can be obtained from the article Implementing and Exposing a Background Callable Object
located on the SAP help website.

- 48 -
Appendix
Files required for this How-To guide

The source code and deployable files for this guide can be downloaded from
http://mdmhowtoguide.filetap.com (for technical reasons we can not provide a SDN link). Make sure that you
have read and understood the disclaimer and liability notice at the end of this document before downloading
the files.

Ref. Filename Description File Size

H2GVP H2G_VendorPortal.a2a MDM Repository archive 132,674 bytes

HTGWD H2G_WebDynpro.sca WebDynpro callable objects 57,876,320 bytes

HTGGP H2G_GuidedProcedures.sda Guided Procedure 114,863 bytes

HTGSC H2G_SourceCode.zip Source Code for WebDynpro 45,465,058 bytes


callable objects

Skills required

To follow this how to guide the following skills are useful:

• SAP NetWeaver Portal administration skills

• SAP Master Data Management configuration and administration skills

To make changes to the Guided Procedure additional skills are required depended on the level of changes.

• Understanding of the SAP Composite Application Framework (CAF)

• Understanding of the SAP Guided Procedures

• Java development skills

• Basic understanding of SAP WebDynpro development

• Understanding the SAP MDM Java API

Related Content

Please include at least three references to SDN documents or web pages.

1. Creating Composite Applications

2. How To…Implement the Callable Object Interface within WebDynpro Components

- 49 -
3. SAP NetWeaver topics on SDN

4. Implementing and Exposing a Background Callable Object

5. SDM Remote GUI Client

Disclaimer & Liability Notice


The primary objective of this article is to demonstrate the capabilities of SAP NetWeaver. The source code
provided as part of this guide should be treated as an example only and is not supported.

SAP will not be held liable for any damages caused by using or misusing of the code and methods
suggested here, and anyone using these methods, is doing it under his/her own responsibility.

SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of
the technical article, including any liability resulting from incompatibility between the content of the technical
article and the materials and services offered by SAP. You agree that you will not hold SAP responsible or
liable with respect to the content of the Technical Article or seek to do so.

- 50 -
www.sdn.sap.com/irj/sdn/howtoguides

- 51 -

Anda mungkin juga menyukai