SAP R/3 is build upon a powerful metadata paradigm. The Data Dictionary and the BOR represent the foundation that allows ABAP developers to navigate the complex SAP application hierarchy and functionality with relative ease and comfort. The single store and the transport facilities built into R/3 allow for central control and easy distribution of business functionality.
The Visual Studio environment provides similar facilities with the most recent version 6.0, available since fall 1998. The Component Management facilities are built upon the Microsoft Repository and integrate with the Visual Studio shell via the Visual Component Manager (VCM).
Microsoft Repository provides a
common place to persist information about objects and relationships between
objects. In doing so, it provides a standard way to describe object-oriented
information used by software tools:
A software tool is modeled in
Repository through an information model. Each information model is stored in
the Repository database as a Repository type library.
The Repository database is dynamic
and extensible. Little of the actual structure is fixed; tables and columns of
data are added as new models are defined, and as existing models are extended.
This enables any software tool or set of software tools to be modeled by the
Repository. It also enables a user to extend existing models.
For example, Visual Basic® provides an information model called the Microsoft Development Objects
(MDO) Model. The MDO Model tracks Visual Basic projects in the Repository. The
set of existing Visual Basic projects is represented in the Repository by the
Contents collection.
The Repository is not limited to
software tools developed using Visual Basic. Visual Basic is only one of many
potential clients that can use the Repository to model a software system.
For more information about the Microsoft Repository please visit the Microsoft website at http://msdn.microsoft.com/repository/ or review the chapters on MSDN at: http://msdn.microsoft.com/isapi/msdnlib.idc?theURL=/library/devprods/vs6/repvb/htm/reconrepositoryoverview.htm .
Component-based software development
is the newest and most powerful way to build complex business applications.
Instead of constantly reinventing the wheel, developers of component-based
applications can simply "plug in" existing components that contain
the needed functionality. When the right component doesn't already exist, it
can be written once, and then cataloged for future reuse and sharing with other
applications.
With Visual Component Manager you can
publish components to a repository-based catalog, where they can easily be
located, inspected, retrieved, and reused.
The following sections provide
information to acquaint you with the important concepts of Visual Component
Manager.
|
Section |
Description |
|
Provides
an overview of Visual Component Manager and its features, as well as detailed
information on what you can accomplish with it. |
|
|
Describes
the Visual Component Manager Tool Window and acquaints you with its major
features. |
|
|
Describes
the three kinds of elements managed by Visual Component Manager, and explains
how they are used to organize components for sharing and reuse. |
|
|
Lists
the attributes that are assigned to components in Visual Component Manager.
These attributes are used to determine how the components will be stored and
reused, and to provide search criteria for locating the right component for
the job. |
The installation is generally performed during the setup of the SAP DCOM connector. The following activities occur during that timeframe, can be performed manually, or by re-installing the SAP DCOM connector.
VCM is dependent upon a repository catalog. A repository
catalog is a database that has the necessary Open Information
Models (OIM) for the Microsoft Repository installed – connectivity configuration
via ODBC is required prior to attempt loading information models. Microsoft SQL
Server 7.0 [any edition] (to be purchased separately) is currently the only
database tested and supported for the SAP VCM integration. Additional databases - to be purchased
separately - are supported by Platinum Technology.
Although the VCM user interface allows you to create repository catalogs
interactively, please do not attempt to do so for SAP business objects – the OIM
files delivered with the SAP DCOM connector are the only tested and supported
model files. If you do not wish to install the repository catalog during the
setup of the connector, you can use the insrepim.exe file to manually load the
OIM files or use the following VB code to create the repository catalog:
Dim reposDir As String
Dim instRepModel As New IMInstall ‘the OIM
installer provided by the repository SDK
Dim strDSN As String
Dim strRDMFile As String
Dim oVCM As New VcmMgr.Connect 'we need to
open the VCM catalog after the install _
‘ to
ensure proper functioning
Dim oVCMDb As Object
If ((txtSQLName = "" Or
Len(txtSQLName) = 0) Or _
(txtDBName = "" Or
Len(txtDBName) = 0) Or _
(txtDCOMCCDir = "" Or
Len(txtDCOMCCDir) = 0)) Then
MsgBox "You need to specify a SQL
Server 7.0 server and database!"
Exit Sub
End If
'load the open information models
represented in the RDM files
reposDir = txtDCOMCCDir &
"\ccrepository\"
strDSN = "server=" &
txtSQLName & ";database=" & txtDBName
'order of load is important...
strRDMFile = reposDir &
"UML.RDM"
instRepModel.InstallRDM DSN:=strDSN,
RDMFile:=strRDMFile, UserName:="", Password:=""
strRDMFile = reposDir &
"UMX.RDM"
instRepModel.InstallRDM DSN:=strDSN,
RDMFile:=strRDMFile, UserName:="", Password:=""
strRDMFile = reposDir &
"GEN.RDM"
instRepModel.InstallRDM DSN:=strDSN,
RDMFile:=strRDMFile, UserName:="", Password:=""
strRDMFile = reposDir &
"DTM.RDM"
instRepModel.InstallRDM DSN:=strDSN,
RDMFile:=strRDMFile, UserName:="", Password:=""
strRDMFile = reposDir &
"DBM.RDM"
instRepModel.InstallRDM DSN:=strDSN,
RDMFile:=strRDMFile, UserName:="", Password:=""
strRDMFile = reposDir &
"CDE.RDM"
instRepModel.InstallRDM DSN:=strDSN,
RDMFile:=strRDMFile, UserName:="", Password:=""
strRDMFile = reposDir & "COM.RDM"
instRepModel.InstallRDM DSN:=strDSN,
RDMFile:=strRDMFile, UserName:="", Password:=""
strRDMFile = reposDir &
"VCM.RDM"
instRepModel.InstallRDM DSN:=strDSN,
RDMFile:=strRDMFile, UserName:="", Password:=""
'in order to activate the repository for
immediate load it is necessary
'to load the db with the VCM component
Set oVCMDb = oVCM.OpenDB(sDB:=strDSN)
If Not Err.Number = S_OK Then
MsgBox Err.Description
Exit Sub
End If
The repository catalog generally only needs to be setup once at the time of the SAP DCOM connector. No Visual Studio developer or other consumer of VCM functionality has to setup the repository catalog – they only need to configure ODBC connectivity to the repository and connect to the database.
The SAP DCOM connector will record the successful setup of the repository catalog and will enable the DCOM Object Builder to automatically upload component metadata and the actual component DLL into the repository catalog. The current design simply uses the registry on the DCOM connector development system at: saves the connection information (DSN or other) as a REG_SZ key at: HKEY_LOCAL_MACHINE\SOFTWARE\SAP\MTS\ProxyGenerator\Repository.
|
Component |
Product |
Location |
|
Visual Component Manager |
Visual Studio 6.0 |
Locally: is required during DCOM Connector setup, if VCM integration is performed |
|
INSREPIM.DLL |
Repository SDK or the SAP DCOM connector |
Locally: is being used to install the model files |
|
MDAC 2.1 or higher (Microsoft Data Access Components) |
Windows NT/Windows 9x: setup via SQL Server 7.0; |
Locally: represents the connectivity technology for the repository catalog (ODBC for example) |
|
OIM files (.RDM): UML, UMX, GEN, DTM, DBM, CDE, COM, VCM |
SAP DCOM Connector (..\ccrep) or Repository SDK |
Locally available |
|
INSREPIM.EXE |
Repository SDK or the SAP DCOM Connector |
Optionally – if manual install of repository catalog is desired |
|
Microsoft SQL Server 7.0 or other compliant repository database |
Microsoft SQL Server 7.0 or other compliant database product |
Locally or remote |
The installation has provided the necessary repository
catalog that represents the central metadata and component storage. The next
step is to actually put SAP business objects into the repository catalog. There
are two ways to upload components:
a) via the DCOM Object Builder, who will automatically connect to the repository
and upload the generated component – much like it did provide automatic
component generation and registration before or
b) manually via any tool that can use COM components as described in the VB
code sniplet below:
Dim r As New Repository
Dim s As New SAPImport
Dim strDSN As String
Dim arClasses() As String
Dim i As Integer
If ((txtSQLName = "" Or Len(txtSQLName) = 0) Or _
(txtDBName = "" Or Len(txtDBName) = 0)) Then
MsgBox "You need to specify a SQL Server 7.0 server
and database!"
Exit Sub
End If
If (txtDLLPath = "" Or Len(txtDLLPath) = 0) Then
MsgBox "In order for VCM to work properly, you have to
provide the implementation DLL of the classes chosen!"
Exit Sub
End If
strDSN = "server=" & txtSQLName &
";database=" & txtDBName
r.Open strDSN
s.Import repos:=r, SchemaName:=cmbDCOMCCSchemaList.Text,
ClassNames:=arClasses, DllPath:=txtDLLPath
The process is straightforward: the tool (either the object builder or the custom code) establishes a connection to the repository catalog, creates an instance of the SAPImport tool and provides the SAP namespace, classnames and the path to the implementation dll. The SAPImport tool takes these classnames and queries the SAP component catalog of the local DCOM connector instance for the details of the classes. Along with the DLL, it will insert this information into the SAP Business Object folder of the repository catalog provided.
|
Component |
Product |
Location |
|
MDAC 2.1 or higher |
Windows NT/Windows 9x: setup via SQL Server 7.0; |
Locally: represents the connectivity technology for the repository catalog (ODBC for example) |
|
SAPImport.DLL |
SAP DCOM Connector |
Locally: imports the component and metadata into the repository |
|
CCAdmin.DLL |
SAP DCOM Connector |
Locally: queries the SAP COM catalog for metadata |
|
Microsoft Repository |
Visual Studio 6.0 |
Locally |
|
Microsoft SQL Server 7.0 or other compliant repository
database |
Microsoft SQL Server 7.0 or other compliant database
product |
Locally or remote |
The process of using the VCM is easy and very well documented in the above provided Visual Component Manager Tool Window discussion. The SAP components are stored inside the SAP business object catalogs folder:

