Quantcast
Viewing all articles
Browse latest Browse all 5631

Re: handle invalid char at end of text

Hi Suneel,

 

Try this:

 

DATA : INT_VAR TYPE /BI0/OIPOSTXT.
DATA : length TYPE i.

DATA : num type i.

MOVE SOURCE_FIELDS-SGTXT TO INT_VAR.

TRANSLATE int_var TO UPPER CASE .


num = 0.


length
= STRLEN( int_var ).


DO length TIMES.
  
IF int_var+num(1) CN
  
',<>?/\:;"''ABCDEFGHI JKLMNOPQRSTUVWXYZ!%^&*()__+=1234567890'.
    int_var+num(1) = ''.

   ENDIF.

 

   num = num + 1.


ENDDO.


condense int_var NO-GAPS.


RESULT
= int_var.




Just post here for any queries..

 

Regards,

Loed


Viewing all articles
Browse latest Browse all 5631

Trending Articles



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