Hi ,
We want to develop a Gross Profit percentage report. We
need to run 2 SD pricing routines. One of the fields in
this routine used for the calculation is WAVWR (Cost in
document currency).
This value is currently not stored in our system
(VBAP-WAVWR) when the SD pricing was initially done.I
would like to know if I use BAPI - BAPI_SALESORDER_SIMULATE, and
when the pricing is recalculated, does WAVWR get
populated?And if so how can I access it?Because the BAPI
does not seem to return this value in order for me to use
it in the 2 pricing routines that I need to use for my
calculations.
Alternatively, instead of using this BAPI, does anyone else
know how can I get the value WAVWR?
Will really appreciate any help.
Valencia
Hi Valencia;
I will recommend a solution using BAPI_SALESORDER_SIMULATE. This function has a MESSAGETABLE with a BAPIRET2 structure. You can fill it in MV45AFZB user exit. You should put "INCLUDE vbfsdata." into your source code first. Then, you can put the following lines into "USEREXIT_CHECK_VBAP" routine.
PERFORM message_vbfs_aufbauen(sapfv451) USING space
space space 'WAVWR' vbap-posnr vbap-wavwr vbap-waerk.
Hope this will shed a light on your problem.
Best regards;
Add a comment