‎2008 May 09 2:27 PM
I do have a rtf file stored on dataset
I'd like to read the rtf file and replace some tags within the file...
How can I should I read the file so that the content of the internal table is understandable
thkx in advance
‎2008 May 13 10:34 AM
‎2008 May 13 10:50 AM
Hi,
You can use open dataset,Read dataset, write dataset and close dataset to do the canges in your rtf file.
i am sending one example below:
DATA :
w_fname(60) TYPE c VALUE 'yh1059_bkpf.rtf'.
OPEN DATASET w_fname FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc = 0.
DO.
READ DATASET w_fname INTO fs_bkpf.
IF sy-subrc <> 0.
EXIT.
ELSE.
APPEND fs_bkpf TO t_bkpf.
ENDIF. " IF sy-subrc <> 0.
ENDDO. " Do
ELSE.
WRITE sy-subrc.
ENDIF. " IF sy-subrc = 0.
CLOSE DATASET w_fname.
‎2008 May 13 10:58 AM
‎2008 May 13 11:05 AM
open dataset
read <filename> into wa.
this wa shud have jus 1 field of string
then use split to manipulate
Please reward points if useful