You are on page 1of 43

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.

com
2011 SAP AG 1
How to Use the BDC Browser
Applies to:
Feature pack 1 for Duet Enterprise 1.0. For more information, visit the ABAP homepage.
Summary
This guide explains the steps required to expose the SAP NetWeaver Gateway data model to Microsoft
SharePoint using the BDC Browser tool. The configurations required to set-up the tool and the additional
steps required to handle varied use cases are also described in this document.

Author: Soumya Ann Jose, Kasthuri Srinivasan
Company: SAP Labs India
Created on: 1 November 2011
Author Bio
Soumya and Kasthuri are working as developers with Duet Enterprise team at SAP Labs, India.

How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 2
Table of Contents
Introduction ......................................................................................................................................................... 3
BDC Browser Configurations .............................................................................................................................. 3
Configurations to Connect to the Enterprise Services Repository .................................................................. 3
Create a Type G RFC destination to connect to the ES Repository ............................................................................. 3
Configuration in Service Implementation Workbench .................................................................................................. 6
Create Namespace and Software component version in ES Repository system ......................................................... 8
Copy Data Types and Fault Message Type to the Namespace ................................................................................... 9
Create Proxy Class for Data Types and Fault Message Types.................................................................................. 13
Create RFC Destinations .............................................................................................................................. 17
Type H RFC Destination to Read WSIL URL ............................................................................................................. 17
Type H RFC Destination to Read WSDL Content ...................................................................................................... 19
Service Settings ............................................................................................................................................ 19
Virus Scan ..................................................................................................................................................... 21
Configuring MIME Editor ............................................................................................................................... 21
Create BDC model Using BDC Browser .......................................................................................................... 22
Create Business Scenario ............................................................................................................................ 22
Create BDC Model from GSDO type ............................................................................................................ 23
Maintaining Translation for a BDC model ..................................................................................................... 26
Exporting a Business Scenario ..................................................................................................................... 27
Deploying a BDC Model in SharePoint ......................................................................................................... 29
Uploading a BDC Model from Desktop ............................................................................................................. 29
Enable for Translation ....................................................................................................................................... 31
BADI Implementation ........................................................................................................................................ 32
Use Cases ..................................................................................................................................................... 32
Creation of Outbound BAdI ........................................................................................................................... 34
BAdI Implementation Code for Inbound Mapper .......................................................................................... 35
Implementation code in Inbound Create method ....................................................................................................... 36
Implementation code in Inbound Update Method ....................................................................................................... 39
Implementation code in Inbound Delete Method ........................................................................................................ 39
Implementation code in Inbound get_mapping_mode method .................................................................................. 39
BAdI Implementation Code for Outbound Mapper ........................................................................................ 39
Implementation Code in Outbound Read Method ...................................................................................................... 40
Related Content ................................................................................................................................................ 42
Copyright........................................................................................................................................................... 43

How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 3
Introduction
The BDC Browser tool provides a framework by which customers can expose business objects in Business
Suite system to Duet Enterprise. The business objects are exposed as BDC models. Customers will be able
to generate contents required for their business process with less technical and functional knowledge in less
time.
The Business Objects that can be used by the BDC Browser tool to generate content can belong to any of
the below category:
Business objects which can be maintained using ABAP Dynpro transactions
Business Object Repository (BOR) object
Well formed Gateway canonical objects handcrafted by specialists can be exposed with object
association as BDC models.
BDC Browser Configurations
This section describes the various configurations that have to be done before running the BDC Browser tool.
Configurations to Connect to the Enterprise Services Repository
Create a Type G RFC destination to connect to the ES Repository
You should create a Type G RFC destination to connect to the ES Repository system. To create the RFC
destination, proceed as follows:
1. In the SAP NetWeaver Gateway system, open transaction SPRO.
2. Choose SAP Reference IMG.
3. Select SAP Customizing Implementation Guide SAP NetWeaver Gateway Configuration
Subscription Settings Maintain RFC Destination to Connectivity Provider.
4. Choose Execute.
5. Choose Create.
6. In the RFC Destination field, enter the desired name, for example SIW_X1T.
7. In the Connection Type field, press F4 and select G HTTP Connection to External Server.
8. Under the Technical Settings tab, in the Description field, enter the desired description.
9. Press Enter.
10. An information popup is displayed. Choose the checkmark to continue.
11. In the Target System Settings section, provide the following details:
o Target Host - Enter the host IP
o Path Prefix - /rep
o Service No - Http port number of the ES Repository system
How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 4

Note: For information on how to obtain the http port number of the ES Repository system, refer to the section below.
12. Click on the Logon and Security tab and give the logon credentials to the ES Repository system.
13. Save the settings.


How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 5
How to obtain the http port of ES Repository system
1. To get the http port number, logon to the ES Repository system.
2. Execute transaction SMICM.

3. Click on GoTo Services.

4. Get the Service Name/Port for http.

How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 6
Configuration in Service Implementation Workbench
Once the RFC destination has been created to connect to the ES Repository system, the detail has to be
maintained in the Service Implementation Workbench. The Service Interfaces are created using SIW APIs
and the ES Repository connection details have to be maintained here to enable the SIW to identify the ES
Repository system.
1. Log on to the SAP NetWeaver Gateway system.
2. Execute transaction SIMGH.
3. Select the IMG node Service Implementation Workbench.

4. Click on Define Landscape.

5. Click on New Entries to create a new Landscape ID.

6. Give the Landscape ID (any identifier string), Description and the RFC destination that was created
in the previous step to connect to the ES Repository system.
7. Click on Save.
How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 7

8. Go to Service Implementation Workbench and select Define Configuration.

9. Click on New Entries to define a new configuration.
10. Provide the following details:
o Configuration ID - SAP_GW_SYNC_IN_API
o Description
o Config Class - /IWFND/CL_DST_SIW_FLAT_CONFIG
o Landscape ID - Landscape ID which was created in the previous step

11. Save the changes.
How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 8
Create Namespace and Software component version in ES Repository system
The BDC Browser tool enables the users to create a BDC model for a GSDO type. This process involves
creation of the Service Interface, the corresponding Data Types & Message Types in the ES Repository
system and also the creation of the corresponding proxy class.

1. Logon to the ES Repository system and execute transaction sxmb_ifr.

2. Click on Enterprise Services Builder.

3. The namespace and the software component version in which the components are created by the
tool have to be configured. You could either use an existing software component & namespace or
create a new one to be used by the BDC Browser tool.
4. Make sure that you have the following components in place for the artifacts generated by the BDC
Browser tool:
a. Software Component
b. Software Component Version
c. Namespace
How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 9

The above screenshot shows a sample of the required components
Software Component - XITESTCOMPONENT
Software Component Version - XITESTCOMPONENT 7.10_V1
Namespace - http://xiTest.com/xi/IWTNG
Note: We will use the same components in this document for reference. Please ensure that wherever the above
components are referred it is replaced with the ES Repository components you have created.
Copy Data Types and Fault Message Type to the Namespace
The base data types and the StandardMessageFault that will be used for the Service Interface generation
has to be copied into the newly created namespace.
The base DataTypes and StandardMessageFault are shipped by default in the Duet Enterprise Feature Pack
1. These have to be copied to the namespace that you will be using. Once these are copied to your
namespace they have to be activated and the corresponding proxy classes have to be created.
To do this, proceed as follows:
1. In the ES Repository system, go to the following namespace:
o Software Component - SAP IW TNG
o Software Component Version - SAP IW TNG 200
o Namespace - http://sap.com/xi/IWTNG
How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 10

2. Expand the DataTypes node and select the data type IWXAllDataTypes.
Note: IWXAllDataTypes is a complex data type which has the following elements:
o IWXDateTime
o IWXDecimal
o IWXBinary
o IWXDouble
o IWXInt16
o IWXInt32
o IWXString
o IWXTime
o IWXBoolean
o IWXByte
3. Click on Data Type Copy Object.

4. Give the Software component version and the namespace to which you want to copy the data types.
You need to give the details of the component which you created in the previous steps.
How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 11
5. Select the check box With All Dependent Objects.
This will ensure that all the elements in the complex type ie IWXDateTime, IWXString, etc are also
copied to your namespace.
6. Click on Copy.

7. Go to your namespace and verify that all the DataTypes are present.
8. Right click on IWXAllDataTypes and select Activate.
By default only IWXAllDataTypes will be checked. Select all the dependent data types as well and
click on Activate.

9. Expand the Fault Message Types node and select StandardMessageFault
How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 12

10. Give the software component and namespace. Ensure that the checkbox With All Dependent
Objects is checked.

11. Go to the namespace and verify that the Fault Message Types has been copied. You would also
observe that the data type ExchangeFaultData and ExchangeLogData has been copied to the
namespace.
12. Click on StandardMessageFault and select Activate.

13. Give the change list name. Select the StandardMessageFault and the constituent data types and
click on Activate.
How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 13


Create Proxy Class for Data Types and Fault Message Types
Proxy classes have to be created for the data types and the fault message types in your namespace.
1. Logon to the SAP NetWeaver Gateway System.
2. Go to transaction sproxy.
3. Navigate to the required namespace.
4. Expand the Datatypes node.
You should be able to see the data types that you copied in the previous step.
5. Right click on IWXAllDataTypes and click on Create Proxy.

How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 14
6. Give the package name in which you want the proxy classes to be created. Also give the proxy prefix
and click on Continue.

7. Click on Complete.

8. Navigate to the Datatypes node.
9. Right click on IWXAllDataTypes and select Activate Proxy.
All the constituent data types will be activated as well.
How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 15

10. Once the activation is done, save the changes.
11. Repeat the above set of steps for ExchangeLogData and ExchangeFaultData.
12. Right click on ExchangeLogData and select Create Proxy.

13. Give the package name and the proxy prefix.

How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 16
14. Click on Continue and Complete the proxy creation.
15. Right click on ExchangeLogData and select Activate Proxy to activate the proxy class.
16. Save the changes.

17. Now, create the proxy class for ExchangeFaultData.
18. Right click on ExchangeFaultData and click on Create Proxy.

19. Give the package name and the proxy class prefix.
How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 17

20. Click on Continue and complete the changes.
21. Once this is done, right click on ExchangeFaultData and Activate.
22. Save the changes.
23. Repeat the same set of steps for FaultMessageType - StandardMessageFault.


Create RFC Destinations
To create a BDC model, the WSDL and the WSDL contents have to be read. This section describes the RFC
destinations that have to be created to enable this.
Type H RFC Destination to Read WSIL URL
The BDC Browser tool creates the Service Interfaces and also the endpoints. The BDC model that is created
also carried the WSDL url and the endpoint details. These details can be read from WSIL.
To read this a RFC destination has to be created pointing to the SAP Netweaver Gateway system.
1. Logon to the SAP Netweaver Gateway system.
2. Execute transaction sm59.
3. Create the RFC destination with the following details:
How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 18
Connection Type - H
Target Host - SAP NetWeaver Gateway System
Service No. - http port of the SAP NetWeaver Gateway system. Details on how to get the http
port no has been described in the section Create RFC destination. << to do: hyperlink to
section>>
Path Prefix - /sap/bdc/srt/wsil

4. Click on the Logon & Security tab and give the basic authentication details.

How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 19
Type H RFC Destination to Read WSDL Content
The BDC model is generated based on the details in the WSDL. To read the WSDL content a type H RFC
destination has to be created.
1. Create a RFC destination with the following details
RFC Destination - IWTNG_BDC_WSDL_DEST
Connection Type - H
Target Host - SAP NetWeaver Gateway system
Service No - http port no of the SAP NetWeaver Gateway system

2. Give the basic authentication details in the Logon & Security tab.
3. Save the details.
Service Settings
Service Settings configuration in the BDC Browser will be read during the generation of the BDC model.
These settings are maintained through the BDC Browser tool.
1. Logon to the SAP Netweaver Gateway System.
2. Execute transaction /iwtng/bdc_browser.
3. Go to Tool Settings Service Settings.

How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 20
4. Click on New Entries.
5. Create a new Configuration ID and maintain the following details.
Namespace - Namespace in the ES Repository system where the Service Interface for the
GSDO has to be created.
Proxy Prefix - Prefix for the functional modules and the ES Repository components that will be
generated.
Software Component Software component in the ES Repository system where the Service
Interface for the GSDO has to be created.
Software Component Version Software component version in the ES Repository system where
the Service Interface has to be created.
Profile Name - Profile created in the SAP NetWeaver Gateway System
Business Scenario Business scenario created using the profile
Predefined Name - The default endpoint binding name. This will be used by the tool to set the
default endpoint in the BDC model.
WSIL RFC Destination WSIL RFC destination created in the section Type H RFC destination
to read the WSIL URL.
WSDL RFC Destination - RFC destination created in the section Type H RFC destination to read
the WSDL content.
Active Maintain the Active flag, if you have multiple Service Setting configurations only. The
Active configuration will be used for the BDC model generation.
Note: The software component version and namespace has to be the one that has been created in the section Create
Namespace and Software component version in the ES Repository system.



How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 21
Virus Scan
When a BDC model is uploaded manually from desktop, the uploaded XML file will be scanned for virus. To
perform virus scan the following are the required configurations that needs to be maintained.
1. Go to the transaction SIMGH and open the IMG structure SAP Customizing Implementation Guide.
2. Then navigate to the following location SAP Customizing Implementation Guide SAP NetWeaver
Application Server System Administration Virus Scan Interface.
3. Execute the IMG activity Define Scanner Groups and create a Scanner Group.
4. Execute the IMG activity Define Virus Scan Profiles and create a virus scan profile in the name
/IWTNG/BDC_TOOLS_UI/.
5. Execute the IMG activity Define Virus Scan Servers and configure the virus scan server.
To know more about how to create a scanner group, virus scan profile and virus scan servers refer
the respective IMG documentations.
Configuring MIME Editor
This configuration is required in case the user wants to directly edit the BDC model from the MIME repository
in the editor of the users choice.
In Windows 7:
1. Go to the Control Panel and view by small icons.
2. Open Default programs and choose Associate a file type or protocol with a specific program.
3. Choose the file type .xml and click the Change program button.
4. In the pop-up that appears choose the editor of your own choice and click OK.
To go to the MIME repository:
1. Go to the transaction SE80 and click MIME Repository button.
2. Navigate to the folder SAP PUBLIC DUET_ENT_BIZPACK <Business Scenario>
MODELS.
3. Right click on the BDC model which needs to be edited and choose the option Change.
4. The BDC model XML file will be opened in the editor chosen in the previous steps.
5. Make the necessary changes and then save the file.
6. Close the editor, this will create a new version of the BDC model in the MIME repository.
7. When the business scenario is exported, the latest version of the BDC model will be exported.
How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 22

Create BDC model Using BDC Browser
Create Business Scenario
To create a BDC model, first you need to create a business scenario. Business scenario is used to group a
set of BDC models.
To create a business scenario, proceed as follows:
1. Go to the transaction /IWTNG/BDC_BROWSER.
2. Under the Business Scenario Browser frame click on the Create Business Scenario button.
3. In the below shown pop up enter the Business Scenario name and the Business Scenario
Description and select the Use Transport Request flag, if needed.

4. If the Use Transport Request flag is selected, then a transport request pop-up will appear asking for
the user to enter a customizing transport request as shown below.
How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 23
5. Enter a transport request.

6. Click OK to create a business scenario.
Note: When a transport request is used while creating a business scenario, the changes for all the BDC models
generated under that business scenario will be captured in transport requests. If you dont want to capture the
BDC model related changes in a transport request then dont choose this option while creating the business
scenario.
Create BDC Model from GSDO type
To create a BDC model from GSDO type, follow the steps below:
Prerequisites
All the required ES Repository configurations are done.
A profile and a business scenario which can be used to create end points for the Enterprise
Services exists.
RFC destinations required to read the WSIL and the WSDL content is created.
The above mentioned configuration details are maintained under the BDC Browser Service
Settings. For details refer to the above section.
Procedure
1. Right click on the business scenario you created in the previous step and from the context menu
choose Create BDC Model from GSDO Type.
2. In the pop up that appears, enter the following details:
a) GSDO Type Name Choose the GSDO type for which you need to generate the BDC
model
b) Prefix Enter the prefix that can be used to generate the DDIC objects and function
modules.
c) Package Name Enter the package name in which you want to save the DDIC objects
and function modules and the enterprise service that are generated.
d) Type of Consumer Operations Choose the type of operations that will be performed
from the consumer. By default each BDC model will have a Query (Get All) and Read
(Get Specific) operations. Other than this from the consumer we will be able to perform
the operations such as Create, Update and Delete. For this field choose the operations
that are applicable for your scenario. If you don't choose any operations here then the
user will be able to perform the default operations Read and Query.
How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 24

e) Click OK to generate BDC model for the selected GSDO type. When this step is
executed the following processes will happen.
a. Enterprise Services will be generated for the GSDO type
b. End points will be created for the Enterprise Services using the PROFILE and
the BUSINESS SCENARIO maintained in the Service Settings.
c. BDC model will be generated using the Enterprise Service WSDL.
d. A base resource file will be generated using the BDC model in the current
system language for all the translatable properties.
f) In case a transport request is used while creating a business scenario which is used for
creating a BDC model, then two pop ups will appear asking to enter a workbench
request and a customizing request. Workbench request will be used to capture the BDC
model and the resource xml files and the customizing request will be used to capture the
database records for example the translation details and the MIME paths etc.



g) Once the BDC model is generated you will see a confirmation pop up BDC model
generated and enabled for translation.
How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 25

Note:
In case the Gateway model for the GSDO type has associations (related gateway models), then in the Create
BDC model popup enter the GSDO type for the base Gateway model , the BDC publisher will take care of
generating Enterprise Services and BDC models for all the Gateway models including the base gateway model
and related gateway models. You will be able to see all the BDC models under the Business Scenario.
Once the BDC model and the resource file are generated, all these files will be places in the MIME repository.
The MIME path can be viewed under the General Details tab by double clicking the BDC model.

h) To check the generated enterprise service definition, go to the transaction SE80
Repository Browser <Package> Enterprise Services Server Proxies
<Enterprise Service>.
How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 26

Maintaining Translation for a BDC model
1. Right click on the generated BDC model and choose Edit Translation Properties to open the BDC
Model Properties view.
2. The view will have the list of properties that can be translated.

3. Change the Property Text where ever applicable.
4. Save the changes.

How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 27
Exporting a Business Scenario
Prerequisites:
Before exporting a business scenario ensure the following activities are performed:
1. Double click on the BDC model which needs to be exported, go to the End Points tab page and
verify whether the proper end point is set as default, if not set the appropriate end point as default.

2. Under the End Points tab page in case you dont see any end points then create end points manually
and then set an end point as default.
To create end points manually:
a) Go to transaction SOAMANGER.
b) Under the Service Administration tab click on the link Business Scenario Configuration.
c) Choose the Business Scenario which needs to be used to create end points and click on the Edit
button.
d) Click Next in the Enter Business Scenario Type, Name and Description screen and in the
Select service definitions and assign profiles screen click Add button.
e) In this pop up which occurs enter the name of the enterprise service in the search pattern text
box and click Go.
To find the name of the Enterprise Service for the BDC model go to the transaction
/IWTNG/BDC_BROWSER and double click on the required BDC model, under the General
Details tab. The service name will be appear in the field ES Repository Service Name.
f) Then select the displayed enterprise service and click on the button Add To Worklist.
g) Choose the enterprise service which got added to the work list and click the button Assign
Profiles.
h) In the Assign Profile pop up, choose the profile that needs to be used to create end points and
click the button Assign Profiles.
i) Click Next in the Select service definitions and assign profiles screen.
j) Click Finish in the Select service groups and assign business applications in provider systems
screen.
k) In the pop up Do you want activate this Business Scenario immediately? click Yes.
l) In the Pending Tasks click the button Process List, this step will successfully create end points
for the enterprise service.
m) Once this step is finished then go the transaction /IWTNG/BDC_BROWSER, double click on the
BDC model, go to the End Points tab and make the appropriate end point as default.
3. Check whether proper translation is made to generate updated resource file during export.
How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 28
4. Check whether all the required languages for which the translation should be available in the
resource file are maintained as active in the Language Settings view.
To open the Language Settings view, go to the transaction /IWTNG/BDC_BROWSER, choose the
menu Tools Settings Language Settings.

5. Check whether all the required BDC properties have proper values.
To open the BDC properties view, go to the transaction /IWTNG/BDC_BROWSER, choose the menu
Tools Settings BDC Properties.

To export a business scenario follow the below steps:
1. Right click on the Business Scenario which you want to export and choose the option Export
Business Scenario.
2. A popup will appear asking to choose a package in which the Models.zip file should be placed.

3. Choose a package and click OK.
How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 29
You will see a confirmation message on the status bar saying Export of BDC Models successful.
The above step will generate a Models.zip file in the location which you selected in the above step.
4. Navigate to the location and extract the Models.zip, you should be able to see all the BDC models
under the business scenario, corresponding resource files for the BDC models and a Models.xml file
which will have details about all the BDC models.
Note: To export more than one business scenario in the same time, choose all the business scenarios that needs to be
exported and click on the Export Business Scenario button in the tool bar. This will create a single Models.zip file
with the models of all the selected business scenarios.








Deploying a BDC Model in SharePoint
Once the business scenario is exported, the next step is to import the BDC model on SharePoint and create
and external list to consume the data.
To know how to import the BDC model in SharePoint refer to the below link:
http://msdn.microsoft.com/en-us/library/ee661739.aspx

To know how to create an external list to consume the data refer to the below link:
http://msdn.microsoft.com/en-us/library/ee661739.aspx
Uploading a BDC Model from Desktop
In case the user does not want to create a BDC model from the GSDO type and wants to upload an existing
BDC model to the MIME repository, BDC publisher provides capability to upload the BDC model to the MIME
repository and to enable the BDC model for translation.
Prerequisites:
Virus scan configuration should be complete.
To upload a BDC model follow the below steps:
1. Go to the transaction SIMGH and open the IMG structure Microsoft SharePoint Integration Activities.
2. Under the BDC Browser node, run the IMG activity Upload BDC Models to MIME repository.
3. In the below screen enter the following inputs
a) Select BDC Model - Choose the BDC model xml file from the desktop
b) Business Scenario - Enter a business scenario name. If the entered business scenario does not
exist then a new business scenario will be created and the XML will be uploaded under that
business scenario, if its an existing business scenario then BDC model will be uploaded under
the same business scenario.
How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 30
c) Use transport request - If this check box is selected then two pop ups will occur asking to enter a
workbench request and a customizing request. Workbench request will be used to capture the
uploaded BDC model and the customizing request will be used to capture the database records
like the MIME paths etc. There will also be another pop up asking to enter a package name to
store the BDC model in the MIME repository.





4. Once the model is uploaded you will see a confirmation message as shown below.






How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 31

Enable for Translation
Once a BDC model is uploaded manually, it needs to be enabled for translation to generate a resource file.
To enable a BDC model for translation follow the below steps:
1. Go to the transaction SIMGH and open the IMG structure Microsoft SharePoint Integration Activities.
2. Under the BDC Browser node, run the IMG activity Enable Business Scenarios for Translation.
3. In the below screen enter the following inputs
a) Business Scenario Choose the business scenario which you need to enable for translation
b) Use transport request if this check box is selected then two pop ups will occur asking to enter a
workbench request and a customizing request. Workbench request will be used to capture the
generated resource file and the customizing request will be used to capture the translation
entries. There will also be another pop up asking to enter a package name to store the resource
file in the MIME repository.




How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 32
4. Once the BDC model is enabled for translation and the resource file is generated, you will see a
confirmation message as shown below.

BADI Implementation
Use Cases
BADI Implementations are required to handle use cases that are not directly handled in the default
implementations created by the BDC Browser tool. This section explains the use cases in which BADI
implementation are required.
The GW model refers to another model for F4 values.
BADI Implementations are required if the GW model has F4 help associations to other GW data models.
For e.g.: If the user is required to create a leave request and the leave type is exposed as a F4 help. In this
case the GW data model for LEAVE will be associated to the GW data model for LEAVE TYPE. BADI
implementation code will be required to handle the F4 help values in the LEAVE REQUEST.
The Leave GW data model shown here has a code list association to the Leave Type GW data model.

The Relation TO_EMP_LR_TYPE_CODE associates the Leave Type model to the Leave
model.
The source cardinality of 0..N and target cardinality of 1 indicates that this is a F4 help
association.
The field LEAVE_TYPE of the Leave model is linked to the association method as source
attribute. This ensures that the F4 help values are shown for the LeaveType field.
How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 33
The BDC publisher tool generates the corresponding BDC models for both the Leave and the Leave Type
data models through the option Create BDC model from GSDO Type.
Once the generated models are deployed in SharePoint, an external list can be created for the Leave model
to view the Leave details. The Leave Type field will be shown as a F4 helps.

BADI Implementation is required for the following 3 cases:
During the creation of the Leave Request, the user will be able to choose the Leave Type from
the picker. In such cases, the value that is passed in the Create request is the key (S_COR_ID)
of the selected leave type. For e.g.: If the selected leave type is Vacation, the value for
LEAVE_TYPE passed in the Create Request would be
0423_0101_LEAVE_REQUEST_TYPE_CODE_G2RCLNT_910_TIMA .This has to be parsed to
get the value 0101. This implementation has to be done in the BADI.
The same has to be done during the Update operation.
In the response of the Read operation, the BADI would return the value for the picker fields.
SharePoint however would expect identifiers (S_COR_ID) for the fields which have pickers.
Hence in the response of the Read operation, the S_COR_ID values have to be constructed for
the picker fields and passed.
Entity has composite key
There could be entities which has a composite key. For e.g.: a Bank Model could have both the BANK_KEY
and the COUNTRY code as keys. In the create request of such models, the flattener expects the key to be
passed in the Create request. This has to be done in the BADI Implementation code.
In case of entities where the key is automatically generated by the system, this does not have to be done.
Delete operation
If the delete operation is supported for the entity, BADI Implementation has to be done to pass the key
(S_COR_ID) of the deleted entry.
How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 34
Creation of Outbound BAdI
1. Go to transaction SIMGH Service Consumption Layer Development Development
Consumer Outbound Mapping Integration: BAdI.
2. Give the Enhancement Implementation name.


3. Give the package name.

4. Give the BAdI Implementation and the Implementation Class name.
How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 35

Follow the same steps (step 5 step 8 ) mentioned in the Inbound BAdI implementation for the Outbound
BAdI as well.
BAdI Implementation Code for Inbound Mapper
Sample BAdI implementation code for the GW model IWCNT~LEAVE_REQUEST has been pre-shipped in
Duet Enterprise FP 1.0.
To view the sample implementations for the inbound mappers:
1. GoTo transaction SIMGH Service Consumption Layer Development Development
Consumer Inbound Mapping Integration: BAdI.
Select the Inactive Enhancement Implementation /IWTNG/EI_LEMA_INBOUND_MAPPER and click
on View.

2. Double-click on the Implementing Class.
3. Double click on the each method to view the implementations.
How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 36

Implementation code in Inbound Create method
Below is the sample code snippet of the Create method in the inbound mapper.
CASE 1: Handling of Picker Values
This code snippet shows the handling of the picker Leave Type and Leave Status in the Leave Management
scenario.
"The BADI implementation for Create is called after the input mapping in the proxy
method for Create and before the call to the corresponding BAPI.

DATA: lo_gsdo_root TYPE REF TO /iwfnd/if_srd_gsdo_node.
"ls_attribute refers to the attribute structure of leave in the leave STC class.
DATA: ls_attribute TYPE /iwcnt/leave_request_stc=>leave_request_atts.
DATA: ls_code_key TYPE /iwfnd/s_cor_id.

"change the type of ls_input to the corresponding structure. This type can be
fetched from the create method of the generated proxy class. The type will be the
same as the type for the field
ls_input in the proxy create method.
DATA: ls_input TYPE ZLEMABDCIWCNT_LEAV_S.

IF io_gsdo IS BOUND.

lo_gsdo_root = io_gsdo->get_root_node( ).

