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

Function to convert 0 to space

Former Member
0 Likes
582

Is there any function to convert 0 to spaces or something similar?

Thank you in advance.

Is there any function to convert 0 to spaces or something similar?

Thank you in advance.

3 REPLIES 3
Read only

Former Member
0 Likes
546

How about this???

REPLACE ALL OCCURRENCES OF '0' IN L_TEXT WITH SPACE.

or

SHIFT L_TEXT LEFT DELETING LEADING '0'.

Kind Regards

Eswar

Read only

Former Member
0 Likes
546

Hi,

use

SHIFT c LEFT DELETING LEADING c1.

SHIFT c RIGHT DELETING TRAILING c1.

shift var left removing leading '0'.

or

shift var right removing trailing '0'.

Regards

Amole

Read only

anversha_s
Active Contributor
0 Likes
546

hi,

chk this exmaple.

data: l_amnt(100) type c.

l_amnt = ' 1.234.567,89'.

replace all occurrences of ',' in l_amnt with '#'.

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

replace all occurrences of '#' in l_amnt with '.'.

replace all occurrences of ' ' in l_amnt with ' 0'.

write : l_amnt.

rgds

anver

if helped mark points