‎2006 Apr 20 1:42 PM
Hi
I am importing data from a file and the string data has HTML tags in the description example
<FT><H><N>Line Clearance</></></>, Any idea's
how I can programmatically strip the tags away and just leave the text?
‎2006 Apr 20 1:59 PM
FM SOTR_TAGS_REMOVE_FROM_STRING works fine for your requirements.
Peter
‎2006 Apr 20 1:44 PM
SHIFT string LEFT DELETING LEADING '<FT><H><N>'.
SHIFT string RIGHT DELETING TRAILING '</></></>'.
Roland
Message was edited by: Roland Spindler
‎2006 Apr 20 1:47 PM
With regular expression it's possible to implement this, I jsut saw in Eddy's tutorial, however I'm almost sure you don't have ABAP 7.00.
Probable there is an easy solution, I'd ask this in the BSP forum.
Peter
‎2006 Apr 20 1:51 PM
replace all occurances of '<FT><H><N>' in v_str with ''.
replace all occurances of '</>' in v_str with ''.
REgards,
Ravi
‎2006 Apr 20 1:56 PM
hi
Try like this
replace all occurance of '<F>' in text with SPACE .
condence text.
use this command for all the possible tag.
otherwise search last possible TAG i.e <F> etc
take the text till u encounter onaother tag.
regards
manoj
‎2006 Apr 20 2:00 PM
hi,
try that:
SPLIT text AT '>' INTO TABLE sptab.
LOOP AT sptab.
CHECK sptab-line(1) <> '<'.
REPLACE '</' WITH space INTO sptab-line.
WRITE sptab.
ENDLOOP.Andreas
‎2006 Apr 20 2:35 PM
Thanks all you have helped with the problem, I have assigned points and the issue is resolved.
Thanks again
‎2006 Apr 20 1:59 PM
FM SOTR_TAGS_REMOVE_FROM_STRING works fine for your requirements.
Peter