cancel
Showing results for 
Search instead for 
Did you mean: 

Computation for condition type

Former Member
0 Kudos

I created a discount condition type. I have a complex computation for this condition type and I do not know how to implement it.

computation has variable: (PR01 / 1.16) * 0.16

where PR01 is the variable and is the total value of all materials.

1. How can I implement that on price procedure?

2. Or should it be implemented on VK11?

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member182378
Active Contributor
0 Kudos

Anwar,

From my understanding it looks straight-forward!

Have a discount condition type (e.g. copy of K007), with Calculation type = A (percentage).

In VK11, maintain 13.79% (= 0.16/1.16)

For getting the value of PR01, use field From in the pricing procedure for this discount condition type.

Thus in your document (sales order), the value would populate as (value(PR01) /1.16)*0.16

neeraj_lal
Contributor
0 Kudos

Hi TW,

How can we get PR01 using 'From' field in pricing procedure for a line item...........??

Requirement mentioned is :

where PR01 is the variable and is the total value of all materials.... (looks like sales order value)

Regards

former_member182378
Active Contributor
0 Kudos

Neeraj,

More explanation (with an example) from the OP would definitely help.

With the current information -

If you want a percentage (e.g. 13.79%) for PR01 at header level, of the sales order.

This can also be calculated by taking the same percentage (13.79%) for PR01, at line item level. The sum total of the value (of all the line items) shall give you the value at the header level ("of all materials").

Even if the calculation is not done at header level.

But is the sum of all the (relevant) values at item level.

Former Member
0 Kudos

TW

0.16/1.16 = 0.1379

If 0.1379 is the value of my discount condition type (as you suggested), how can I multiple it to PR01 on pricing procedure?

former_member182378
Active Contributor
0 Kudos

Anwar,

The objective is that your discount should be 13.79% of (PR01).

I have already explained, create a condition type with Calculation type = A (percentage);

In VK11, maintain condition record as 13.79%

To multiple 0.1379 with PR01:

In pricing procedure, for that discount condition type, put in field From the line number which PR01 has.

E.g.

10 PR01

50 ZDIS, in field From have 10.

former_member186385
Active Contributor
0 Kudos

Hi,

Do you want discount always as PR01 X0.16 % ?

if so then you can maintain the discount condition type in VK11 as 0.16

and in the configuration of discount condition type set it as -ve and calculation as %

in the pricing procedure, against the discount condition type, Maintain FROM value as step of PR01

hope it answers

let me know in case, if you need more details

regards,

santosh

Former Member
0 Kudos

condition type set to -ve? where is that "-ve" ?

Is that under "control data 1" of v/06?

Former Member
0 Kudos

computation shoule be:

(PR01 / 1.16) * 0.16

jpfriends079
Active Contributor
0 Kudos

In my opinion, I don't think you can achieve this standard configuration. Please take help of an ABAPer in team, to develop a routine for Condition formula for Alternative Calculation Type for pricing procedure.

Thanks, JP

former_member184065
Active Contributor
0 Kudos

Dear,

computation should be:

(PR01 / 1.16) * 0.16

What is 1.16 and 0.16 ? Please let me know .

Note :  Is that Values are always Unique ? for PR01 Condition Type ?

Thanks,

Naren

Former Member
0 Kudos

1.16 and 0.16 are always fixed.

jpfriends079
Active Contributor
0 Kudos

In that case, have your pricing as following:

Step

Header 1SubtotalAlt Cal TypeBase Value
20PR011 - Carry over value to KOMP-KZWI1
30Calculated PR01

Develop a routine, say, 901 for Condition formula ( (PR01 / 1.16) * 0.16) in Alternative Calculation Type with you fixed values and PR01(reference stored in KOMP-KZWI1)

5-KZWI1

Thanks, JP

former_member182378
Active Contributor
0 Kudos

Anwar,

You are correct!

Field "Plus/minus" in V/06.

former_member186385
Active Contributor
0 Kudos

Hi,

If the values is always fixed , then condition record for discount can be maintained as 0.1379 ( can be rounded to 0.138)

Now against the discount condition type assign FROM column with Step of condition type PR01

0.138 is derived as 0.16/1.16

hope it is clear

this will solve your question

regards,

santosh

former_member182378
Active Contributor
0 Kudos

JP,

Could you please explain the reason for proposing the above solution? (e.g. develop a routine etc.)

Could you please comment on mine and vemuri's suggestion?

jpfriends079
Active Contributor
0 Kudos

Thanks for your post. I don't find any issue with yours & Santosh.

Further, my solution may be applicable/feasible, if the source of PR01, 1.16 & 0.16 are different and dynamically maintained/changed.

Thanks, JP

former_member184080
Active Contributor
0 Kudos

Hi TW,

I do agree with  JP's advise.In long term its beneficial to client as we never know when the prices or logic gets changed.

Regards, Sai Krishna.

former_member182378
Active Contributor
0 Kudos

Sai,

The OP has mentioned clearly that the values are fixed.

Ofcourse, more business explanation would be beneficial to find the best solution (in SAP Pricing).

What I would debate is JP's solution is using coding and is "a complex way" of achieving the requirement if the "ratio" (or values are dynamic).

The same thing can be achieved (dynamic) by a condition record (as mentioned by me in my above post) (i.e. 13.79% or any other ratio) & have base value in field "From", in the pricing procedure.

If you compare both "mechanisms" are the same, one can be done with SAP standard the other one requires coding!

former_member184065
Active Contributor
0 Kudos

Dear,

You are not saying what is 1.6 and 0.16 I meant to say positive and negative singes .

TW and Vemuri,

If in case ,1.6 is positive value and 0.16 is negative value then whoever solution is not working.Before suggesting solution ,we need to know some details on this requirement .

Note : All are seeking Magic Solution not a Logic Solution .

If you have any doubts please let me know .

Thanks,

Naren

neeraj_lal
Contributor
0 Kudos

Anwer,

You can also create condtion record with negative sign in case if you want to use same condtion type working for discount and surcharge both...

If you want to use it only for discount than change customise setting in V/06 eith negative sign..

Now can you explain :

where PR01 is the variable and is the total value of all materials.....

Do it means you want to take value of all item (Order Value) and then calculate discount per line item?????

If this is requirement, then it is not possible in standard way. As in sales order we enter material one by one and its standard sap calculate value per item.

Require more information to understand your requirement.....

former_member182378
Active Contributor
0 Kudos

Naren,

If in case ,1.6 is positive value and 0.16 is negative value then whoever solution is not working.

The OP mentions that this is a discount condition type.

In order to calculate the value of this discount condition type, a factor of 0.16/1.6 is being used.

Why would 0.16 be negative?

E.g.

For material TV a 10% discount is given.

Why would 0.10 be negative?