Application Development 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: 

replace

Former Member
0 Kudos

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

GauthamV
Active Contributor
0 Kudos

hi,

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

7 REPLIES 7

Former Member
0 Kudos

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.

GauthamV
Active Contributor
0 Kudos

hi,

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

Former Member
0 Kudos

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

regards,

Sunil Kumar Mutyala

Former Member
0 Kudos

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.

Former Member
0 Kudos

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 '.'

former_member217544
Active Contributor
0 Kudos

Hi,

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

now replace '.' with ','

and then replace ' # ' with ' . '

Hope this will help.

Regards,

Swarna Munukoti.

former_member230674
Contributor
0 Kudos

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