on 2016 Sep 07 5:11 PM
Hello All
we have an requirement to determine 3 new condition types CONB,CONC and COND when partner function is V1- commission agent1.
for this we created new requirement routine-852 and given the logic to determine these new three condition types its working fine.
now the actual requirement is to give the special discount to the commission agents(V1).
we have already a condition type e.g. CONA (modifiable)
1.the value of CONA will be determined from condition records (25 $)
2.for CONB we use ref cond type as CONA so the value of the CONB will be same as maintained for CONA (25 $) from condition records (not modifiable)3. the value of CONC will be based on the logic given in the calculation type 801
calculation is (CONB-CONA)*100/CONA
to understand this see the below example
condition type val val. after change Eg1 val. after change Eg2
CONA 25 30 (I changed in the order ) 40
CONB 25 25(since its not modifiable) 25
CONC 0 20(since calc type 801) 60
COND 0 2.4 (but its 2 which is wrong) 3.2 (but I am getting 6 which is wrong)
* As per my under standing the value getting is CONC/10 which is wrong
4.COND should be determined from condition records
as per the requirement the condtion records are (base scale)
from amount
0 5%
0.1 6%
8 8%
here From is the value of CONC and amount should be % of CONA i.e. in our example it should be 8% of 30=2.4
** I have created and assigned new scale base routine 909 for COND I have given the Scale type as G= Scales based on formula for COND
I have also activated the routine through the program RV80HGEN
* As per my understanding the value of COND calculating as CONC/10 which is wrong
please suggest me to give the correct LOGIC in the routine 909.
Thanks in advance for your Help
MS
Request clarification before answering.
I am a bit confused - if CONC_KWERT = (CONB_KWERT - CONA_KWERT)*100 / CONA_KWERT, then (25-30)*100/30 = -500/30 = 16.67, but you show 20 as correct.
Get the KNUMV for your sales order from VBAK, use KNUMV in KONV and get the values of KWERT, KAWRT and KBETR for your condition records.
Then start checking your calculations (or if you are extremely lazy - debug the routine). A typical mistake is to forget that in the database the values are stored differently to how they are displayed in the pricing condition screen.
Never forget that percentage is stored as decimal*10 (3% is actually 30 in KONV), currencies are always stored with 2 decimals even when they have 0 (1235 IDR is stored as 12.35, but 1235.00 EUR is stored as 1235.00), KAWRT can be in KONV the same as in VA03, but it can be divided by 10 - it depends on your condition type setup.
You can get rounding errors - I try to minimize them as much as possible by multiplication/division - each case is individual, but usually, I use division at the last possible step.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
39 | |
6 | |
5 | |
3 | |
3 | |
3 | |
2 | |
2 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.