Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

Duet Enterprise scenario:

  • Gateway DataModel ‘Query’ operation with one or more import parameters; with default values in the mapped RFC
  • ‘Query’ operation exposed via a BCS::Finder method in the BDC Model that is generated via the BDC Publisher; each of the import parameters mapped to BCS Filter parameters
  • SharePoint view on the ‘query’ result; e.g. via ExternalList, Business Data List, custom webpart

In such Duet Enterprise application context you might experience that when you (on purpose or by accident) do not enter concrete values for the Filter parameters, SharePoint retrieves + renders a different set of external SAP items as expected. You would expect the mapped SAP RFC to apply its default value(s). However, this is only true when the types of the import/filter parameters are nullable. If not nullable, SharePoint is required to submit a concrete value when invoking the Finder method. If missing from front-end invocation, SharePoint will submit the default value for the non-nullable type. E.g. for a DateTime, this means the value ‘1-1-1900’. 

You have 2 options to alter this SharePoint BCS invocation behavior:

  1. In the BCS Model, declare the non-nullable types as nullable.
    <TypeDescriptor TypeName="System.Nullable`1[[System.DateTime, mscorlib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]" Name="IV_SEARCH_BEGDA" AssociatedFilter="IV_SEARCH_BEGDA">
  2. In the BCS Model, search for a method parameter with name "<filter-import-parameter>Specified". If present, make sure it’s default value is set to ‘false’.
    <TypeDescriptor TypeName="System.Boolean" Name="IV_SEARCH_BEGDASpecified">
        <DefaultValues>
            <DefaultValue MethodInstanceName2="Find_ExternalItems" Type="System.Boolean">false</DefaultValue>
        </DefaultValues>
    </TypeDescriptor>

1 Comment
Labels in this area