Pricing Redetermination when custom field changes ON Additioanl data B Tab
Hi All Experts,
I have added new custom field(ZZ_STCEG, ZZ_ASTCEG and ZZ_MSTCEG) on Addititonal data Tab B. Before that i added those fields in KOMP(ZZ_STCEG) and VBAP(ZZ_STCEG, ZZ_ASTCEG and ZZ_MSTCEG).
I have a function module which gives output EX_STCEG.
Now i need to assign the ZZ_STCEG to ZZ_ASTCEG as it is determined by system. If i enter value in Manual field(ZZ_MSTCEG) this should be used for pricing and also assign it to ZZ_STCEG. (Note: But ZZ_ASTCEG should not be changed as it is automatically determined beforre.)
I have programmed in UserExit_Pricing_Prepare_TKOMP as below.
Call to function module(output ex_stceg)
vbap-zz_astceg = ex_Stceg.
if vbap-zz_mstceg is not initial.
vbap-zz_stceg = vbap-zz_mstceg.
tkomp-zz_stceg = vbap-zz_mstceg.
vbap-zz_stceg = vbap-ex_stceg.
tkomp-zz_stceg = vbap-ex_stceg.
But it is not working as intended. I think because Vbap_zz_Mstceg doesnot have value during pricing because we fill it after the pricing in additional data tab B.
Please suggest me how to proceed with this situation.
Thanks & regards,