Hi again guys!
I am facing the problem about the net price (and other values like tax code, target quantity, order unit, material group...) being changed (updated) automatically when you execute ME31K transaction to create a contract and then put certain materials in the line items (that's great), but the fields are not changed from BAPI.
For those certain materials, a warning appears in ME31K when you assign values in the item overview and then try to go to details or press enter, with message "Material 999999 mainly procured internally (please check your input)", then I pressed Enter and a popup message appeared: "Order Unit KG --the unit I put in order unit and order price unit fields-- cannot be used" and after accepting that popup a new popup arrived with message "Net price for item 000010 taken from conditions". Then I could see that the fields short text, target quantity, order unit, net price, order price unit and even the tax code were changed accordingly (tax code was set even before I put some value in the item details window). All those changes are wanted by my functional consultant to be detected and replicated using BAPI_CONTRACT_CREATE, but actually it does not happen. BAPI takes the values I put in the item data table (BAPIMEOUTITEM, BAPIMEOUTITEMX) as they are. Using manually the same data with ME31K leads to completely different values due the aforementioned messages and automatic changes. Do you know how to have BAPI_CONTRACT_CREATE to do the same automatic changes?
Thank you!