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

FM required

Former Member
0 Likes
739

Hi All,

I need a FM which converts amount(say 12.50) to (1250).urgent..

regards,

kavitha

1 ACCEPTED SOLUTION
Read only

rajesh_akarte2
Active Participant
0 Likes
714

Hi kavitha,

Rather than using the FM why don't u multiply the amount with 100.Doing this u will get desired result.

Reward if helpful.

Regards,

Rajesh Akarte

Hi kavitha,

Rather than using the FM why don't u multiply the amount with 100.Doing this u will get desired result.

Reward if helpful.

Regards,

Rajesh Akarte

4 REPLIES 4
Read only

Former Member
0 Likes
714

Hi,

Use this code...


DATA : amount TYPE char16.
amount = '12.58'. "your variable goes here

REPLACE ALL OCCURRENCES OF '.'  IN amount WITH ' '.
CONDENSE amount.

WRITE :/ amount.

Read only

rajesh_akarte2
Active Participant
0 Likes
715

Hi kavitha,

Rather than using the FM why don't u multiply the amount with 100.Doing this u will get desired result.

Reward if helpful.

Regards,

Rajesh Akarte

Read only

Former Member
0 Likes
714

Hi..

Your required Currency Format is JPY where there are no cents .or decimals.

No Need for FM..

You can get required format with Write statement .

Please check "

Write l_value TO l_new CURRENCY 'JPY' .

Hope this helps .

Thanks .

Read only

mahaboob_pathan
Contributor
0 Likes
714

Hi,

check this

DATA : amount TYPE char16.

data: v_amt type string.

PARAMETERS p_amt type string.

REPLACE ALL OCCURRENCES OF '.' IN p_amt WITH ' '.

CONDENSE p_amt.

WRITE 😕 p_amt.