cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

BA is not updating the Purchases Cost Center information

We want to update Purchases' Cost Center information via Business Adapter Studio. When we execute the BA the Cost Center is immediately get cleared "automatically". This change can be identified by navigating to "Purchase Properties > History" tab. 

Any help is appreciated, attaching BA xml and sample data for your review, not sure what I am missing in the BA configuration and property mapping!

Note we have to update more then 800 purchases.

FNMS webuiFNMS webui

BASBASDatabase.JPG

__PRESENT

(1) Solution

@FarrukhNaz 

Right, if a PO has multiple line items then you will need to supply the sequence number for each to make this work, please also refer to Purchase Order CSV and other places in documentation where this is mentioned.

Capture.PNG

Thanks,

View solution in original post

(7) Replies

Hi,

I see that the you have the setting "Create new object in the database" enabled on each object. Do you really want to have this setting? This is the only thing that I can see here that could cause some strange behaviours.
Have you tried to update the cost center via a custom SQL query?

 

Hi @maxhenselcrayon, I have tried many BA configurations but non of them work and I didn't use custom SQL query to directly update the tables. Thanks

@FarrukhNaz 

Your sample above worked for me, but please be aware that it updates the [PurchaseOrderDetail_MT].[CostCenterID] attribute, not the [PurchaseOrder_MT].[CostCenterID]

Don't you see your update correctly represented in the UI?

Thanks,

Thanks @JohnSorensenDK Yes, I just checked those tables as well but CostCenterID is 'NULL' also for another PO the BA updates only the first line (row) of the PO not the all rows!

sc2.JPG

sc1.JPG

 

@FarrukhNaz 

Right, if a PO has multiple line items then you will need to supply the sequence number for each to make this work, please also refer to Purchase Order CSV and other places in documentation where this is mentioned.

Capture.PNG

Thanks,

@JohnSorensenDK 

Thanks, after mapping the Purchase Order Line Sequence I successfully imported the Cost Center information for all PO lines.

But when I try to import Cost Center information for multiple POs and load the data via .CSV file and then view it under the "Data" tab of BAS I noticed that the value with leading "0" in the "Purchase Order No" get cleared and for some rows PO number completely vanished.

I am not sure about this weird BAS behavior, appreciate your help. 

sc3.JPG

@FarrukhNaz 

For CSV files you will have to create a schema.ini file to enforce the "Purchase Order No" column to be interpreted as text. Please refer to Business adapter imports large numbers as scientific notation and other community threads discussing this.

Thanks,