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

Re: read_text output

$
0
0

Hi Srinivas,

 

To dynamically remove 'TEXT' from string, you can try below code:

 

data:lv_string type string value 'TEXT PRINTED IN BOLD'.

data:i_data type table of string,

      wa_data type string,

      lv_count type i.

 

split lv_string at space into table i_data.

  describe table i_data lines lv_count.

  clear lv_string.

 

do.

   read table i_data into wa_data index lv_count.

   if wa_data ne 'TEXT'.

     concatenate wa_data lv_string into lv_string separated by space.

    endif.

    clear wa_data.

 

    lv_count = lv_count - 1.

    if lv_count le 0.

      exit.

     endif.

  enddo.


Also as mentioned by Raymond we can use 'Replace all occurances' and its better approach too..


Regards,

Greeshma.


Viewing all articles
Browse latest Browse all 10512

Trending Articles



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