Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Pricing Redetermination when custom field changes ON Additioanl data B Tab

Former Member
0 Kudos

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.

else.

vbap-zz_stceg = vbap-ex_stceg.

tkomp-zz_stceg = vbap-ex_stceg.

endif.

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,

NarsiReddy.

6 REPLIES 6

former_member1716
Active Contributor
0 Kudos

Hi,

Try to code in the exit given below,

   FORM USEREXIT_NEW_PRICING_VBKD CHANGING NEW_PRICING.

  of Include MV45AFZB.

Please let me know if any issues.

Thanks and regards,

Satish


Former Member
0 Kudos

In your screen 8309, you can do like below, when you hit enter in the field the princing will be recalculated:

FIELD VBAP-ZZ_STCEG MODULE zm_blablala ON REQUEST.


MODULE zm_blablabla.


* This standard perform will do the pricing redetermination

     PERFORM preisfindung_gesamt USING 'C'.

ENDMODULE.


Regards,

Felipe Simionatto

0 Kudos

Hi,

But i am not using scrren 8309 but using a z program and created exta tab.

like this: 

regards,

NarsiReddy.

0 Kudos

Hi Narsi,

Did you try coding in the exit i suggested.

regards,

Satish

0 Kudos

Hi Narsi,

I would also recommend you to see SAP Note 24832 for better understanding on pricing procedure.

ALso check on the below user exits,

1) USEREXIT_NEW_PRICING_VBAP

2) USEREXIT_NEW_PRICING_VBKD

in include MV45AFZB.

regards,

Satish

0 Kudos

No problem, you can use the same code in your custom screen, but I recommend you to read the references that Satish already posted. As far as I remember I used the approach that I suggested you because any other could fit my requirement in that occasion.

Regards,

Felipe