Summary: Learn how to install the Office Business Application Starter Kit for SAP (OBA Starter Kit for SAP), including where to download the files and how to set up the environment.
Jan Narkiewicz, Softagon
Applies to: Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office System, Microsoft Office Excel 2007, Microsoft Office PowerPoint 2007
Download OBA/VSTO Starter Kit v. 1.0 Source Code.
The Office Business Application Starter Kit for SAP (OBA Starter Kit for SAP) showcases the power of Microsoft Visual Studio 2005 in conjunction with Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office System (also known as Visual Studio 2005 Tools for Office Second Edition, or VSTO 2005 SE). These development tools combined with the Microsoft .NET Framework version 2.0 provide a compelling approach to integrating SAP enterprise processes into applications in the 2007 Microsoft Office system, such as Microsoft Office Excel 2007 and Microsoft Office PowerPoint 2007.
This article describes how to install the OBA Starter Kit for SAP. It includes an overview of the prerequisites for running the starter kit’s sample application and accessing the development environment. In-depth instructions are also provided for configuring SAP.
The OBA Starter Kit for SAP runs as a Microsoft Office add-in. This starter kit integrates with Excel 2007 and PowerPoint 2007 and uses SQL Server Express as an ancillary data repository. SAP NetWeaver 2004s also provides data used by the application. To install the starter kit, you need the following components:
Microsoft Office. The starter kit was developed for Microsoft Office Professional, but any version of Microsoft Office shipping with Excel 2007 and PowerPoint 2007 will suffice.
Microsoft .NET Framework 2.0. This is available by installing the Microsoft .NET Framework Version 2.0 Redistributable Package from the Microsoft Download Center, or by using Windows Update.
Microsoft Visual Studio 2005 Professional, or one of the Microsoft Visual Studio 2005 Team System editions.
Microsoft Visual Studio 2005 Tools for Office Second Edition runtime. This runtime is available from the Microsoft Download Center.
2007 Microsoft Office System Update: Redistributable Primary Interop Assemblies. This update is available from the Microsoft Download Center.
Microsoft SQL Server 2005 Express Edition. This version of SQL Server 2005 is available as a free download from the SQL Server 2005 Express Edition download page. Be sure to check for the latest service packs as part of the process of installing this package.
SAP NetWeaver 2004s. SAP specifies 22 gigabytes (GB) of disk space as a requirement to install this application. For an overview of how to install SAP NetWeaver 2004s, see Appendix A: Installing SAP NetWeaver 2004s.
After SAP NetWeaver 2004s is installed, it is mandatory to seed the SAP data store with timely data. This requires an extra step as part of the installation; namely, running the SAPBC_DATA_GENERATOR program, as explained in Appendix A.
The following prerequisites are specific to developers only. Users who only want to run the sample application as an Office add-in do not need to install the following components:
Visual Studio 2005. The OBA Starter Kit for SAP was developed with Visual Studio 2005 Professional in Visual C#. This application can be built with any commercial version of Visual Studio 2005 that supports C# development.
Visual Studio 2005 Tools for Office Second Edition. This is available as a free download from the Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office System download page.
SAP has a Software Developer Network (SDN) Web site that contains the tools required to create applications that work with SAP products. At the time this article was written, the SAP Software Developer Network could be found at https://www.sdn.sap.com/irj/sdn. This site requires registration to use. Once registered as a member of the SDN, you can download a trial edition of SAP NetWeaver 2004s.
To find this software, navigate on the site to SAP NetWeaver, then Application Server, then ABAP. Select the download "SAP NetWeaver 2004s ABAP Trial Version". At the time this article was written, this is a two-part download that requires nearly 3 GB of space, and it expands to 22 GB during the installation process. The site provides details with respect to all hardware requirements and operating system prerequisites.
You can install the OBA Starter Kit for SAP as a standard application (no source code) or open it as a Visual Studio 2005 solution. Non-developers should install the application so they can evaluate and demonstrate integration between Microsoft Office and SAP. Developers should use the Visual Studio 2005 solution as an example of how to develop code that integrates SAP with Office.
Installing the Sample Application
The OBA Starter Kit is built around a sample application that automates the selling of vacation packages for a travel agency, Contoso Tours. An installer is provided for this sample application. The installer is located under the \SAPSK_Installer directory of the starter kit. This installer is launched by invoking Setup.exe. The installer assumes the previously discussed prerequisites have been installed. The installation process simply requires the user to click Next several times and does not permit customization of the installation process, as more complex applications often do.
It is important to note that the components of the Contoso Tours sample application are installed in the directory C:\ Program Files\Microsoft\Contoso Tours (SAPSK). This directory location is hard-coded.
The starter application is also automatically attached as an add-in for Excel 2007 and PowerPoint 2007. When installed, the starter kit appears as a custom Ribbon added to the Office application.
Figure 2. Starter Kit Ribbon customization
Installing Sample Data
The OBA Starter Kit for SAP makes use of the sample data that is provided with a standard installation of SAP NetWeaver 2004s. To augment this sample data, the starter kit provides a mechanism by which to add additional data to the application. This is available only the first time the application is used and is shown only after logging in, as you will see later. Log in to the application by clicking the Login button. This button displays a dialog box into which SAP credentials are to be entered.
Use the following login credentials for the SAP NetWeaver 2004s sample application:
Clicking the Login button causes the credentials to be validated against the SAP installation. If this is the first time the application is run, a message is displayed, as shown in Figure 4.
This message is included mainly because this is a sample application (a starter kit) and SAP comes with a limited set of sample data. Real-world applications do not include screens that populate sample data. Clicking the Seed the database link starts a background task that seeds the SAP data store with additional customer and flight information. Also seeded is the SQL Server database. If this application is being used for demonstration purposes, the Seed the database link should be clicked in advance of the presentation. Populating seed data can take over ten minutes or so depending on the speed of the machine the application is run on.
OBA Starter Kit for SAP as a Visual Studio Solution
The starter kit’s \SAPSK folder contains the ContosoToursMaster solution file, ContosoToursMaster.sln. Ensure that all of the prerequisites have been installed before you open this solution in Visual Studio. Before running the Contoso Tours application, open the app.config file for the following projects:
Both of these app.config files contain a connection string named ContosoToursDB. Update the value of this connection string to reflect the location of the database by replacing filepathhere in the following app.config XML.
<?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data" /> </configSections> <connectionStrings> <add name="ContosoToursDB" providerName="System.Data.SqlClient" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=filepathhere\ContosoToursDB.mdf;Integrated Security=True;User Instance=True"/> </connectionStrings> <appSettings> </appSettings> </configuration>
The database files are found in the directory ContosoTours\Database (ContosoToursDB.mdf and ContosoToursDB_log.ldf).
The section Installing Sample Data describes how to create seed data for SAP and the SQL Server 2005 data store used by the Contoso Tours sample application. This sample data is also useful for developers working with the starter kit’s Visual Studio 2005 solution.
It is of critical importance when installing SAP NetWeaver on Windows to limit the computer name to less than or equal to thirteen characters. This change should be made before the installation is started. The reason for this system limitation is that there exists an issue (as of this writing) with SAP NetWeaver services not running on machines with a computer name that exceeds thirteen characters in length.
Installing SAP such that the starter kit can be run successfully is a multi-step process:
Install SAP NetWeaver 2004s
Run SAPBC_DATA_GENERATOR to insure the sample data is relative to the current date. For example, the sample data includes scheduled flights for an airline that can be booked by customers. Flights only make sense if they are for future dates and not past dates. SAPBC_DATA_GENERATOR handles this.
The SAP Software Development Network is the ultimate source for determining the system requirements of SAP NetWeaver 2004s. The following components are some of the requirements:
Computer and processor: 1.1 gigahertz (GHz) processor or higher
Operating Systems: Windows XP Professional (Service Pack 2) or Windows Server 2003
Memory: 1 GB RAM or higher
22 GB hard disk space when installing; 10 GB after install
File System: NTFS
The SAP NetWeaver 2004s download includes setup instructions. Following these instructions installs the SAP server processes. After SAP NetWeaver 2004s is installed, the SAPGUI component needs to be installed as well. This is installed by navigating to the SAPGUI installation folder and running setup.exe.
Figure 5 shows the contents of the SAPGUI installation directory for SAP installed in the default location.
Running setup.exe starts the installation wizard for SAPGUI. Complete the installation steps in order to install this component.
SAP is installed but the seed data must be made timely. In order for this to occur, the SAP service must be running. To determine if the SAP service is running, click the Start SAP Management Console icon on the desktop (the icon is placed on the desktop as part of the default installation). Figure 6 shows the SAP Management Console.
If the SAP service is not running, its icon is gray. To start the SAP service, click the server icon and press the play button on the toolbar. If prompted for login credentials, provide Windows administrative credentials.
When the SAP services are running, the services icon will turn green, as shown in Figure 7.
With the SAP service running, it is now possible to regenerate or refresh the seed SAP data. This is achieved by clicking the SAP Logon icon on the desktop. Figure 8 shows the screen that appears.
Figure 8 shows the NSP SAP connection is installed. If for some reason the SAP Logon screen does not show this instance, follow the instructions in Appendix B: Installing the NSP SAP Connection.
In the SAP Logon dialog box, select NSP and then click Log on. You will see a prompt, as shown in Figure 9.
Use the following login credentials:
After you log in, a message is displayed, as shown in Figure 10.
Expand the Tools node in the tree view on the left side of the screen. Navigate from the Tools node to the ABAP Workbench, expand the Development node, and double-click the ABAP Editor.
After the tree view is opened correctly, the screen appears as shown in Figure 11.
Double-click ABAP Editor to view the ABAP Editor: Initial Screen, as shown in Figure 12.
Type SAPBC_DATA_GENERATOR in the Program text box, and then click the Execute icon in the toolbar. The Create Data for Flight Data Model screen appears.
Select the Standard Data Record style of sample data, and then click the Execute icon in the toolbar to generate the sample data. The following message appears that asks whether you want to delete the existing data.
Click Yes to generate the sample data.
You can start the SAP Logon by using the icon that is installed on the desktop as part of a standard SAP NetWeaver 2004s installation. Figure 15 shows an example, but notice that the NSP SAP connection is not available.
Click User-Defined to create the NSP SAP connection. The New Entry dialog box appears, as shown in Figure 16.
Fill in the information as shown, and then click Add and Log on. This creates the NSP SAP connection.
To learn more about the products and technologies mentioned or used in this article, see these resources: