How To: Create a BDC Model for Duet Enterprise

Duet Enterprise for Microsoft SharePoint and SAP uses the Business Data Connectivity (BDC) service model to expose SAP data in Duet Enterprise solutions, with minimal coding effort.

This model enables experienced users or developers to enter information about the external system into the BDC Metadata Store by using tools such as SharePoint Designer or Visual Studio. Users, business analysts, and solution developers can then interact with this model indirectly by using the Microsoft Business Connectivity Services (BCS) features and object model.

Applies to: Duet Enterprise for Microsoft SharePoint and SAP Server 2.0 | Office 2010 | SharePoint Server 2010

In this article
Prerequisites for Creating a BDC Model for a Duet Enterprise Solution
Creating a Secure Store Service Application ID
Using SharePoint Designer 2010 to Create External Content Types
Using the Activity ID Filter to Configure Input Parameters
Enabling BCS to Use Claims for Accessing Back End Data (optional)
Adding Modifications That Are Specific to Duet Enterprise

An external content type is a reusable collection of metadata that contains connectivity information and data definitions plus the behaviors you want to apply to a certain category of external data. After a service is created on the SAP system, creating an external content type is usually the next step for bringing data from the SAP external data source into SharePoint 2010 and Office 2010 solutions. After deployment, the BDC model is used to display SAP data in SharePoint Server 2010 and Office 2010.

For more information about BDC models, see the following resources:

Prerequisites for Creating a BDC Model for a Duet Enterprise Solution

In addition to the standard requirements for Duet Enterprise, you must install the following:

  • Microsoft SharePoint Designer 2010

  • An SAP service for Sales Contact external list exposed from the SAP system

Creating a Secure Store Service Application ID

It is very common for Business Connectivity Services solutions to try to authenticate to an external system in which the current user is known differently or has a different account for authentication. In such cases, the Secure Store Service can be used to store and map user credentials that are required by the external system. You must set the target application type as Group, since you will usually want multiple users and groups to be able to use these credentials to get the WSDL from the SAP system. You can also configure the Secure Store Service so that multiple users can access an external system by using a single set of credentials on that external system. For detailed instructions, see How to: Use Secure Store Service to Connect to an External System (https://msdn.microsoft.com/en-us/library/ee554863.aspx).

For more information about configuring the Secure Store, see Configure the Secure Store Service (SharePoint Server 2010) (https://technet.microsoft.com/en-us/library/ee806866.aspx).

Using SharePoint Designer 2010 to Create External Content Types

This procedure explains how to create an external content type using SharePoint Designer 2010.

To create an external content type using SharePoint Designer 2010

  1. In Microsoft SharePoint Designer 2010, open the SharePoint site where you want to store the artifacts for the external content type.

  2. To open a new external content type page, in the left navigation pane, click External Content Types.

  3. Click the New External Content Type link.

  4. In the External Data Source Type Selection dialog box, select WCF Service, and then click OK.

  5. In the WCF Connection dialog box there are two authentication settings. Click Connect with User’s Identity for the WCF Service authentication settings setting. Click Connect with Impersonated Custom Identity for the Metadata authentication settings setting.

  6. Enter the Secure Store Application ID (in this case the LOBAppID), and then click OK.

Using the Activity ID Filter to Configure Input Parameters

The Activity ID system filter must use the designated parameter when creating stereotyped operations and input parameters. This filter is used for traceability of the calls made from SharePoint 2010 or Office applications to the SAP system.

For more information, see Types of Filters Supported by the Business Data Connectivity Service (https://msdn.microsoft.com/en-us/library/ee556392.aspx).

Enabling BCS to Use Claims for Accessing Back End Data (optional)

You can modify the external system that you defined in the previous step so that it uses claims based authentication. Another alternative is to follow the instructions in the Set the UseStsIdentityFederation Property section of this topic. You can enable BDC to use claims based authentication by performing the following steps in Microsoft SharePoint Designer 2010.

To enable BCS to use claims for accessing back end data

  1. In SharePoint Designer 2010, select the newly defined external content type. Select the external system that you have defined for this external content type.

  2. In the Connection Properties dialog box, check the Use claims based authentication box.

Adding Modifications That Are Specific to Duet Enterprise

There are additional Duet Enterprise requirements that must be specified in the model. Export the model from SharePoint Designer, and then make the following changes.

Remove the Proxy Property from the Model

Removing the proxy property in LOBSystem from the model significantly reduces the size of the model and simplifies later modifications. When the model is imported into the SharePoint 2010 system, the proxy is automatically generated. This is shown in the following example.

  <LobSystems>
    <LobSystem Type="Wcf" Name="Account">
      <LocalizedDisplayNames>
        <LocalizedDisplayName LCID="1033">Account</LocalizedDisplayName>
      </LocalizedDisplayNames>
      <Properties>
     …
      Proxy>EACMqJkncSbtFtGl8DCIQoJfTVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAA
…

Set the UseStsIdentityFederation Property

Because authentication with the SAP system is handled by using the SAML token provided by SharePoint, you must set the UseStsIdentityFederationPropertyName() property to true for LOBSystemInstance, as shown in the following example.

      <LobSystemInstances>
        <LobSystemInstance Name="Account">
          <LocalizedDisplayNames>
            <LocalizedDisplayName LCID="1033">Account</LocalizedDisplayName>
          </LocalizedDisplayNames>
          <Properties>
            <Property Name="HttpHeaderSetAcceptLanguage" Type="System.Boolean">true</Property>
            <Property Name="SharePointResourceUrl" Type="System.String">https://duetmoss-l1:10001</Property>
            <Property Name="ShowInSearchUI" Type="System.String"></Property>
            <Property Name="UseStsIdentityFederation" Type="System.Boolean">true</Property>
            <Property Name="WcfAuthenticationMode" Type="System.String">PassThrough</Property>
            <Property Name="WcfEndpointAddress" 
            Type="System.String">https://Contoso.COM:44300/sap/bc/srt/pm/iwtng/iwxmanagecustomerin/
            000/duet_enterprise_saml/1/binding_t_https_a_wsse__-iwtng_-iwxmanagecustomerin_duet_enterprise_saml</Property>
          </Properties>
        </LobSystemInstance>

Set the HttpHeaderSetAcceptLanguage Property

When internationalizing Duet Enterprise solutions, the user locale is sent to the SAP system. This is enabled by setting the HttpHeaderSetAcceptLanguage property of LobSystemInstance to true, as shown in the following example.

      <LobSystemInstances>
        <LobSystemInstance Name="Account">
          <LocalizedDisplayNames>
            <LocalizedDisplayName LCID="1033">Account</LocalizedDisplayName>
          </LocalizedDisplayNames>
          <Properties>
            <Property Name="HttpHeaderSetAcceptLanguage" Type="System.Boolean">true</Property>

            <Property Name="SharePointResourceUrl" Type="System.String">https://duetmoss-l1:10001</Property>
            <Property Name="ShowInSearchUI" Type="System.String"></Property>
            <Property Name="UseStsIdentityFederation" Type="System.Boolean">true</Property>
            <Property Name="WcfAuthenticationMode" Type="System.String">PassThrough</Property>
            <Property Name="WcfEndpointAddress"
             Type="System.String">https://Contoso.COM:44300/sap/bc/srt/pm/iwtng/iwxmanagecustomerin/000/
            duet_enterprise_saml/1/binding_t_https_a_wsse__-iwtng_-iwxmanagecustomerin_duet_enterprise_saml</Property>
          </Properties>
        </LobSystemInstance>

Specify the Site Definition or Template

If the external content types exposed in the model support the Duet Enterprise collaboration feature, then a property must be added to the associated entities describing the site definition or template that will be used for collaboration instances. You must also include a Title property for the entity. The value of the Title property is the entity field whose value will be used as the title of the workspace instances that will be created for this entity. This is shown in the following example.

   <Entity Namespace="SAP.Office.DuetEnterprise.Account" Version="1.0.1.0" EstimatedInstanceCount="10000" Name="Account" DefaultDisplayName="Account">
          <Properties>
            <Property Name="ExcludeFromOfflineClientForList" Type="System.Boolean">false</Property>
            <Property Name="Title" Type="System.String">FirstLineName</Property>            <Property Name="WorkspaceSiteTemplate" Type="System.String">OBACustomerDetails</Property>

          </Properties>     

Specify BDC Collaboration Actions

To support the use of workspaces on an external list, it is necessary to add an action. You can do this in the following two ways:

  • By adding an action in the model directly, as shown in the following example.

    <Actions>
       <Action Position="1" IsOpenedInNewWindow="false" 
         Url="~site/_layouts/OBA/CollabSiteRedirect.aspx?CustomerId={0}&amp;
         EntityName=Account&amp;EntityNamespace=SAP.Office.DuetEnterprise.Account&amp;
         LobSystemInstance=Account&amp;ShowInECB=true" Name="Open Workspace" 
         ImageUrl="/_layouts/images/CollabOnOpenWorkspace16.png">
          <ActionParameters>
             <ActionParameter Index="0" Name="CustomerId"/>
          </ActionParameters>
       </Action>
    </Actions>
    
  • By defining actions in SharePoint through Central Administration for the external content type. Remember you must define the action after you import the model into SharePoint.

Import the Modified Model into SharePoint

After making the required modifications in the model, import the model by using SharePoint Central Administration. For detailed steps, see Import a BDC model (https://technet.microsoft.com/en-us/library/ee661739.aspx\#importamodel).

The external content types in the model can now be used to expose SAP data in SharePoint and Microsoft Office applications.

See Also

Concepts

Sample Duet Enterprise XML Snippet: URL Action (https://msdn.microsoft.com/en-us/library/ff963719.aspx)

BDC Model Best Practices for Duet Enterprise (https://msdn.microsoft.com/en-us/library/ff963730.aspx)