Most of the times while doing the customization for creating\updating the transactions, in which we are asked to update the Gross price of the product on click of save\create button, we came across a problem where we are able to updates the gross price but fails to update the others fields which are directly calculated on Gross Price.
On referring the below screen shot you will find that some fields like Net Price, Margin, Ex Tax total, tax etc. depends on the Gross Price of the products.
We researched out and found that there is an action “AM_GROPRI” which is being called on change of each line that updates the Fields according to the entered gross Price and on calling the same from save\create button was giving the errors.
While looking for a work around for this we found the solution for this. All we have to do is that we need to call the below mentioned actions:
Call CLCNETPRI([M]QTY(NOL), [M:SOH0]CUR, NOL) From TRTVENPRI
Call CLCPFM([M]DSTOFCY(NOL), [M:SOH1]PRITYP, [M]CHGTYP, [M:SOH0]ORDDAT, [M:SOH0]CUR, NOL, 1) From TRTVENPRI
Calling the above actions will automatically update the respective fields.
Hope this solves the problem.