Application Development and Automation 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: 
Read only

Function Module

Former Member
0 Likes
305

Please suggest me a Funcion Module to convert my Price which is in the format

123.4(it is a CURR type ...with LENGTH 11 and DECIMAL PLACES 2) to 123.400

3 REPLIES 3
Read only

gopi_narendra
Active Contributor
0 Likes
289

Try this

DATA : p_dec TYPE p DECIMALS 2 VALUE '123.40'.
DATA : p_dec1 TYPE p DECIMALS 3.

MOVE p_dec TO p_dec1.
WRITE : p_dec1.

Regards

Gopi

<u>Reward useful answers</u>

Read only

Former Member
0 Likes
289

with out using a FM u can only do this by declearing that variable to PACKED (P) type and DECIMALS <n>.

<n> upto n decimal as u want.

data var1 type p decimals 3.

Message was edited by:

Kaushik Datta

Read only

Former Member
0 Likes
289

use the FM

CONVERT_TO_LOCAL_CURRENCY

try this