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: 

Add a default Price condition to sales doc header

Former Member
0 Kudos

I've been out of ABAP for a few years, and I may get chastized for asking for actual code here, if so moderators please lock it and I will have learned a lesson....

On Sales Order create (VA01) I would like to automatically populate a number of Header Price Condition records (with a zero value). Users have to manually add these on every document and auto-populating them will make thier life easier.

Let's say there are 3 price conditions, ZH01, ZH02, ZH03.

From my investigation I think it can be done through USER_EXIT_PRICING_PREPARE_TKOMK, but what would the actual code be ?

As of right now I can't figure out exactly which tables/structures to go at and how to actaully code this

Thanks in advance !

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Ok, now once you have the Pricing Conditions in the pricing procedure then the taks is easy.

In your identifed user exit. The KOMV table holds the list of pricing conditions. In the exit you can add a price value to the specific fields in the KOMV table ( I dont have my machine now or I could have mentioned them ).

Then when the price values are added , the usual UPDATE . that should do it.

One thing is the users dont have to enter any value on the screen during sales order creation. During saving, these default values will be saved to the priving conditions and when you go to VA02 , you will see the values...

Does this help...

Thanks,

Ketan Joglekar.

5 REPLIES 5

Former Member
0 Kudos

Hi,

I think you have to go to the pricing procedure and add the pricing conditions needed to the actual identified pricing procedure. Set the value for each of these conditions as zero.

This way the users will always find the pricing conditions in the pricing screen on VA01.

Hope this helps.

Thanks,

Ketan Joglekar

0 Kudos

Yeah I already have that.

The Price procedure works fine. The user can manually enter the conditions into the header and all config is correct. I am looking for a way to "default" or "pre-populate" the condition records into the header, so all they have to do is go in and enter the value(s).

My example is only with 3, but in reality there are 10+ so the manual entry quickly becomes a pain in the "carpel tunnel" for them.

Former Member
0 Kudos

Ok, now once you have the Pricing Conditions in the pricing procedure then the taks is easy.

In your identifed user exit. The KOMV table holds the list of pricing conditions. In the exit you can add a price value to the specific fields in the KOMV table ( I dont have my machine now or I could have mentioned them ).

Then when the price values are added , the usual UPDATE . that should do it.

One thing is the users dont have to enter any value on the screen during sales order creation. During saving, these default values will be saved to the priving conditions and when you go to VA02 , you will see the values...

Does this help...

Thanks,

Ketan Joglekar.

Former Member
0 Kudos

Hey Ketan, that makes sense.

I add the value to KOMV, then I force a [Pricing Update] so the system does it's things to populate thes conditions, correct?

After this willthe user "see" these conditions in the Sales doc, or will they not see them until they come back into VA02/3 ?

Thanks again for your help so far

Bill

Former Member
0 Kudos

Thats correct the system should take over and sum up the net price with the amount you have added to the pricing condition. So the net value ( Price+ Taxes etc + discounts + freights ) would hold the new value.

Unfourtunately this value will be seen in VA2/3 only ( Thats what I have found while working on this )

Thanks,

Ketan Joglekar