HI Jyothi,
We have achieved similar kind of requirement with the following code. Write the below code in ecc SE38 and transport the same.
REPORT ZREPORT.
Tables ROOSFIELD.
SELECT * FROM ROOSFIELD WHERE OLTPSOURCE = 'DSNAME' AND OBJVERS = 'A' AND FIELD in ('Field1', 'Field2', 'Field3', 'Field4').
IF sy-subrc = 0.
ROOSFIELD-SELECTION = 'X'.
MODIFY ROOSFIELD.
ENDIF.
ENDSELECT.
Regards,
PRK.