Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8557

Re: String character replacement manipulation

$
0
0

Hi Chris,

 

Hope it helpful.

 

 

Report  ZDEMO.

 

data: lv_data type string.

 

data: begin of itab occurs 0,

       value(100) type c,

       end of itab,

       count type i,

       index type string,

       lv_output type string.

 

field-symbols: <fs> like line of itab.

 

start-of-selection.

 

lv_data = 'You need # keyboard and # screens '.

 

 

split lv_data at  '#' into table itab.

 

loop at itab assigning <fs>.

 

if <fs>(01) NE ' '.

lv_output = <fs>.

else.

ADD 1 to count.

move count to index.

concatenate  lv_output '#' index <fs>  into lv_output.

endif.

 

 

endloop.

 

 

write lv_output.

 

Regards,

Venkat.


Viewing all articles
Browse latest Browse all 8557

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>