Hello every one...
I am calling BAPI_SALESORDER_SIMULATE to get the pricing simulation of a sales order, My requirement is that I want to enter Material Pricing group (KONDM) so that pricing be simulated according to the material pricing group I enter..... but the simulation bapi does not provide this field,,, I cannot use sales order create from data2 bapi,, as it does not provide condition table as output, which is also my core requirement,,, my question is that is there some bapi/fm where I can provide material pricing group along with other info and retrieve complete simulation of sales order pricing with condition details aswell....
I'm having the same use-case right now. I know it's a long time ago - but do you still have the code of how you ended up implementing it? Would be a huge help!
Update: Since the post is so old there will probably be no reply. I want to share my solution for the future.
Instead of ABAP-Memory I used a Singleton-Class to store the data I needed. I've created the instance and setted the data before the BAPI_SALESORDER_SIMULATE-call.
Then I've enhanced Include MV45AFZZ, form userexit_move_field_to_vbkd.
This form gets called one for the head and for every position.
DATA: ls_transaction_header TYPE /snap/ps_tr_hdr,
lt_transaction_pos TYPE /snap/ps_t_trans_item.
"when position - not head
IF vbap-posnr IS NOT INITIAL.
"set fields in VBKD
vbkd-posnr = vbap-posnr.
vbkd-konda = <ls_transaction_pos>-discount_type.