cancel
Showing results for 
Search instead for 
Did you mean: 

Rounding off issue for yen

Former Member
0 Kudos

Dear SAP Gurus

We have a unique scenario in our current project.

We are configuring pricing for japan.

Here Yen is a currency without any decimal places.

Assume Gross price is 1010 yen, The discount based on Gross price is 5.5 %.

The quantity of material orderred is 4 units.

The way standard SAP calculates this is

Total price - 1010 *4 = 4040

5.5% of 4040 is 222.2

Round off to zero decimals is 222

The way we want is

5.5 % of Gross price 1010 is 55.55

Round off to zero decimal is 56

Total gross price- 56*4= 224

I am aware that this can be achieved, by creating a new alternate condition base value.

How ever, is there any way of achieveing the same functionality, via Configuration.?

Comments would be rewarded with points!!

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Dear Abhishek,

Discuss with Abaper and modify the routine as per your requirement:

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

Former Member
0 Kudos

@ Rajesh

There is no requirement routine called 16 or 17

There is alternate conditon type

16 Rounding the total

17 Rounding as perT001R

Both these perform rounding of the total value, not the unit value, as explained by me in my example

@ Laxmipathy

The solution provided by you also rounds off the total value and not the unit vale, as explained in my example

Lakshmipathi
Active Contributor
0 Kudos

Dear Abhishek

Try with this.

For the discount condition type, you need to give Routine 16 in the Alt. Cal. Type and also add Routine 17 in your Pricing Procedure.

Additionally, in table T001R such rounding data should be maintained. For this goto T.Code oy04, select the currency JPY and maintain the required decimals there.

thanks

G. Lakshmipathi

Former Member
0 Kudos

Use Routine 16 or 17 as 'Requirement' in pricing procedure.

Regards,

Rajesh Banka