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

Former Member
0 Likes
918

Hi Experts,

34.567.678.78,45

In above value I have to replace ' . ' with ' , ' and ' ,' with ' . '.

please do the need full help.

Thanks in advance,

Radhakrishna.

1 ACCEPTED SOLUTION
Read only

GauthamV
Active Contributor
0 Likes
878

hi,

in menu goto user profile - own data in defaults tab choose the decimal notation u required.

7 REPLIES 7
Read only

Former Member
0 Likes
878

data:char(25) value '34.567.678.78,45'.

replace all occurrences of '.' in char with '*' .

replace all occurrences of ',' in char with '&' .

replace all occurrences of '*' in char with ',' .

replace all occurrences of '&' in char with '.' .

write: char.

Read only

GauthamV
Active Contributor
0 Likes
879

hi,

in menu goto user profile - own data in defaults tab choose the decimal notation u required.

Read only

Former Member
0 Likes
878

Go to Syetem --> User profile --> owndata --> defaults(tab page) there in decimal notation fix what type of notation u want....

regards,

Sunil Kumar Mutyala

Read only

Former Member
0 Likes
878

Hi Radhakrishnan,

In the user profile change the decimal notation format..

Menu>system>User Profile->Own Data->Defaults

Decimal notation: 1,234,567.89

Regards,

Nisrin.

Read only

Former Member
0 Likes
878

first split your variable at ',' and

split v_amount at ',' into v_amount1 v_amount2.

replace all occurrences of '.' in v_amount1 with ',' .

then concatenate both separated by '.'

concatenate

v_amount1 v_amount2 into v_amount separated by '.'

Read only

former_member217544
Active Contributor
0 Likes
878

Hi,

Firts replace ',' with another variable say ' # '

now replace '.' with ','

and then replace ' # ' with ' . '

Hope this will help.

Regards,

Swarna Munukoti.

Read only

Former Member
0 Likes
878

Hi Radhakrishna,

V1 = 34.567.678.78,45

In this context,

One way in using replace statement,

REPLACE ALL OCCURENCES OF '.' IN V1 WITH ' ,'.

REPLACE ALL OCCURENCES OF ',' IN V1 WITH '.'.

By

Prasad G.V.K