"get the leave request attributes. The lo_gsdo_root has the GSDO
IWCNT~LEAVE_REQUEST with all the attributes value mapped from the sharepoint
request.
lo_gsdo_root->get_attributes(
IMPORTING
es_attributes = ls_attribute ).


MOVE-CORRESPONDING is_inbound_message TO ls_input.

"For fields which have pickers in Leave Management, the corresponding
S_COR_ID value is sent in the Create Request.

"The value of the field has to be extracted from the S_COR_ID and passed in the
Create Request to the BAPI. This conversion is done here.

How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 37

"Extract the value for Leave Status from the S_COR_ID and assign to the
leave status field.
IF ls_input-life_cycle_status_code IS NOT INITIAL.
TRY.
/iwfnd/cl_id_util=>convert_string_id_to_key(
EXPORTING
iv_string = ls_input-life_cycle_status_code
IMPORTING
es_key = ls_code_key
).
ls_attribute-life_cycle_status_code = ls_code_key-value.

CATCH /iwfnd/cx_cod.

ENDTRY.

ENDIF.

"Extract the value for Leave Type from the S_COR_ID and assign to the leave type
field.
IF ls_input-leave_itm_type_code IS NOT INITIAL.
TRY.
/iwfnd/cl_id_util=>convert_string_id_to_key(
EXPORTING
iv_string = ls_input-leave_itm_type_code
IMPORTING
es_key = ls_code_key
).
ls_attribute-leave_itm_type_code = ls_code_key-value.
CATCH /iwfnd/cx_cod.

ENDTRY.

ENDIF.

"set the modified attributes to the GSDO
lo_gsdo_root->set_attributes(
EXPORTING
is_attributes = ls_attribute
).

ENDIF.
CASE 2: Entities with Composite Keys
For entities which have composite keys, the key has to be constructed in the inbound mapper and passed to
the BAPI.
The below code snippet shows the Create inbound mapper method for a Bank model. The key for the Bank
model is constructed from the Bank name and the Bank country field.
data declaration
DATA: lo_gsdo_root_node TYPE REF TO /iwfnd/if_srd_gsdo_node,
ls_id TYPE /iwfnd/s_cor_id,

"attribute structure of the stc class of the GSDO type
How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 38
ls_bank_details TYPE abcd_bank_stc=>abcd_bank_atts.


get the root node of the GSDO and the attribute structure of the GSDO
lo_gsdo_root_node = io_gsdo->get_root_node( ).
lo_gsdo_root_node->get_attributes(
importing
es_attributes = ls_bank_details ).


"get the bank country value from the S_COR_ID of country field
TRY.
/iwfnd/cl_id_util=>convert_string_id_to_key(
EXPORTING
iv_string = ls_bank_details-country
IMPORTING es_key = ls_id ).

CATCH /iwfnd/cx_cod. "#EC NO_HANDLER
ENDTRY.

ls_bank_details-bankctry = ls_id-value.


"construct the key from the country and bank name fields
data: lv_cor_id TYPE /iwfnd/s_cor_id,
lv_cor_id_1 TYPE /iwfnd/s_cor_id,
lt_keyvalues TYPE table of string.


data: lv_bank_key type string.
"get the compund key of the bank

append ls_bank_details-bankctry to lt_keyvalues.
append ls_bank_details-bank_name to lt_keyvalues.

CLEAR lv_cor_id.
/iwfnd/cl_coe_key_handling=>convert_key_bop_to_gsdo(
EXPORTING
it_keyvalues = lt_keyvalues
IMPORTING
ev_cor_id_value = lv_cor_id-value ).

"construct the S_COR_ID for bank create with scheme id and scheme
agency id

lv_cor_id-scheme_id = iv_object_name.
lv_cor_id-scheme_agency_id = ls_id-scheme_agency_id.
lv_cor_id-value = lv_cor_id-value.

set the key and the attributes to the GSDO
lo_gsdo_root_node->set_key( is_key = lv_cor_id ).

lo_gsdo_root_node->set_attributes( is_attributes = ls_bank_details ).
How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 39
Implementation code in Inbound Update Method
The update implementation code will be the same as that of the Create method.
Implementation code in Inbound Delete Method
Below is the sample code snippet of the Delete method in the Inbound mapper. In this code, the key from
the Delete request is passed to the list of ids to be deleted.
" The BADI implementation for Delete is called after the input mapping in the proxy
method for Delete and before the call to the corresponding BAPI.

DATA: lv_key TYPE string.
DATA: ls_key TYPE /iwfnd/s_cor_id.

":the is_inbound_message has the leave request id.
lv_key = is_inbound_message.

TRY.

"convert the id to S_COR_ID structures
/iwfnd/cl_id_util=>convert_string_id_to_key(
EXPORTING
iv_string = lv_key

IMPORTING
es_key = ls_key

).
CATCH /iwfnd/cx_cod.

