Convert Unexpexted an Ampersand Symbol in Standard Text
In standard text conversion, we have situation sometimes, that we found some character are unnecessary displayed as our expectation.
The sample is, when we type '&' ( ampersand symbol ) in the text, but the result are so weird.
<(><)> is appear, see below pic:
<(><)> is appear, see below pic:
The solution is to use below function after text we get detail standard text:
CALL FUNCTION 'CONVERT_ITF_TO_ASCII'
EXPORTING
CODEPAGE = '0000'
FORMATWIDTH = 128
LANGUAGE = SY-LANGU
TABLETYPE = 'ASC'
IMPORTING
C_DATATAB = LT_TEXT
TABLES
ITF_LINES = LT_LINES10
EXCEPTIONS
INVALID_TABLETYPE = 1
OTHERS = 2.
READ TABLE LT_TEXT INDEX 1 INTO LS_TEXT.
LV_REF = LS_TEXT.
WRITE LV_REF.
See below Result:
CALL FUNCTION 'CONVERT_ITF_TO_ASCII'
EXPORTING
CODEPAGE = '0000'
FORMATWIDTH = 128
LANGUAGE = SY-LANGU
TABLETYPE = 'ASC'
IMPORTING
C_DATATAB = LT_TEXT
TABLES
ITF_LINES = LT_LINES10
EXCEPTIONS
INVALID_TABLETYPE = 1
OTHERS = 2.
READ TABLE LT_TEXT INDEX 1 INTO LS_TEXT.
LV_REF = LS_TEXT.
WRITE LV_REF.
See below Result:

Comments
Post a Comment