Additional Blogs by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
AviadRivlin
Employee
Employee
0 Kudos
Drag&Relate is one of the most powerful functionality of the Unification Platform. This short Weblog will explain step by step how to create iViews that implements Drag&Relate between them. Please bear in mind that this is meant only to give the idea of Drag&Relate, hence, the example here is as simple as possible intentionally. After implementing this short example, you will be able to implement your own specific scenario over the back-end systems of your organization.

Pre-requirements

There are few pre-requirements that one must fulfill prior to going over this document:

- General Portal Knowledge (know how to create System Landscape, iViews, Roles etc)

- Full installation of NetWeaver 04 Portal

- A standard SQL installation with the Pubs database installed (the Pubs database is a default database that comes with every SQL installation)

Scenario

We will implement the scenario in which you are a publisher and would like to analyze your sales in each store. All your data is stored in a SQL database called pubs (which is supplied, in our case, with the default installation of the SQL)

Creation flow

In order to create our demo scenario we will create:

1. A System Landscape for the Pubs database

2. iViews that presents queries over the database

3. Import Business Objects

4. Define the relation between out Business Objects

Let's start working...

Login to the Portal as a System Administrator; go to System Administration -> System Configuration -> System Landscape. Create a new folder in which all our content will reside. Let's call this Folder Unification Practice Content. Inside the Unification Practice Content we will create our JDBC System.

Create a new System from the JDBC System template with the following parameters:

- Connection URL: jdbc:sap:sqlserver://HOST_NAME:SQL_PORT;DatabaseName=pubs

- Driver Class Name: com.sap.portals.jdbc.sqlserver.SQLServerDriver

- User Mapping Type: admin

- Admin Password (DQE): Password to access the pubs DB

- Admin user ID (DQE): User to access the DB

- System Alias: MyPubs

Logoff (*) and now login as a User Administrator. Here you will set the User Mapping for the System we have just created (with the alias MyPubs). Go to User Administration -> User Mapping, search for Everyone group and set the user mapping for the system we have just created. Typically it may be the sa user and the password of this user that you have supplied during the SQL installation; otherwise, any other user who have permissions on the Pubs database is good.

Logoff (*) and login as a Content Administrator in order to create all our content.

- Create a new Query iView over the Sales tables. Let's name this iView My Pubs Sales. Add the following field to the iView: stor_id, ord_num, ord_date, qty, payment. Change the visible name of each field to a meaningful name and finish the wizard.

- Create another Query iView over the Stores table. Let's name this iView My Pubs Stores, add the following field: stor_id, stor_name, stor_address, city, state and zip. Change the visible name of each field to a meaningful name and set the Link property of the stor_id field to Drag & Relate. Finish the wizard and go to the Drage&Relate Targets Display. Add the My Pubs Sales iView as a Drag&Relate target iView.

Import the relevant Business Objects. Right click on the Business Objects folder, select Import Business Objects, browse into your system (the MyPubs system) and import the sales and stores objects.

Now, let's define the relation between the stores BO and the sales BO. Go to: Content Administration -> Unification; add the stores BO as source and the sales BO as target. Edit this relation in order to set the relation condition to: Alias_1.stor_id=Alias_2.stor_id (make sure the condition appears in the test box).

Finally, we will create a Role; let's name this Role, Unification Role. Inside the role we will create a folder and add (as delta-link) the My Pubs Stores iView; assign the role to one of your end users and we are done.

Runtime Flow

Congratulations, we are done! Login to the Portal as your end user and start analyzing the sales per store in your publishing. We can do this by dragging each store_id on the My Pubs Sales iView and figuring out the results.

Troubleshooting

Listed bellow solutions for some common problems:

- Connection Test - If you have connection problem to the database, try using the Connection Test tool of the system; if the Connection Test fails it means that either some properties of the system are incorrect or the User Mapping is incorrect. Please revise these properties.

- DQE - If you do not manage to create the Query iView because you can not select the fields inside the System Landscape, try the following. Go to the System Landscape we have just created, change any property (such as the description property) and save. This action should solve the problem.

- Business Objects Importer - If your System Landscape does not appear in the Business Object Importer iView, try to refresh the iView. This may solve the problem.

- Permissions - Make sure your End User has End User Permissions over the System Landscape you are using.

Hope you will find this document helpful, any comments are more than welcomed,

Aviad

------------------------------------------------------------------------------------------------

(*) One may work as a Super Administrator user instead of logging off and logging in back

6 Comments