Maximo Integration

 View Only
  • 1.  Change the field order in an integration flat file

    Posted Sun January 09, 2022 03:06 PM
    Hi everyone,

    currently we have an integration process via delimited separated values flat file to SAP system to integrate workorders and planned records in one file. We use an object structure, publish channel, external system to support flat file. The object structure contains workorder and its planned materials.


    the order of the fields in the flat files was: the first fields are from the WORKORDER object, and then come the fields from the WPMATERIAL object. In this scenario, let's say we focus in one of the fields present in both tables, ATTRIBUTE_X is either in WORKORDER and WPMATERIAL and right now we are creating the flat file and ATTRIBUTE_X is located in the 3rd position of the line because it is been retrieved from WORKORDER object:

    SAP|SAPWODETAIL_SERVICIOIface|Replace|ES
    WO_DESCRIPTION|SITEID|ATTRIBUTE_X|SLXCTACONT|SLXMONEDA|STATUS|STATUSDATE|PRIMARYEMAIL|WONUM|DESCRIPTION|DESCRIPTION_LONGDESCRIPTION|ISSUETO|ITEMNUM|ITEMQTY|LINECOST|LINETYPE|LOCATION|ORDERUNIT|REQUESTBY|REQUESTNUM|REQUIREDATE|STORELOCSITE|UNITCOST|VENDOR|WPITEMID
    CODXXXX//MANTENIMIENTO PRUEBA|6011SXXXX|S1080264|42030XXXX|CLP|APPR|2021-10-22T16:08:13+00:00|test.1@XXXXX.COM|144XXX|MANTENIMIENTO||||1.0|3000000.0|SERVICE||UN|1929XXXX||2021-10-22T23:45:00+00:00||3000000.0|762XXXXX|7XXXX


    Now, they want to retrieve the same attribute from the WPMATERIAL object, in order to do that opened the object structure and excluded the field from the WORKORDER object and included the field from the WPMATERIAL object, but if we do that, the resulting flat file has the same fields but in different order and SAP cannot work with the output file and the integration results in error: now the ATTRIBUTE_X is located in the 21st position:
    SAP|SAPWODETAIL_SERVICIOIface|Replace|ES
    WO_DESCRIPTION|SITEID|SLXCTACONT|SLXMONEDA|STATUS|STATUSDATE|PRIMARYEMAIL|WONUM|DESCRIPTION|DESCRIPTION_LONGDESCRIPTION|ISSUETO|ITEMNUM|ITEMQTY|LINECOST|LINETYPE|LOCATION|ORDERUNIT|REQUESTBY|REQUESTNUM|REQUIREDATE|SLXCENTCOSTO|STORELOCSITE|UNITCOST|VENDOR|WPITEMID
    MANTENCION PREVENTIVA PC-45XXX 4 MESES|6011SXXXX|42030XXXX||APPR|2021-11-25T14:46:34+00:00|test.1@XXXXX.com|1000003|prueba de servicio||||1.0|0.0|SERVICE|||1929XXXX||2020-10-22T00:00:00+00:00|S1080246||0.0||7XXXX



    Is there a way to establish an order of the fields when creating the flat file? We need to keep the fields order after the change. 

    Do you have an idea how this can be accomplished? The expected results is to change from which object the data is used without affecting the order data in the resulting flat file.

    thanks in advance.
    Mauricio.


    ------------------------------
    Mauricio Poblete
    ------------------------------


  • 2.  RE: Change the field order in an integration flat file

    Posted Mon January 10, 2022 08:56 AM
    Mauricio,

    This scenario is a little hard to follow, but from what I gather you are saying that you only want to process one attribute that appears on both objects.  Not knowing what the specific attribute is, adds a bit to the mystery here but, it is important to note that Maximo has a Non-normalized database.  Such that an attribute may appear in may places yet it represents the actual same datum.  For instance WONUM, ITEMNUM, LOCATION, ASSETNUM are all in effect either keys or foreign keys.

    As such eliminating them from your object structure breaks the linking when processing the data.  I know this.  when Maximo consumes a flat file it converts it into an XML file before the processing class ingests it through the MBO.  I dunno about SAP.

    Question: why did you first start removing the data element(s) to begin with?

    ------------------------------
    Bradley K. Downing , MBA
    Solutions Engineer
    IBM
    Bakersfield CA
    ------------------------------



  • 3.  RE: Change the field order in an integration flat file

    Posted Mon January 10, 2022 04:27 PM
    Hi Mauricio,

    Despite I don't fully see how that works with several material lines.
    As far as I know the flat structure is a transformation from xml structure alphabetical order per object.
    My suggestion would be to add ATTRIBUTE_X as non persistent field in WORKORDER and include in the xml in the integration object.
    Then in the Publish Channel with a SET rule you can copy that value in WORKORDER.ATTRIBUTE_X from the related WPMATERIAL.SLXCENTCOSTO using the Sub-Record Fields.

    I hope this helps.

    ------------------------------
    Juan Valderrabano
    Solihull
    ------------------------------