Visualize SAP Gateway OData services

SAP NetWeaver Gateway OData services can contain a comprehensive set of entity types and associations. A visual representation can help you understand and communicate the contents of a SAP Gateway OData service.

In this post I will describe how you can explore SAP Gateway OData services, using the Open Data Protocol Visualizer, a free extension for Visual Studio 2010.

Installing the OData Protocol Visualizer in VS2010

The Open Data Protocol Visualizer is a Visual Studio 2010 extension, which you can install via the Extension manager.

Launch the “Extension Manager” from the Visual Studio “Tools” menu.

image

The visualizer is available from the online gallery, in the Tools>Data section:

SNAGHTML30ffac2.

Click to download and install. Restart Visual Studio and you’re done!

Configure a SAP Gateway service

Let’s use the ubiquitous Flight service on the SAP Gateway demo system as an example. You will need the demo username/password, provided on this page.

The service URL for the Flight service is:

http://gw.esworkplace.sap.com/sap/opu/odata/IWBEP/RMTSAMPLEFLIGHT_2/

To use the OData visualizer, you need to create a project in VS and include a Service Reference to an OData service:

First, create (for example) a Console project. In the Service References section, right-click and select ‘”Add Service Reference”:

image

In the dialog box, enter the service Url in the Address field and provide a meaningful name in the Namespace field. Click on Go and provide the demo username and password. Visual Studio will now download the service information ($metadata). Once completed, you should now be able to expand the Service header and see the collections available through the Flight service.

SNAGHTML3273d1f

Click OK, and the Service is available for use in your project

Visualize SAP Gateway service

To start using the visualizer, right-click the Service reference and click ‘View in Diagram”

image

This opens the visualizer window. In the left pane, you will find a model browser, which lists Entity types, Associations, Complex Types and their Attributes. The center pane contains a  ‘canvas’ where you select and layout the visual representation of the model.

SNAGHTML33dadcc

A detailed view of the Flight and Booking entity types:

image

The OData visualizer has several useful features:

  • layout: determine how the shapes are visually arranged
  • zoom in/out: canvas can be zoomed in and out.
  • collapsed view: just shows entity types and associations, no attributes
  • select/deselect: determine which part of the ‘model’ you want to visualize
  • view in browser: automatically open the collection for a selected Entity type. E.g. View ‘Booking’ in browser will request the BookingCollection from the Flight service.
  • export to XPS: export the content to XPS file format (unfortunately no other file format is supported…).

Here’s an example of a collapsed (partial) view of the Activity Management service (based on SAP CRM):

image

 

Finally, here’s an example of the properties pane showing the attribute properties of the Value attribute of a Sales Order Item.

SNAGHTML38012a7

 

The OData visualizer can be a valuable part of your toolbox. Give it a try!

Thanks for reading.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s