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
------------------------------
#AssetandFacilitiesManagement#Maximo#MaximoIntegrationandScripting