ENDTRY.

"add the S_COR_ID value of the leave request to the list co_id_list
co_id_list->add_object_using_key(
EXPORTING
is_key = ls_key
).
Implementation code in Inbound get_mapping_mode method
Below is the code snippet for the get_mapping_mode in the Inbound mapper.
The value P for cv_mode indicates that the BADI is called post the mapping of the CRUD request to the
GSDO.
cv_mode = 'P'.
BAdI Implementation Code for Outbound Mapper
Sample BAdI implementation code for the GW model IWCNT~LEAVE_REQUEST has been pre-shipped in
Duet Enterprise FP 1.0.
To view the sample implementations for the Outbound mappers:
1. Go to transaction SIMGH Service Consumption Layer Development Development
Consumer Outbound Mapping Integration: BAdI.
a) Select the Inactive Enhancement Implementation
/IWTNG/EI_LEMA_OUTBOUND_MAPPER and click on View.
How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 40

Double-click on the Implementing Class. Double click on the each method to view the implementations.
Implementation Code in Outbound Read Method
Code snippet for the Leave Management Outbound read method.
"This BADI implementation for Query operation is required to convert the
field values to their corresponding S_COR_ID values.

"This has to be done for fields which has a corresponding picker. Sharepoint requires
the S_COR_ID value to resolve the selected
items in a codelist.


"Change the types of ls_output and lt_output to the corresponding types. The type
of ls_output is the same as type of ls_output in the proxy method for Query
operation. lt_output will be the corresponding table type of ls_output.


" DATA: ls_output TYPE ZLEMABDCIWCNT_LEAV_S1.
DATA: lt_output TYPE ZLEMABDCIWCNT_LEAV_T.
DATA: ls_output TYPE ZLEMABDCIWCNT_LEAV_S.


DATA: lo_gsdo_root TYPE REF TO /iwfnd/if_srd_gsdo_node.
DATA: ls_code_key TYPE /iwfnd/s_cor_id.
DATA: lo_gsdo TYPE REF TO /iwfnd/if_srd_gsdo.
DATA: ls_key TYPE /iwfnd/s_cor_id.


"get the list of GSDOs.
lo_gsdo = io_gsdo_list->get_first( ).

IF lo_gsdo IS BOUND.

"assign the list of GSDO to the corresponding leave request type
How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 41
APPEND LINES OF ct_output TO lt_output.

"the read operation returns a single structure. Assign it to ls_output for
further processing.
READ TABLE lt_output INTO ls_output INDEX 1.


"get the root node of the GSDO.
lo_gsdo_root = lo_gsdo->get_root_node( ).

"get the key of the GSDO.
lo_gsdo_root->get_key(
IMPORTING
es_key = ls_key ).


"convert the leave type and leave status to the corresponding S_COR_ID value.
"the key is the same as the key of the GSDO type.
IF ls_output-leave_itm_type_code IS NOT INITIAL.

ls_code_key-value = ls_output-leave_itm_type_code.
ls_code_key-scheme_agency_id = ls_key-scheme_agency_id.
ls_code_key-scheme_id = 'LEAVE_REQUEST_TYPE_CODE'.

ls_output-leave_itm_type_code = /iwfnd/cl_id_util=>convert_key_to_string_id(
ls_code_key ).

ENDIF.

IF ls_output-life_cycle_status_code IS NOT INITIAL.

ls_code_key-value = ls_output-life_cycle_status_code.
ls_code_key-scheme_agency_id = ls_key-scheme_agency_id.
ls_code_key-scheme_id = 'LEAVE_REQUEST_LC_STATUS_CODE'.

ls_output-life_cycle_status_code = /iwfnd/cl_id_util=>convert_key_to_string_id(
ls_code_key ).

ENDIF.

"assign the changed structure to the output list
CLEAR ct_output.
INSERT ls_output INTO TABLE ct_output.


ENDIF.




How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 42
Related Content
For more information, visit the ABAP homepage.

How to Use the BDC Browser
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 43
Copyright
Copyright 2011 SAP AG. All rights reserved.
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG.
The information contained herein may be changed without prior notice.
Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.
Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.
IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9,
iSeries, pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server,
PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes,
BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX,
Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation.
Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems
Incorporated in the United States and/or other countries.
Oracle is a registered trademark of Oracle Corporation.
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.
Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of
Citrix Systems, Inc.
HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts
Institute of Technology.
Java is a registered trademark of Oracle Corporation.
JavaScript is a registered trademark of Oracle Corporation, used under license for technology invented and implemented by Netscape.
SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentioned
herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries.
Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and
other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered
trademarks of Business Objects S.A. in the United States and in other countries. Business Objects is an SAP company.
All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document
serves informational purposes only. National product specifications may vary.
These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP
Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or
omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the
express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an
additional warranty.