Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

Replace space in a string to underscore

$
0
0

Hello All,

 

I would like to replace space in a string to an underscore.

 

Eg : 'LN MAT' should be changed to LN_MAT. 

 

I tried this code

 

data : ls_text type mara-matnr.

REPLACE ALLOCCURRENCES OF SPACES

       of ls_text with '_".

 

Runtime exception REPLACE_INFINITE_LOOP  is thrown. Could anyone please help

me out as to what is the solution.

 

Thanks

Sudha


Viewing all articles
Browse latest Browse all 8332

Trending Articles



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