Tuesday 17 April 2018

Importing Item Assembly Structure through Application Import in Item Application


Step 1: Create an Object Structure
Parent : ITEM
Child : ITEMSTRUCT
Relationship : CHILDRENITEMSTRUCT




Step 2: Make sure to change the Alias of ITEMSTRUCT.ITEMID to C_ITEMID and check the support flat file Structure check box.

Wednesday 11 April 2018

Setting Current Date in XSL for Maximo Integration

During Maximo integration there is need to transform XML from Maximo XML format to External System(eg Oracle) XML format. There we can use the XSL mapping in Maximo. Maximo converts the XML to destination XML format using XSL language and vice versa. During that time, if there is need to set the current date in the XSL format see the below code spinet.

<xsl:stylesheet version="1.0"  
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  
xmlns:max="http://www.ibm.com/maximo"  
xmlns:java="http://xml.apache.org/xslt/java" exclude-result-prefixes="java">
 <xsl:template match="/">
  <max:SyncRFQSResponse>
   <max:RFQSet>
    <max:RFQ action="AddChange">
      <xsl:for-each select="max:RFQSyncResponse/max:RFQSet/max:RFQ">
       <max:RFQNUM>
         <xsl:value-of select="max:RFQNUM" />
       </max:RFQNUM>
       <max:SITEID>
         <xsl:value-of select="max:SITEID" />
       </max:SITEID>
       <max:TEST_DATE>
         <xsl:value-of select="java:format(java:java.text.SimpleDateFormat.new('yyyy-MM-dd HH:mm:ss'), java:java.util.Date.new())" />
       </max:TEST_DATE>
      </xsl:for-each>
    </max:RFQ>
   </max:RFQSSet>
  </max:SyncRFQResponse>
 </xsl:template>
</xsl:stylesheet>

Tuesday 10 April 2018

Python - setting Date and Time using automation Scripts

The python version used Maximo automation scripts is 2.5.2. So the normal DateTime function in Python cannot be used in Maximo. The DateTime function is used in Python 3.x and above. As an alternative, we can use the gmtime and strftime packages.

from time import gmtime
from time import strftime
nowTime = strftime("%Y-%m-%dT%H:%M:%S", gmtime())
print(nowTime)
mbo.setValue("TARGSTARTDATE", nowTime)
print("TARGSTARTDATE-->" + mbo.getString("TARGSTARTDATE"))


Monday 9 April 2018

Planning Service Items in Work Order Plans


This article will provide you an idea about planning service items from Job Plans to Work Orders.

Step 1: Go to Service Item application.

If you have already purchased this service item, then the vendor details and Last Price will be automatically updated in Vendors section based on last Purchase Order.

If you haven’t purchased this service item earlier, then the cost and vendor details will not be available here. You can also enter those details here directly.