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: 

pricing

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

8 REPLIES 8

Former Member
0 Kudos

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.

0 Kudos

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

0 Kudos

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

0 Kudos

hei Birendra Chatterjee,

thank you so much. it is works...

best regard,

Hendry tjan

0 Kudos

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

0 Kudos

Hei,

i have found, if decimal number is involved --> the value will be wrong..

how can you explain that?

Best regard,

Hendry

Former Member
0 Kudos

other case

Former Member
0 Kudos

closed