Sunday, December 30, 2012
OData Channel (ODC) development now preferred for new Duet Enterprise scenarios
Saturday, December 15, 2012
Duet Enterprise 2.0 General Available: improvements on service development and deployment options
After successful completion of Duet Enterprise 2.0 Ramp-Up and with SharePoint 2013 reaching RTM state, SAP and Microsoft have made the new version of Duet Enterprise General Available. Customers can download the software from SAP Market Place (Installations and Upgrades \ Duet Enterprise \ Duet Enterprise 2.0). Duet Enterprise 2.0 documentation can also be found on SAP Market Place, and also on MSDN.
Most significant of the new Duet Enterprise version is that it connects with the latest capabilities of the underlying platforms, respectively SAP Gateway 2.0 and Microsoft SharePoint 2013. In both these platforms a move is made to support cloud and lightweight usage scenarios - typically but not limited to mobility use cases.
- Mobility
- Duet Enterprise now fully supports OData protocol; which is THE protocol for mobility because is it light-weight and self-describing, and supported by all mobile platforms
- Cloud
- Connect to SharePoint Online
- Only support for Odata channel; not for SOAP / Generic channel
- Requires a 'light' on premisse SharePoint installation, as intermediate layer ('broker') from internal SAP Gateway to SharePoint online. Includes SSO Generator, via reverse proxy connection with SharePoint Online
- Remark: Duet Enterprise cloud stuff is not yet GA; this will follow in a few month
- Design Time improved
- 2 design time approaches supported
- Inside-Out: via the SAP NetWeaver Gateway generators
- Outside-In: start from SharePoint UI --> visually sketch / specify a screen in Visual Studio; export the .EDMX file and import into SAP Gateway (Service Builder) for constructing the Gateway data models
- Both approaches are restricted to flat SAP data entities
- Complex data structures still requires hand-crafting on SAP Gateway side
- Via OData service providers; the handcrafting work is far simpler as with Duet Enterprise 1.0 (FP1).
- Improve the development story:
- Reference architecture guidance
- Setting up local development landscape --> facilitate individual SharePoint developers to quickly start with Duet Enterprise development
- Consequence: drop SAML, as OData does not support SAML. Use oAuth instead
- Generic Channel will still be supported; OData is extra channel possibility
- Duet Enterprise 2.0 REQUIRES SharePoint 2013
- SharePoint 2013 BCS supports Odata consumption; earlier version not
- SharePoint Online.
In the philosophy of SAP and Microsoft, also Duet Enterprise 2.0 does not include end-user functionality, e.g. order-to-cash. Duet Enterprise remains a customization + development framework for SAP / Microsoft interoperability, that enables end-organizations and partners to compose concrete scenarios and build upon. Primary reason for the Duet Enterprise product team to not include end-user functionality is that partners and end-organizations know best what diverse scenarios are requested, and are therefore better suited to construct the optimal solution. Also, even SAP plus Microsoft simple do not have the development resources to realize and support a total set of end-user capabilities for which there is market demand.
It is left to the market / Duet Enterprise eco-system to deliver standard / common-of-the-shelf end-user functionalities. Well-known example is the Cordis Suite; for self-service HCM and purchase requisition solutions. More examples can be found on Duet Enterprise Unite Partner Connection. And more partners are known to be developing on additional scenarios.
With Duet Enterprise 2.0 General Availability, it is expected that more companies will find it benefial to develop end-user solutions. This is due the combination of Duet Enterprise 2.0 development improvements, out-of-the-box plus customization capabilities of SharePoint 2013 and Office 365, and deployment extended to cloud and mobile platforms resulting in a larger market. Partners will develop solutions for horizontal and vertical markets; for local to international markets, and from small/partial solutions to complete end-2-end scenarios.
Saturday, November 17, 2012
Locale bug in ddwrt:FormatDate not resolved for external data
The SharePoint 2010 February CU 2012 contains an hotfix for this bug, and introduces the ListViewWebPart property ‘EnableOrginalValue’.
After retrieving a DateTime field from an external system, the BDC runtime examines the DateTime.Kind property to determine its time zone. If it is UTC or Unspecified, no action is taken. If it is marked as Local, BDC converts it to UTC by applying an offset based on the SharePoint front-end web server’s time zone, as specified by its Windows settings.
Now that the time zone has been standardized to UTC, the external list (aka XsltListViewWebPart) examines the user profile settings for the current user; if a time zone has been specified, the time is converted from UTC to the user's time zone. If a time zone has not been specified (which is the default state), the time zone of the site on which the external list is hosted is used to convert the external data. The converted times are then presented to the user in the UI in a format (for example dd/mm/yyyy hh:mm:ss) based on the site locale."
Saturday, November 10, 2012
Notification + data flow in Duet Enterprise Workflow mobile App
System architecture
In such system architecture, following systems/layers are present:- SAP backend / workflow engine: the host environment of the SAP workflows
- SAP Gateway: general purpose SAP integration layer; here used to publish SAP workflows from backend to workflow notification subscribers
- SharePoint Duet Enterprise Add-On: functions here as workflow notification subscriber; host of Duet Enterprise workflow instances, and task repository for the mobile application
- Mobile view: retrieve plus display tasks, and propagate task approval decision back to the SharePoint task repository
Notification and data flow for exposing SAP task to non-SAP view
Sequence steps:- The SAP ERP workflow execution arives on a user decision task, that is configured for notification to Gateway (tx SPRO, Gateway workflow customization);
- SAP Document Publisher composes a XML Payload document with task data: workitem identification plus business data. The addition of the workflow specific business data is optional in Gateway Workflow notification. If applicable, you can achieve this by extanding the workflow customization with the plug-in of a custom OutboundHandler;
- SAP Document Publisher calls the SharePoint OBAWorkflowServer.asmx::CreateTask operation, with inputparameters the task(type) identifier, workitem identifier and XML PayLoad document;
- SharePoint OBAWorkflowServer.asmx::CreateTask method:
- Queries the TaskLocator List in the Duet Enterprise Workflow rootsite, and determines on basis of tasktype and user language the Duet Enterprise Workflow subsite to which the received SAP task must be routed;
- Instantiates a new SharePoint workflow instance in the identified Duet Enterprise Workflow subsite, and associates this instance with the SAP workitem identifier;
- And uploads the received XML PayLoad document into the Workflow Business Data DocLibrary in the Workflow subsite;
- The SharePoint Duet Enterprise Workflow contains by default only 1 step that represents the decision-making for the SAP task. It is possible to extend the SharePoint Workflow with additional steps and functionality. This will operate isolated from the SAP Workflow handling. The default approval task in the SharePoint Duet Enterprise workflow is the only connectionpoint between the SharePoint workflow and the SAP decision workflow task. Upon the Duet Enterprise Workflow arriving at the approval task, it appears in the SharePoint tasklist.
- User opens the tasklist in the mobile application;
- The tasklist App call SharePoint List.svc service (DataAccess Layer) to retrieve the open tasks for the logged-on user
- SharePoint List.svc queries the SharePoint workflow tasklist, to determine and retrieve the open task items for logged-on user
- SharePoint List.svc returns the task items in Odata format
- The Duet Enterprise Workflow Approval Task and the XML PayLoad document are in the SharePoint Workflow administration logical associated to each other. If additional business extended properties are notified for the SAP workitem via OutboundHandler, the associated Business Data document must be opened from the SharePoint document library and its contents parsed to retrieve the additional properties.
Control and data flow for handling task decision from non-SAP mobile App to SAP workflow context
- User makes a decision in the task management App;
- Task management App calls SharePoint Workflow.asmx webservice to propagate the task approval decision to SharePoint task item;
- SharePoint workflows.asmx updates the task item with approval decision;
- The update on SharePoint taskitem triggers the TaskItemEventReceiver;
- Triggered TaskItemEventReceiver::ItemUpdating method checks whether the SharePoint task item is completed; that is a approval decision is made. If completed, TaskItemEventReceiver calls [through SharePoint Business Connectivity Services] the Update method of External ContentType Duet Enterprise Workflow Task;
- SharePoint BCS calls for Duet Enterprise Workflow Task Update the wfUpdate method of SAP workflow consumer webservice; with input parameters workitem identifier, decision value and comments;
- SAP workflow consumer webservice propagates task approval decision to the associated SAP workflow instance, and executes apply decision on the SAP workitem;
- SAP workflow completes this workitem step, and proceeds to the next step in SAP workflow. If it was the last step in workflow, the SAP workflow is now completed;
- TaskItemEventReceiver updates the status of SharePoint taskitem to completed. In default (generated) Duet Enterprise Workflow is this the only step/task, and the SharePoint workflow is completed. The SharePoint taskitem is removed from the users open tasks list.
Sunday, November 4, 2012
Selective enable ScriptManager presence in SharePoint Publishing Site
- Duplicate the ‘clean’ end-user masterpage; and augment it with the required entities.
- Create an additional Publishing PageLayout; and augment that the required entities.
- As consequence that a SharePoint SPWeb can only have 1 masterpage, ‘clean’ content publishing pages and WebControls pages cannot be within the same SharePoint SPWeb. In fact, the type of pages now influences the site structure. This is visible for the end-user. And for the content manager it implies that (s)he is forced to locate new page a priori within the correct SPWeb given the intended type of page: content or control. Also, as standard SharePoint navigation is based on the site structure, it will require custom development to repair the logical site navigation.
- Double maintenance of the site look&feel in the 2 public masterpages.
- The extended PageLayout must function both in combination with the clean masterpage as with the content-editor enabled masterpage. But the latter also as Form runat=”server” and ScriptManager included; resulting in 2 occurences of them. And this is not allowed in ASP.NET plus SharePoint.
- SharePoint scriptmodel imposes hidden dependencies on the order of including + evaluating/loading SharePoint javascript files (through SOD framework).
- Include Form runat=”server” in the extended PageLayout; but default not visible.
- A server control included in the extended PageLayout to dynamically insert the ScriptManager plus ScriptLink for core.js; but only if no ScriptManager present yet (included from the content-editor masterpage). When runtime determined that the ScriptManager must be inserted, also the invisible server-side Form is made visible; and all siblings of the Form control are moved within the server-side HtmlForm control.
- A server control included in the public masterpage to dynamically insert WpzEmitControl (explanation why needed) if needed; the condition for this is whether the InsertScriptManager control is include in the page context.
Result
Regular content pages still render ‘clean’ html in public view, without the unneeded SharePoint html and javascript. Control pages render in public view including the required ScriptManager and Form runat=”server”; and in editing view also with only occurrence of ScriptManager and server-side HtmlForm.Sunday, October 28, 2012
Deploy custom Duet Enterprise scenario from Dev into SAP landscape
Design time - prepare the custom business scenario
It is best practice to include all of the Duet Enterprise services for one scenario within an own isolated and recognizable namespace in the Gateway system. Each scenario will then be recognizable, and not per accident mingled with deliverables of another Duet Enterprise scenario. To achieve this, you create per business scenario an own Software Component in SLD, and use that to create in ESR an own Software Component Version and namespace.- Open SLD, and create a new Software Component
- Open ESR, and create a new Software Component Version via import of the newly created Software Component
- Create a namespace in the newly created Software Component Version
- Copy the Basic DataTypes from SAP IW TNG to the new Software Component Version and namespace
- Copy the Fault Message from SAP IW TNG to the new Software Component Version and namespace
- Activate the resulting changelist(s) in ESR
- Logon to Gateway system, transaction SE80; and create a Package
- Logon to Gateway system, transaction SProxy; and create + activate proxies for the Basic DataTypes, ExchangeFaultData and ExchangeLogData in the newly created Package.
Design time - create the service definitions for the custom business scenario
Per service this consists of the 2 familiar actions: create and map a Gateway DataModel, and next generate the service definition + BDC Model for this Gateway DataModel (GSDO Type).- Logon to Gateway system, transaction SE80; and create a new Gateway DataModel; make sure not to select OData channel (Duet Enterprise 1.0 and SharePoint 2010 do not support OData consumption; this will change with Duet Enterprise 2.0 and SharePoint 2013). The system enforces you to include the creation of the Gateway DataModel in a Workbench request. The advice is to not include it in the same Workbench request from the preparation step, but instead use an own Workbench request for the design time deliverables. As result you have the implementation of the Package including the generic basic DataTypes + FaultMessage separated from the implementation of the specific scenario entities. It is typical in a custom realization project that you incremently build new versions of an own service definition, and if a previous version already transported you must be able to replace that while preserving the Package.
- Map 1 of more operations in the Gateway DataModel; e.g. Query and Read
- Generate the Gateway DataModel; the system enforces you to include the generation and creation of SAP entities within a Customizing request.
- Open transaction BDC Browser; if this is the first service definition for the custom business scenario, create a new Business Scenario. Otherwise you may opt to include the 2nd, 3rd and so on service definition all within the same Business scenario. I advice this as best practice, you then end up with a single Duet Enterprise Business Scenario that contains the entire set of Service Definitions developed for it. In case you create a new Business Scenario, it is again enforced by the system to include it within a customizing request. You can select the same as earlier created for the Gateway Model generation(s).
- Select the Business Scenario, and Create BDC Model for GSDO Type; select the Gateway Model earlier created. Also here the system enforces to include within a customizing request.
- [Optional] Open transaction SProxy, select the generated service interface and test its correct working for the diverse methods in the interface (e.g. Find, Read, Create, )
- [Optional] Open SOAMANAGER on Gateway system, browse to Business Scenario Configuration. Select your Business Scenario, and export + save into a local XML file.
Implementaton time - transport the custom business scenario
When the custom realization has progressed or is even completed in the Gateway system of the SAP Development environment, next is to propagate it within the SAP landscape.- Logon to Gateway system of SAP Dev environment, transaction SE03 or SE10; and release all the Workbench and Customizing requests that are related to the custom Duet Enterprise Business Scenario
- Logon to Gateway system of the transport target environment (SAP Test or QA environment), and open Transport Management System (TMS). Import the released Workbench and Customizing requests from the Development environment.
- Activate each of the requests. Make sure to do this in the correct logical order: first package, next the business scenario including service definitions.
- Logon to Gateway system of the transport target environment, transaction BDC Browser. Validate that the Business Scenario(s) is/are present. Also validate that for each of the imported service definitions, there is no end point yet.
- Release and activate all of the imported service definitions in SOAMANAGER. Browse to Business Scenario Configuration, and import the Business_Scenario XML file that is exported in the Development environment. If the Business Scenario already exists here from a previous import, first delete it. Or otherwise you can also explicitly associate new service definitions within a/the Business Scenario, and assign a profile. After activation of the service definitions, validate in transaction BDC Browser that for each of the service definitions now an end point is available.
- [Optional] Open transaction SProxy, select the imported service interface and test its correct working for the diverse methods in the interface (e.g. Find, Read, Create, )
- Transaction BDC Browser, select the imported Business Scenario and click on Export Business Scenario. Hand over the exported SharePoint BDC Model(s) to import within the SharePoint BCS Service Application of the implementation environment.
- [Optional] In SharePoint webapplication, create an ExternalList for one of the imported External Content Types. Validate that you can retrieve SAP data via Duet Enterprise and SAP Gateway using one of the transported / imported Gateway Service Definitions.
Sunday, October 7, 2012
Duet Enterprise troubleshooting pointers
Generic
SAP side
- BDC Browser - Troubleshooting pointers
- BDC Browser Configuration - Software Component SAP IW TNG missing
- Workflow tasks not delivered?
- txn SLG1 on backend
- txn SRT_UTIL on Gateway
- txn SBGRFCMON: retry queue contains wf-items failed to deliver to SharePoint
- use 'Unit Analysis \ Run Unit with Trace' to execute again/debug
- ABAP runtime errors / dumps: txn ST22
- ABAP system log: txn SM21
- Duet Enterprise 1 - Troubleshooting Report Delivery
- GW 2.0 SP5: Which Tools Can Be Used for Troubleshooting
- For Payload tracing:
- txn SRT_UTIL
- txn SMICM (ICF trace tools)
- ABAP Function Modules and services: External Debugging, Set External Breakpoints for ABAP Debugging
- Troubleshooting Gateway Development
- SAP system HTTP Logging
- Using Starter Services without EhP4






