Hi,
I am using below code, but it is not replacing correctly.
data DWORK_VAL(510) type C.
DWORK_VAL = 'DWORK_VAL ~~~efghijklmnopqrstuvxyz~~~'.
loop at text_content assigning <fs>.
search <fs> for DWORK_VAL.
if sy-subrc = 0.
replace DWORK_VAL in <fs> with 'ABCDE...ashdalkjhsd----
888*****'.
modify text_content from <fs> index sy-tabix.
endif.
Thanks,