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

To delete commas

Former Member
0 Likes
830

Hi Experts,

I am calling 'fm' to convert digit amount in words but its giving error as amount conatins commas so plesae tell me to delete commas in amount.

thank you.

Hi Experts,

I am calling 'fm' to convert digit amount in words but its giving error as amount conatins commas so plesae tell me to delete commas in amount.

thank you.

6 REPLIES 6
Read only

Former Member
0 Likes
786

Hi,

try this way...it will work


replace all occurrences of ',' in w_currency with ' '.
condence w_currency  NO-GAPS.

Regadrs,

Prabhudas

Read only

0 Likes
786

hi,

its solved my problem.

thank you.

Read only

Former Member
0 Likes
786

Hi,

You can use the command like,

REPLACE all the occurances of ',' with SPACE, in the given work area.

Regards,

Santhosh.

Read only

Former Member
0 Likes
786

well...how many commas u have ..if u have 1 comma just use split and move the values into two variables and use concatenate to join them into one variable and pass that into function module for words.hope this helps

Read only

Former Member
0 Likes
786

Hi Saalim,

do you want to delete the comma:

e.g. 220,20 x 100 = 220220

newvalue = amount x 100.

if you want ot replace it you have to use a variable type c :

replace ',' with ' ' into ztext.

regards

Uwe

Edited by: Uwe Cappeller on May 29, 2009 4:28 PM

Read only

Former Member
0 Likes
786

Hi Saalim,

Declare your field your currecy type then you can avoid comma's or else just use split or replace command for comma's and then use this function module,

CALL FUNCTION 'HR_IN_CHG_INR_WRDS'

EXPORTING

amt_in_num = l_tmp

IMPORTING

amt_in_words = p_g_words

EXCEPTIONS

data_type_mismatch = 1

OTHERS = 2.