06-27-2010 11:00 AM
hei all,
i have 2 cond type.
ZCSA and ZCSB. this condition type are item level, has condition record.
and i also have 1 cond type ZZCS (item)
i want ZZCS cond type value is calculation between cond type ZCSA & ZCSB.
do you know the code for this case?
eg:
cond value ZCSA = 100$ , ZCSB = 5$
so cond value ZZCS will be 100 x 5 = 500$
i think we have make routine for pricing value.
does anyone experience in this?
best regard,
Hendry
06-27-2010 2:35 PM
Hi Hendry,
If you are looking for info on how to create pricing routines, please find hte step by step procedure in the link below.
http://sapdocs.info/sap/sd-related-topics/routines-in-sd/
Regs,
SuryaD.
06-27-2010 2:35 PM
Hi Hendry,
If you are looking for info on how to create pricing routines, please find hte step by step procedure in the link below.
http://sapdocs.info/sap/sd-related-topics/routines-in-sd/
Regs,
SuryaD.
06-28-2010 1:52 AM
hei suryaD,
actually i'm not looking for the step. but i prefer someone give me the code for my requirement above about pricing.
thanks
Best regard,
Hendry
06-28-2010 4:43 AM
Hi Hendry,
For Sales You need to go to transaction 'V/08', else for purchase You need to go to transaction 'M/08'. Choose the appropriate pricing procedure, and double-click on control, there you can find Your condition type ZZCS. You need to assign/choose a freely available Calculation type number (for e.g. 901/902/903, etc), and write the code in the editor for that calculation type. Based on your example the code should be:
DATA: xkomv_ZCSA TYPE komv_index,
xkomv_ZCSB TYPE komv_index,
xkomv_old TYPE komv_index.
CLEAR: xkomv_ZCSA, xkomv_ZCSB, xkomv_old.
xkomv_old = xkomv.
READ TABLE xkomv WITH KEY kschl = 'ZCSA'.
IF sy-subrc EQ 0.
xkomv_ZCSA = xkomv.
ENDIF.
READ TABLE xkomv WITH KEY kschl = 'ZCSB'.
IF sy-subrc EQ 0.
xkomv_ZCSB = xkomv.
ENDIF.
xkwert = xkomv_ZCSA-kwert * xkomv_ZCSB-kwert.
xkomv = xkomv_old.
PS. After activation of the code is done, do not forget to execute program 'RV80HGEN'. This is used to activate all routines.
Regards,
Birendra
06-28-2010 5:29 AM
hei Birendra Chatterjee,
thank you so much. it is works...
best regard,
Hendry tjan
06-28-2010 3:05 PM
hei Birendra Chatterjee,
i have the other problem. i changed the formula from calculation(*) to division (/), but it goes wrong with the value.
formula: ZCSA / ZCSB
let say : ZCSA = 10, ZCSB = 100
so value must be 10/100 = 0.1 --> but the system propose value = 1. i have tried to look at rounding profile, but it still not works.
all value that < than 1, the system propose as 1.
why is that?
kindly ur valuable input
Best Regard,
Hendry
06-29-2010 2:28 AM
Hei,
i have found, if decimal number is involved --> the value will be wrong..
how can you explain that?
Best regard,
Hendry
06-28-2010 3:02 PM
07-13-2010 9:16 AM