Skip to Content
0
Former Member
Oct 05, 2013 at 06:27 AM

Add new fields in Condition catalogue and price should determine automatically

380 Views

Hi Experts,

I have a requirement were customer that influence the price for VA01(Sales order document) are Negotiation partner/ /End Customer/Processor/Ship-To/sold to parties.Out of this Ship-To and Sold-To are already in Field Catalogue.

For this I have added 3 new fields in KOMK for header-

  • ZZKNZV for the Negotiation partner
  • ZZKNYN for the End Customer
  • ZZKNZW for the Processor

And 3 new fields in KOMP for Item-

  • ZZKNZV_I for the Negotiation partner
  • ZZKNYN_I for the End Customer
  • ZZKNZW_I for the Processor

In User-exit MV45AFZZ form USEREXIT_PRICING_PREPARE_TKOMK(Header) I have added the code to pass the KUNNR value to new field.


PERFORM XVBPA_LESEN(SAPFV45K) USING 'ZV' '000000' SY_TABIX.
MOVE XVBPA-KUNNR TO TKOMK-ZZKNZV.


PERFORM XVBPA_LESEN(SAPFV45K) USING 'YN' '000000' SY_TABIX.
MOVE XVBPA-KUNNR TO TKOMK-ZZKNYN.


PERFORM XVBPA_LESEN (SAPFV45K) USING 'ZW' '000000' SY_TABIX.
MOVE XVBPA-KUNNR TO TKOMK-ZZKNZW.

Same way I have added code in
USEREXIT_PRICING_PREPARE_TKOMP(Item) to pass the KUNNR value to new fields at item level(ZZKNZV_I,ZZKNYN_I,ZZKNZW_I ).

Functional also created respective condition table and access sequence.

After this Price should get determined automatically for sales order document.

But when I click on manual button then price are getting determined .

Kindly suggest were am I wrong.