cancel
Showing results for 
Search instead for 
Did you mean: 

Rounding Rule Requirement SD Pricing

0 Kudos

Hello Gurus,

Requirement is as follows:

If Value of condition type is 50.49 then the value should be rounded down to 50

If value of condition type is 50.50 or above then the value should be rounded up to 51.

How do we achieve this?

Thanks in advance for your help!

Warm Regards

Prashant.

Accepted Solutions (0)

Answers (3)

Answers (3)

Manoj_Mahajan78
Active Contributor
0 Kudos

Hello Prashant,

You can satisfy this reqt by settings of coomercial rounding in V/06 tcode.

Control Data -Rounding Rule-Leave this blank and save.

Regds

MM

Former Member
0 Kudos

Hello,

Commercial rounding in cond type should be maintained, i.e. leave the rounding rule field blank.

rgs,

ak

Former Member
0 Kudos

Hi Prashant,

To achieve this rounding pls take haelp of ABAPer and write a new routine(VOFM) and assign this routine in your Pricing Procedure for that Condition Type.For a ready reference you can study the following routine:

ORM FRM_KONDI_WERT_900.

  • DATA: INTVAR TYPE I.

DATA : i_value TYPE i. " Data decleration

DATA: i_modval TYPE i. " MOD value

  • INTVAR = XKOMV-KAWRT .

  • INTVAR = INTVAR / 100.

  • xkwert = xkomv-kawrt * ( 1000 / t001r-reinh ) / 1000 * t001r-reinh.

  • INTVAR = INTVAR + 100.

  • INTVAR = INTVAR / 100.

  • INTVAR = INTVAR * 100.

  • INTVAR = INTVAR - XKOMV-KAWRT.

i_value = xkomv-kawrt .

i_modval = i_value MOD 100.

IF i_modval < 50.

xkwert = i_modval * -1.

ELSE.

xkwert = 100 - i_modval.

ENDIF.

  • IF INTVAR > 50.

  • XKWERT = XKWERT - 100.

  • ENDIF.

  • XKWERT = INTVAR.

  • IF XKWERT = 1.

  • XKWERT = 0.

  • ENDIF.

*} INSERT

ENDFORM.

Regards

Vadiraj

Edited by: vadiraj varahamurti on Oct 26, 2009 11:32 AM

jignesh_mehta3
Active Contributor
0 Kudos

Dear Prashant,

To go V/06, select required Condition Type.

Under Control Data 1 tab, there is a box for Rounding Rule. here your have to leave it blank for commercial Rounding (which is as per your requirement.).

Hope this helps.. .

THanks,

Jignesh Mehta