Skip to Content
Jan 16, 2021 at 11:32 AM

Update NF Metal data and recalculate Net Price during Goods Receipt posting in MIGO

107 Views Last edit Jan 16, 2021 at 01:33 PM 2 rev

Dear All,

I will try to explain the issue and hope that anyone can help and answer to my question:

When I create PO in ME22N there is the tab in items "NF Raw Material Charging" where actual Rate was found during creation. This rate can changing every day and in ME22N there is a button "New Rate Determ." that picks up latest Rate. But when I do posting in MIGO system takes current Rate from PO and calculate Net Price.

Expectation would be: during posting in MIGO picks up latest Rate(not existing) and recalculate Net price with new rate and save PO. Then for this PO make posting. Correct data should be updated in tabs: "Conditions", "PO history" and "NF Raw Material Charging".

Place where I can change PO before MIGO posting I found - IF_EX_MB_MIGO_BADI~POST_DOCUMENT. Here I can call BAPI 'BAPI_PO_GETDETAIL' to receive current NF data in table nfmetallitms that return BAPI.

But I already checked if I change table nfmetallitms and call BAPI 'BAPI_PO_CHANGE' with new data - I receive message 'No Data Changed' in return table. BAPI doesn't save new Rates that I provided in table nfmetallitms and doesn't recalculate Net Price.

I also tried to to change Net Price with 'BAPI_PO_CHANGE' and received some errors that Net Price couldn't be saved.

I tried brute force solution(just for test) and changed data in table /nfm/torderpos(NF data for order stored) manually with MODIFY - Rate changed in "NF Raw Material Charging" tab, but net price still calculation with old Rate and in tabs: "Conditions", "PO history" all data with old Rate.

Also tried BDC approach - without success.

In my opinion the best one would be with 'BAPI_PO_CHANGE' but I can't force BAPI to change nfmetallitms and POITEM-NET_PRICE.

I will be very happy and thankful if anyone can provide me proper solution to solve my issue.

Thanks to All and have a good day.