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

Replace Text into Amount

former_member184112
Active Contributor
0 Likes
528

Hi,

SAP Script Req:

Amount in words..but requires this in Numeric without any comma or dot..

example 2,200 to 2200

this amount may get higher amount for any other postings

example 1,22,300 that means it should display as 122300

and also i need space between each number.

How it is posible..this is very urgent

Thanks and Regards,

Prabhakar Dharmala

4 REPLIES 4
Read only

Former Member
0 Likes
505

HI,

CALL FUNCTION 'SPELL_AMOUNT'
     EXPORTING
          amount   = int_betrag
          currency = par_waer
     IMPORTING
          in_words = up_spell
     EXCEPTIONS
          OTHERS   = 1.

Regards,

Brown.

Read only

0 Likes
505

Hi,

I want this in Reverse

in Words to Number

Thanks and Regards,

Prabhakar Dharmala

Read only

Former Member
0 Likes
505

Hi,

To remove comma, you can use the following piece of code:

in the text editor:

/: PERFORM REMOVE_ASTERISK IN PROGRAM ZFI1_CHECKFORM

/:USING &REGUH-ZANRE&

/:USING &REGUD-SWNES&

/:USING &REGUH-ZNME1&

/:CHANGING &V_NAME1&

/:CHANGING &V_TOTALAMT&

/:CHANGING &V_NAME2&

/:ENDPERFORM

in the program

Write a code to replace all occurances of ','.

You can make use of

  • Replacing the occurrences of '*'

REPLACE ALL OCCURRENCES OF ',' IN zswnes WITH space.

reward points if helpful.

thanks,

asha

Read only

ak_upadhyay
Contributor
0 Likes
505

Hi,

Use FM...

SPELL_AMOUNT

Reward points if useful....

Regards

AK