Hi amine,
for oo programming please refer to google. You will find tons of learning material. What is you oo expertise/training level?
In your case, you can use a functional method importing source_fields_rule returning RESULT.
But your code is buggy as it is:
READTABLE ...BINARYSEARCH and no check for SY-SUBRC will cause unpredictable errors if no matching record is found.
Regards
Clemens