cancel
Showing results for 
Search instead for 
Did you mean: 

Rounding off pricing condition

Former Member
0 Kudos

Dear SDGurus,

I want to roundoff the pricing condition value for the Excise amount and the totals.

The Std roundoff is supporting the 3rd digit of the decimal value.....

Say my total value is RS 5755.70 ...wanna roundoff to 5756.00 and if the total value is RS 5755.40 ,it

should round off to 5755.00.

ie anything less than 50 paise should round off to Zero and more than 50 paise should round off to 1 rupee

Cheers

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Cheers,

You can tackle this by using standard routine in your pricing procedure.

In the 'Caltype' column in pricing that is "Condition formula for alternative calculation type", you need to add routine number "17 Rounding as perT001R", before those excise conditions which you want rounded.

Additionally, in table T001R such rounding data should be maintained.

For this goto SPRO - SAP NetWeaver - General Settings - Currencies - Define rounding rules for currencies

here maintain: Co, Code + Currency = 100

This will solve your problem

Regards

Dhananjay

Former Member
0 Kudos

Dear Dhananjay,

You hit the target....

Thanks

Cheers

Answers (1)

Answers (1)

Former Member
0 Kudos

Check the usefulness of the code below, along with an Abaper:

-


Include RV64A601

  • rounding rule for closest interger value

FORM FRM_KONDI_WERT_601.

  • data: da_xkwerx(15).

  • unpack xkwert to da_xkwerx.

*

  • move '00' to da_xkwerx+13.

*

*

*

  • pack da_xkwerx to xkwert.

data : lgort1 like lips-lgort .

data : d1(13) , d6(13) .

data : d2 type p decimals 2 .

data : d3 type p decimals 0 .

data : d4 type p decimals 2 .

data d5(2) .

data : d8(3) .

unpack xkwert to d1 .

d2 = d1 .

d3 = d2 .

unpack d3 to d6.

d5 = d6+11(2) .

if d5 >= 50 .

d8 = 100 - d5 .

d1 = d6 + d8 .

else .

d1 = d6 - d5 .

endif .

*pack d1 to xkwert .

select single lgort into lgort1 from lips where

vbeln = komp-vgbel and

posnr = komp-vgpos .

IF SY-SUBRC = 0 .

if lgort1 = 'JSTO'.

d1 = 0 .

pack d1 to xkwert.

else .

pack d1 to xkwert.

endif .

ELSE .

pack d1 to xkwert.

ENDIF .

-


Regards,

Rajesh Banka