cancel
Showing results for 
Search instead for 
Did you mean: 

Need to overwrite pr00 value at line item level only in VA02 - Bypass vk12 value

Former Member
0 Kudos

Dear Friends,

   We are building a small prototype with pricing withe below requirement:

Step 1:  ( AS-IS)

  Create credit memo request document (ZRTC) in VA01 with 2 line items.AT this juncture at the line item 10 and line item 20 the return pricing procedure (ZRTNPR) will determine the value for PR00 from VK12.

ITEM      Material     Qty          Price ( Pr00 )

   

  10          A100         1                100 usd

  

  20          B100          1                200 usd

Step 2: ( TO- BE )

The moment When we go to Va02 mode manually or  change the quantity (Qty)  then price should redetermine  automatically with our own values ( Need to bypass the existing vk12 value ).let us say the ABAP team wants to hard code price as 100 usd ( just for POC ).

Eg : Hard code value is 100 USD

Case 1:

The moment you enter va02 mode  we need to see the new price as below ( Need to redetermine price automatically )

ITEM      Material     Qty          Price ( Pr00 ) ( new price )

   

  10          A100           1              100 USD

  

  20          B100          1                100  USD

Case 2:

When you change the qty then also price should be redetermined automatically with new price as below:

ITEM      Material     Qty          Price ( Pr00 ) ( new price )

   

  10          A100          6                600 USD

  

  20          B100          7                 700 USD

Please share your valuable inputs.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member290220
Participant
0 Kudos

Hi Karthick,

As of my understanding, you already maintinained two condition records for A100 for 100 USD and B100 for 200 USD. now you are created sale order SO1 wit above pricing.

Now you want to change the price for B100 for 100 USD, go to VK12 change the price, and in va02 in pricing tab item level there is a "update" button, click on that button and select "C" then you will get new price in your pricing.

Regards,

Siva Krishna

VeselinaPeykova
Active Contributor
0 Kudos

It seems you know what you want to achieve - great, this means you can start working on it.

To me the business case doesn't make much sense, but hey, it is not me who needs to understand it.

Former Member
0 Kudos

Hi,

Can we achieve the above requirement through  writing a routine in "alternate cal type" in pricing procedure against  " PR00"  condition type?

Please share your views.

moazzam_ali
Active Contributor
0 Kudos

Hi

There are two options for this. You can use pricing routine or you may also use pricing prepare userexit in MV45AFZZ program. My suggestion is to go for pricing routine and please don't hard code anything in program. Just maintain a new condition type and ask ABAPER to over write the price from this new condition type using your logic.

Thank$

Former Member
0 Kudos

Hi Moazzam,

    We have currently placed the logic in User exit - Implicit Enhancemenr  and it is redetermining the price automatically  when we change the quantity in VA02 and it is over writing the new price 100 usd in PR00 condition type.

We are currently overwriting only in PR00 condition type.  Is there any impact in overwriting in PR00?  Why do we need new condition type in the Pricing procedure if we are able to over write in PR00 ?

  1. What is the impact if we write this logic in User exit instead of Alt-Calculation type routine.
  2. When we tried writing this logic in Alt-Calculation type it is not over writing the price in PR00 condition type?
moazzam_ali
Active Contributor
0 Kudos

Hi

I asked for creating a condition type not for adding that condition type in pricing procedure. Where would you maintain the over writing price? You will card code it or maintain it in some Z table. I asked to create condition type just to avoid this hard code or Z table.

For pricing routine or user exit if this is working in user exit then go for it. The reason why I asked for creating routine is that we can assign routine only to some specific pricing procedure where this logic is required. User exit will call that logic on all pricing procedures and order types until you hard code the order type or pricing procedure with if condition.

I hope I've explained my point of view.

Thank$

Former Member
0 Kudos

Thank you Moazzam. We have written the logic in the user exit and tested in the sandbox. It is working fine. It is automatically overwrites the PR00 ( KOMV-KBETR) price in  each line item of the Credit memo request. and successfully created the credit memo.

In the user exit we have kept the logic to trigger only if this particular document type (ZRTC) is created.

We didn't keep in Alt.calculation type.