Topic
1 reply Latest Post - ‏2013-07-04T19:06:00Z by PriyaranjandasKolambkar
2DBM_Deepika_Sood
2DBM_Deepika_Sood
1 Post
ACCEPTED ANSWER

Pinned topic Error while importing XML

‏2013-06-24T21:16:24Z |

What I am doing is a very simple task. I have setup a custom Object Structure with Primary Object as SR, and lets assume only other object included in OS is RELATEDRECORD.  What i want to do is import XML into Maximo to create a new SR and relate to an existing SR/WO. I configured Enterprise Service and External Object for the same.

Here is one successful XML that i was able to process (Creating new SR and relating it to an existing SR)

Here is an example of a successful transaction - notice that this one is relating an SR instead of a WO.

<?xml version="1.0" encoding="UTF-8"?>
<SyncMXISSRWO xmlns="http://www.ibm.com/maximo">
  <MXISSRWOSet>
    <SR action="AddChange">
      <CLASS>SR</CLASS>
      <CLASSSTRUCTUREID>ABC</CLASSSTRUCTUREID>
      <DESCRIPTION>ABC</DESCRIPTION>
      <DESCRIPTION_LONGDESCRIPTION>ABC</DESCRIPTION_LONGDESCRIPTION>
      <CREATEDBY>ABC</CREATEDBY>
      <GLACCOUNT />
      <ORGID>ORG</ORGID>
      <OWNER>ABC</OWNER>
      <OWNERGROUP>ABC</OWNERGROUP>
      <REPORTEDBY>ABC</REPORTEDBY>
      <REPORTDATE>2013-03-24T14:51:32Z</REPORTDATE>
      <SITEID>SITE</SITEID>
      <STATUS>RESOLVED</STATUS>
      <REPORTEDPRIORITY>3</REPORTEDPRIORITY>
      <URGENCY>3</URGENCY>
      <INTERNALPRIORITY>3</INTERNALPRIORITY>
      <IMPACT>3</IMPACT>
      <EXTERNALSYSTEM>SELFADMIN</EXTERNALSYSTEM>
                    <RELATEDRECORD>
                        <RELATEDRECKEY>SR213535</RELATEDRECKEY>
                        <CLASS>SR</CLASS>
                        <ORGID>ORG</ORGID>
                        <RELATEDRECCLASS>SR</RELATEDRECCLASS>
                        <RELATEDRECORGID>ORG</RELATEDRECORGID>
                        <RELATEDRECSITEID>SITE</RELATEDRECSITEID>
                        <RELATETYPE>RELATED</RELATETYPE>
                    </RELATEDRECORD>
    </SR>
  </MXISSRWOSet>
</SyncMXISSRWO>

 

 

I was able to create new SR and associate it with the given existing SR#.

Next i tried to have a WO related to the newly created SR. Here is the XML that i used.

<?xml version="1.0" encoding="UTF-8"?>
<SyncMXISSRWO xmlns="http://www.ibm.com/maximo">
  <MXISSRWOSet>
    <SR action="AddChange">
      <CLASS>SR</CLASS>
      <CLASSSTRUCTUREID>ABC</CLASSSTRUCTUREID>
      <DESCRIPTION>ABC</DESCRIPTION>
      <DESCRIPTION_LONGDESCRIPTION>ABC</DESCRIPTION_LONGDESCRIPTION>
      <CREATEDBY>ABC</CREATEDBY>
      <GLACCOUNT />
      <ORGID>ORG</ORGID>
      <OWNER>ABC</OWNER>
      <OWNERGROUP>ABC</OWNERGROUP>
      <REPORTEDBY>ABC</REPORTEDBY>
      <REPORTDATE>2013-03-24T14:51:32Z</REPORTDATE>
      <SITEID>SITE</SITEID>
      <STATUS>RESOLVED</STATUS>
      <REPORTEDPRIORITY>3</REPORTEDPRIORITY>
      <URGENCY>3</URGENCY>
      <INTERNALPRIORITY>3</INTERNALPRIORITY>
      <IMPACT>3</IMPACT>
      <EXTERNALSYSTEM>SELFADMIN</EXTERNALSYSTEM>
      <RELATEDRECORD>
        <RELATEDRECWONUM>WO10170</RELATEDRECWONUM>
        <CLASS>SR</CLASS>
        <ORGID>ORG</ORGID>
        <RELATEDRECWOCLASS>WORKORDER</RELATEDRECWOCLASS>
        <RELATEDRECORGID>ORG</RELATEDRECORGID>
        <RELATEDRECSITEID>SITE</RELATEDRECSITEID>
        <RELATETYPE>RELATED</RELATETYPE>
      </RELATEDRECORD>
    </SR>
  </MXISSRWOSet>
</SyncMXISSRWO>
 

The error i got says:

     <MAXINTERRORMSG>The following error occurred while processing SR. The object structure number is 1.BMXAA4195E - Required field Related Record Key is blank.</MAXINTERRORMSG>
 

Why does the system  need RECORDKEY when relating to WO, but not when relating to SR? I cannot give recordkey as the ticket is not yet created. This is happening across versions. Please suggest.

  • PriyaranjandasKolambkar
    3 Posts
    ACCEPTED ANSWER

    Re: Error while importing XML

    ‏2013-07-04T19:06:00Z  in response to 2DBM_Deepika_Sood

    Hello,

    You can take an existing SR having a related WO record. If you don't have create one such record.

    Then use your custom OS and use the Publish Channel from your external system to export the above SR. You can check what is being exported in the Related Record Key in the XML and take a cue from there as to what can be given as while importing.

    Regards,