Hi Vassilis,
You should be able to update Gross Profit in document lines by using the GrossBase and/or
GrossBuyPrice properties.
As far as I know, the Gross Profit on the document header level should update automatically when you update the document lines.
But you will have to test to see how it works.
The Last Evaluation Price is a system price list just like Last Purchase Price. You cannot access these price lists with the DI API. The Last Evaluated Price price list is only updated by running the Inventory Valuation report in the B1 client. Since the introduction of the Inventory Audit Report (in version 2004, I think?), you shouldn't need this report anymore, and also the Last Evaluated Price price list no longer represents (moving average) item cost prices.
In other words, if you are not already on version 2004 or newer, it would be best to not use this price list for Gross Profit calculations.
Regards,
Johan