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

Digits into currency format ?

Former Member
0 Likes
676

I have lv_variable .i contains some digits.

like <b>12345678</b>.

I have to write this as <b>123.456,78</b>.

How to do this ?

could you please explain how to pass parameters, if we need to go for function module.

Your help is appreciated.

Thanks in advance.

I have lv_variable .i contains some digits.

like <b>12345678</b>.

I have to write this as <b>123.456,78</b>.

How to do this ?

could you please explain how to pass parameters, if we need to go for function module.

Your help is appreciated.

Thanks in advance.

3 REPLIES 3
Read only

Former Member
0 Likes
631

Hello,

U can use the WRITE command with USING EDIT MASK.

eg.

WRITE L_DATA TO L_OUTPUT USING EDIT MASK 'RR___.___,__'.

WRITE L_OUTPUT.

Regards

Anurag

Message was edited by: Anurag Bankley

Read only

Former Member
0 Likes
631

examples-

write lv_variable to lv_variable2 currency lv_curr.

write lv_variable currency lv _curr.

write lv_variable currency 'EUR'.

Read only

Former Member
0 Likes
631

Hai Sam Kumar

Go through the following COde

Tables : KNA1.

DATA: LOC_KNA1_UWAER LIKE KNA1-UWAER,

LOC_KNA1_UMSA1 LIKE KNA1-UMSA1.

CALL FUNCTION 'CONVERT_AMOUNT_TO_CURRENCY'

EXPORTING

FOREIGN_CURRENCY = LOC_KNA1_UWAER

FOREIGN_AMOUNT = '12345789'

LOCAL_CURRENCY = KNA1-UWAER

IMPORTING

LOCAL_AMOUNT = LOC_KNA1_UMSA1

  • TABLES

  • T_C_ERRORS =

EXCEPTIONS

ERROR = 1

OTHERS = 2.

IF SY-SUBRC = 0.

write : LOC_KNA1_UMSA1.

ENDIF.

Regards

Sreeni