09-16-2008 4:34 PM
Hi Friends,
I am using the READ_TEXT to read the texts in the invoice header. In one of the text type there is an "&" and it reads out as
"<(>&<)>".
If i print the same invoice from SAP Script its printing properly.
I am using this function to extract the text and send it to the Legacy system.
Please share your thoughts on this.
Venky.
09-16-2008 4:47 PM
I can only remember of a solution like:
DATA: lines TYPE STANDARD TABLE OF tline,
wa TYPE tline,
char1 TYPE char3 VALUE '<(>',
char2 TYPE char3 VALUE '<)>'.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = '0001'
language = 'P'
name = '0000000001'
object = 'VBBK'
TABLES
lines = lines.
LOOP AT lines INTO wa.
IF wa-tdline CA char1 OR wa-tdline CA char2.
REPLACE ALL OCCURRENCES OF char1 IN wa-tdline WITH space.
REPLACE ALL OCCURRENCES OF char2 IN wa-tdline WITH space.
CONDENSE wa-tdline.
ENDIF.
ENDLOOP.
Regards,
Valter Oliveira
11-08-2010 9:48 PM
Valter,
In this case if someoine has used brackets in the text, it will replace the brackets with the space too.. do you know any other solution?
Regards,
Kamesh Bathla
11-08-2010 10:43 PM
Hi
The brackets <(>&<)> are placed automatically by the system if the text is written by new editor, the bracket is placed because & is a special character in SAPSCRIPT, infact it's used to introduced a variable has to be printed: &VAR&
Max