Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

read rtf from dataset

Former Member
0 Likes
640

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

4 REPLIES 4
Read only

Former Member
0 Likes
573

No body can help me ?

Read only

Former Member
0 Likes
573

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.

Read only

Former Member
0 Likes
573

hi go to the tcode cg3y give the file name ..

regards,

venkat

Read only

manubhutani
Active Contributor
0 Likes
573

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