cancel
Showing results for 
Search instead for 
Did you mean: 

Condition formula for condition type

former_member1021627
Participant
0 Kudos

Hi

I need help to create a Condition formula for alternative calculation type in my sales order, I want to link to my condition price a formula:

The aim of the formula is to give a price accordind the global quantity  of the sales order, for instance :

I have several times the sames material :

Line 10      MATERIAL X               QTY 50000

Line 20      MATERIAL X               QTY 10000

The price must be calculated according the quantity global  and the scale of the condition time :

Material X  0 to 60 0000 the price is 1000£

So the price of my sales order must be 1000£

Any body could help me to do this formula?

Thanks a lot

Regards

Kari

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Just adding screenshot on what santosh has said above,

go to V/06 and choose your condition type, also you need to tick Group Cond field.

Answers (3)

Answers (3)

0 Kudos

go to V/06 and choose your condition type, Group Cond field and select GrpCond routine as '1' for overall document.

hope this works out for you.

Former Member
0 Kudos

Hi,

One doubt about global quantity, what does it mean?

Well let me give you a hint which may help you in solving this. Write a routine which would sum up all the quantities in an order with the same material number before deciding the price or scale. This logic would help to solve your problem.

Regards,

Jaydeep

former_member1021627
Participant
0 Kudos

Hi Jaydeep,

Thanks for your help, you have understaood my requirement.

Could you help me to write this routine?

Thanks in advance

Regards

Kari

Former Member
0 Kudos

Hi Elmka,

I am glad it helped you. Though I am not an ABAPer but trying to explain you the solution,

You need to activate "groupd condition"  for your condition type in V/06, Also maintain the "Grp cond routine". Now here you need to do some coding, take an example of routine number 3 which is for material pricing group. It mean if you have multiple materials with same pricing group, then in your order they will get accumulated and based on that your price will be calculated.

Check in VOFM Tcode, click on formulas --> structure of group key, you will see couple of routine. If you see routine 3, they have maintained  "xvakey+3(2) = komp-kondm" code, here 'kondm' is a material pricing group in structure komp, so what I believe if you change it to 'MATNR' which stands for material number, it means with the same material number in an order, it will accumulate the value and price accordingly.

Please dont change the stanadard routine, you can create a new one. Also find a screen for your reference.

Former Member
0 Kudos

sorry forgot to attach the image....

former_member1021627
Participant
0 Kudos

Hi Jay,

Thanks for your answer,

I have otther question about your solution.

My requirement is for the header of the sales order, so if I create a formula, I need to use KOMK instead of KOMP. Is it right?

Then, I need to assign this formula for all my pricing procedure.

What do you think?

Thanks for your help

Regards

Kari

Former Member
0 Kudos

Hi Elmka,

I guess you need to just replace MATNR in place of KONDM in my previous reply. So system will check each and every line item with MATNR which is a material number, and if it find the same number it will accumulate before calculating final price or scale. So please follow my previous reply, write a routine, assign it to condition type, since you are assigning to your condition type i dont think you need to assign in to pricing procedure, you can give a try.

Let me know if it works for you.

Thanks,

Jay

former_member186385
Active Contributor
0 Kudos

Hi,

for your condition type, check the group condition in the V/06 condition types configuration and try

maintain the scales accordingly

with group condition, your  quantity will be cummulated for your condition type

check and revert

regards,

santosh