Plug-in: Finance Integration with Work Actuals

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The SapFIPlugIn component of the ERP Connector Solution Starter for Microsoft Office Project Server 2007 can export work actuals for projects and resources from Project Server to the mySAP™ ERP Financials CO and PS subsystems. The plug-in uses XML request files created on Project Server and exports data files—for a specified date range and with properties relevant for mySAP ERP Financials—to a drop folder.

The ERP Connector on Project Server detects an XML request file and processes it by using the SapFIPlugIn component (in the ErpConnector.SapFIPlugIn.dll assembly).

NoteNote

Because the Project Server Interface (PSI) can process a maximum of 1000 rows of data at a time, the implementation of SapFIPlugIn in the ERP Connector cannot handle requests that result in more than 1000 rows in a DataSet.

This topic contains the following sections:

  • Creating the XML Request File for Exporting Actuals

    • XML Request and Export Syntax

    • Request Parameters

    • Export Parameters

    • Enterprise Custom Field Mappings

  • Processing a Request

    • Retrieving Actuals

    • Summarizing Actuals

  • Exporting Actuals

For information about configuration settings of the SapFIPlugIn component, see Configuring the ERP Connector. For developer documentation of the classes, methods, properties, and events of the ERP Connector, see the ERPConnectorComponents.chm file in the Project 2007 SDK download. For class diagrams, see the class diagram.cd files in each project of the ERP Connector 2007 solution in Microsoft Visual Studio 2005.

Creating the XML Request File for Exporting Actuals

An administrator for the Project Server computer must create an XML request file and copy it to the drop folder on Project Server. The ERP Connector Solution Starter does not include an application that creates XML request files for exporting actuals.

NoteNote

For a production implementation of the ERP Connector, you must modify the SapFIPlugIn component to match business requirements for your organization's mySAP ERP Financials system. You can also create a Web application that builds and drops XML request files for exporting actuals.

XML Request and Export Syntax

The XML syntax is different for the request file and the export file. The request file specifies only the date range and units (hours or days) for the actuals export. The export file includes accounting data for mySAP ERP Financials.

Request File Syntax

<Request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="SapFIPlugIn.xsd">
   <GetActualsSAP>
      <PeriodStart/>
      <PeriodFinish/>
      <ActualsUnit/>
   </GetActualsSAP>
</Request>

Export File Syntax

<Actuals>
   <ActualUnit/>
   <Actual>
      <PeriodStart/>
      <PeriodFinish/>
      <SAPCONumber/>
      <ResourceSAPID/>
      <ActualValue/>
   </Actual>
</Actuals>

Request Parameters

Table 1 describes the parameters for a GetActualsSAP request.

Table 1. Parameters for a GetActualsSAP request

Tag

Description

Type / format

Occurrence

PeriodStart

Start date of the period for the actuals.

Date: YYYYMMDD

1

PeriodFinish

End date of the period for the actuals.

Date: YYYYMMDD

1

ActualsUnit

Time unit for actuals.

Hours or Days

1

Export Parameters

Table 2 describes the elements in an XML file exported from SapFIPlugIn. If the tag occurrence includes 0, it is an optional parameter. An occurrence of n means unbounded.

Table 2. Parameters for actuals export data

Tag

Description

Type / format

Occurrence

ActualsUnit

Time unit for actuals.

Hours or Days

1

Actual

Parent element for the reported work data.

 

0 - n

PeriodStart

Start date of the period for the actuals.

Date: YYYYMMDD

1

PeriodFinish

End date of the period for the actuals.

Date: YYYYMMDD

1

SAPCONumber

Order ID in the mySAP ERP CO subsystem.

Text

1

ResourceSAPID

Corresponds to the PERNO (personnel number) value in mySAP ERP Human Capital Management (HCM).

Text

0 - 1

ActualValue

Number of hours or days in the reporting period.

Decimal value

1

Enterprise Custom Field Mappings

Table 3 shows the relationships between XML data and properties in the PSI StatusingTimePhasedActualsDataSet, task enterprise custom fields, and methods for exporting work actuals data from Project Server.

Table 3. Mappings of request and export data

Tag

Description

(XML request data)

PeriodStart

Used in the start parameter for the call to ReadStatusTimephasedData.

PeriodFinish

Used in the end parameter for the call to ReadStatusTimephasedData.

ActualsUnit

Used in the unit parameter for the WriteActuals method in SapFIPlugIn. Can override the Default·Units value in the SapFIPlugIn.config file.

START

ProjectDataSet.ProjectRow.PROJ_INFO_START_DATE

(XML export data)

ActualsUnit

Value from the XML request file or the configuration file (SapFIPlugIn.config).

PeriodStart

StatusingTimephasedActualsDataSet.AssignmentTimephasedDataRow.TimeByDay

PeriodFinish

StatusingTimephasedActualsDataSet.AssignmentTimephasedDataRow.TimeByDay

SAPCONumber

Task enterprise custom field: SAP Order ID

ResourceSAPID

Task enterprise custom field: SAP Resource ID

ActualValue

StatusingTimephasedActualsDataSet.AssignmentTimephasedDataRow.AssignmentActualWork

 

StatusingTimephasedActualsDataSet.AssignmentTimephasedDataRow.AssignmentOvertimeWork

Processing a Request

The SapFIPlugIn component extracts the specified start and finish dates and the units from an XML request that has the GetActualsSAP element. The plug-in then starts the synchronization process with Project Server to retrieve the work actuals.

Retrieving Actuals

SapFIPlugIn creates two entity containers, a Projects container and a Resources container, and then synchronizes them with Project Server. The entity containers receive existing data from the server; they do not upload data to the server.

The Resources container stores only resources that have a SAP Resource ID custom field. The Projects container stores only projects that have at least one task with a SAP Order ID custom field and a task duration that overlaps any part of the specified date range.

SapFIPlugIn uses the tasks from Project objects in the Projects container to retrieve all work actuals within the specified dates. The plug-in uses the Resources container to find SAP Resource ID values from the resource GUID values. The plug-in creates an Actual object for each work actuals entry. The Actual object includes properties with the SAP Resource ID value (if it is present) and the SAP Order ID for the project or task.

Summarizing Actuals

When SapFIPlugIn creates an Actual object, the AddActuals method creates dictionaries that summarize the data by SAP Order ID and SAP Resource ID values. When the summary is complete, the plug-in exports the actuals.

Exporting Actuals

SapFIPlugIn creates an XML file in the specified export folder. For each Actual object, the plug-in adds an Actual element in the XML file with the properties of the actuals entry. After all actuals are exported to the XML file, the plug-in uses an .xsl file to transform the XML data to a comma separated values (.csv) file. The .xsl file is an embedded resource in the ErpConnector.SapFIPlugIn.dll assembly.

NoteNote

The names of the exported files do not change. Processing another export request overwrites the files created by the previous export. When you implement SapFIPlugIn and the modules for mySAP Financials on a production system, you must process the export file before it is overwritten.

See Also

Concepts

ERP Connector Architecture

Configuring the ERP Connector

Core Components of the ERP Connector

Plug-in: Human Resources Integration

Plug-in: Finance Integration on a Project and WBS Level