SAP Integration Record for Maintenance Item Error


 Product(s):APM Implementation and Performance Management
 Version(s):all
 Environment:N\A
 Area:N/A
 Subarea:N\A

Problem

Some SAP to APM integration records for Maintenance Items are failing to process. The integration message states; "Info: Fetching integration record (ObjectID=1111111, MTCItem 0000005100222222) from SP_MAINTITEM_IN. Info: Fetching Functional Location (FLOC=?0100000000003333333). Info: Fetching Standard Job (MtcPlan=0001XXXXXXXX). Error: Object reference not set to an instance of an object. Error at SAPInterface.MAINTITEM_IN_Interface. ProcessIntegrationRecords(EXPLinkSession session, WorkUnit '2 work Unit). Error: Unable to import record 1111111 from SP_MAINTPLAN_IN. Can you please help determine what is going on?

Solution

Errors in staging records are typically not failures of the integration but are instead messages about why a staging record failed to be translated into an APM object. Understanding these messages is fairly straight-forward. When troubleshooting an integration message, find the first Error line in the string and its preceeding Info line and read them together to understand what is going on. From this example;

"Info: Fetching Standard Job (MtcPlan=0001XXXXXXXX). Error: Object reference not set to an instance of an object."

This can be read as "APM tried to find Standard Job 0001XXXXXXXX. APM could not set an object reference (on Maintenance item being created) because the referenced object (Standard job 0001XXXXXXXX) does not exist in APM."

So in this case, the APM Standard Job that is equivalent to SAP Maintenance Plan 0001XXXXXXXX does not exist in APM. Maintenance Items are dependent on 2 separate objects already existing in APM, the related Standard Task (equivalent to SAP Task List) and the related Standard Job (equivalent to SAP Maintenance Plan). If either of those components are missing, the staging record cannot process because it is missing data for a required field.

The next step in troubleshooting this error is to review the Maintenace Plan integration records for Maintenance Plan 0001XXXXXXXX.  In this example, the Maintenace Plan did not exist its integration record also failed to process. But in this case it was because it was missing information in a required field, a related Site object. The referenced Site object was not created in APM in advance of the integration being run, nor were the FLOCs objects associated with that site.

So to correct all of these different error sources, all sites must be represented APM and mapped to the equivalent SAP site. Also, the order of operations for running integrations must be set to run in the following order so that all required references in APM are created prior to running the Maintenance Item.

SAP to APM Assets inbound

SAP Task List to APM Standard Task inbound

SAP Maintenance Plan to APM Standard Job inbound

SAP Maintenance Item to APM Standard Job Task inbound

SAP Notification to APM Work Request outbound and inbound

SAP Work Order to APM Work Order outbound and inbound

This will reduce the number of erroring staging records and associated troubleshooting significantly. Most remaining integration record errors will be for value list items that are not represented in APM or SAP.

See Also

APM_Integration_SAP Guide in you Bentley APM docs folder.



 Original Author:Joe Marin