Maximo List Archive

This is an archive of the Maximo Yahoo Community. The content of this pages may be a sometimes obsolete so please check post dates.
Thanks to the community owner Christopher Wanko for providing the content.



MATRECTRANS inbound integration processing error

From: lucatruff (2012-06-08 15:33)

I had to create an Enterprise Service to add receiving materials in MATRECTRANS cause of a forced process.
The processing fails with error matRecTransNoAdd that the reference:
http://thrue.org/javadocs/Maximo7119/businessobjects/index.html?psdi/app/inventory/MatRecTrans.html
describe as:
if the owner != null and the owner is not "PO", "POLINE", "ITEM", "INVENTORY", or "INVOICE"
What that owner refers to? Is it OWNERSYSID?
OWNERSYSID is null and even if I set it to "PO" or others the processing continue to fail.
Any idea?
Thank you


From: Greg Robinson (2012-06-08 09:04)

I believe the "owner" refers to the owner MBO. You cannot just create a MATRECTRANS record as far as I know. You would need to first grab an inventory (or any other valid parent) MBO then get the MATRECTRANS relationship for that inventory record, then add the MATRECTRANS record that way. 
For instance:
InventorySetRemote inventorySet = (InventorySetRemote) MXServer.getMXServer().getMboSet("INVENTORY", ui);
inventorySet.setWhere("ITEMNUM = '1234' and SITEID = 'BEDFORD'");
inventorySet.reset();
InventoryRemote inventory = (InventoryRemote) inventorySet.getMbo(0);
MatRecTransSetRemote mrtSet = (MboSetRemote) inventory.getMboSet("MATRECTRANS");
mrtMbo = null;
MatRecTransRemote mrtMbo = mutSet.add();
mrtMbo.setValue("QUANTITY", 100000000000);
mrtSet.save();
mutSet.close();
Hope this helps.
________________________________
From: lucatruff <luca@truffarelli.it>
To: MAXIMO@yahoogroups.com
Sent: Friday, June 8, 2012 11:33 AM
Subject: [MAXIMO List] MATRECTRANS inbound integration processing error

 
I had to create an Enterprise Service to add receiving materials in MATRECTRANS cause of a forced process.
The processing fails with error matRecTransNoAdd that the reference:
http://thrue.org/javadocs/Maximo7119/businessobjects/index.html?psdi/app/inventory/MatRecTrans.html
describe as:
if the owner != null and the owner is not "PO", "POLINE", "ITEM", "INVENTORY", or "INVOICE"
What that owner refers to? Is it OWNERSYSID?
OWNERSYSID is null and even if I set it to "PO" or others the processing continue to fail.
Any idea?
Thank you


From: Luca Truffarelli (2012-06-12 16:05)


Thank you Greg, you are right, joining the MATRECTRANS row to POLINE
fixed the problem.
I used an Object Structure instead of writing the code but the problem
was the same and now it works.
On 08/06/2012 18:04, Greg Robinson wrote:
>
> I believe the "owner" refers to the owner MBO. You cannot just create
> a MATRECTRANS record as far as I know. You would need to first grab an
> inventory (or any other valid parent) MBO then get the MATRECTRANS
> relationship for that inventory record, then add the MATRECTRANS
> record that way.
>
> For instance:
>
> InventorySetRemote inventorySet = (InventorySetRemote)
> MXServer.getMXServer().getMboSet("INVENTORY", ui);
> inventorySet.setWhere("ITEMNUM = '1234' and SITEID = 'BEDFORD'");
> inventorySet.reset();
> InventoryRemote inventory = (InventoryRemote) inventorySet.getMbo(0);
> MatRecTransSetRemote mrtSet = (MboSetRemote)
> inventory.getMboSet("MATRECTRANS");
> mrtMbo = null;
> MatRecTransRemote mrtMbo = mutSet.add();
> mrtMbo.setValue("QUANTITY", 100000000000);
>
> mrtSet.save();
> mutSet.close();
>
> Hope this helps.
>