Autofill cost center in purchase generated from MRP, from item (OITM) defaut cost center
Dears,
Despite having correctly set the item cost center it each item master data, the corresponding value is not copied automatically in the purchase order to create (in item by item mode (line 1 of PO number 21000032 bellow), and in list mode (line 2 of PO number 21000032 bellow)).
The result is that the created purchase order do not contain the expected distribution rule (line 1 and 2 of the 21000032 PO bellow).
When filling up the field manually, in item by item order creation, the corresponding purchase order is then created correctly. (line 3 of the PO bellow)
Thanks in advance for the feature.
Best regards
-
Thanks to Thorsten for the script below, to handle this request for now:
On mrp_purchase_master you will have to activate the Cost Center column:
mrp_purchase_master.srcwindowevent postopen
setredraw=false
for ll_loop = 1 to <dw_3.rowcount>
sql=select "U_beas_prccode" from "OITM" where "ItemCode" = <dw_3.item.itemcode:[ll_loop].value,dbstring>
if <wert1> <> then
dw_3.item.beas_mrp_order_prccode:[ll_loop].setvalue=<wert1>
end if
next
setredraw=true
end eventmrp_view_masterrahmen.src
windowevent tabredraw ldetail
if <dw_3.dataobject> = program\mrp_view_bestellen.psr then
sql=select "U_beas_prccode" from "OITM" where "ItemCode" = <dw_2.item.oitm_itemcode.value,dbstring>
if <wert1> <> then
dw_3.item.prccode.setvalue=<wert1>
end if
end if
end event
Please sign in to leave a comment.
Comments
1 comment