The hierarchy is centered on the namespace – chosen via the DCOM object builder at compilation time. The DLL represents the packaging option chosen during compilation time and allows a drill-down into the interfaces, classes, methods, parameters and types of the SAP component: without having the SAP R/3 system present. The VCM also allows you to download and register the component DLL on your local machine – it does not support registration of a remote component, this has to be done via MTS explorer client export or other COM component deployment tools.
The SAP VCM integration is a mirror of the exported SAP business objects via the DCOM Object Builder. Although the VCM allows you to add annotations, descriptions and keywords to the SAP component, the VCM does not support the publishing of a SAP component directly – although the user interface seems to indicate that possibility. The only way to publish a SAP component into the repository is to build the component using the DCOM Object Builder and to publish as described in “Uploading Components”.
|
Component |
Product |
Location |
|
Microsoft Repository |
Visual Studio 6.0 |
Locally |
|
Visual Component Manager |
Visual Studio 6.0 |
Locally |
|
SAPHandler.DLL |
SAP DCOM Connector |
Locally: builds the link between the various metadata structures in the SAP repository |
|
VCMSAP.OCX |
SAP DCOM Connector |
Locally: builds the link between the VCM user interface and the SAP handler |
|
MDAC 2.1 or higher (Microsoft Data Access Components) |
Windows NT/Windows 9x: setup via SQL Server 7.0; |
Locally: represents the connectivity technology for the
repository catalog (ODBC for example) |
|
Microsoft SQL Server 7.0 or other compliant repository
database |
Microsoft SQL Server 7.0 or other compliant database
product |
Locally or remote |
|
SAP DCOM Connector |
SAP DCOM Connector |
[optional] Locally: if the components are supposed to run on the developer’s desktop, an installation of the DCOM connector is required. |