first create an implicit in program LMERELVITOP and declare a variable there, i.e g_rel_code.
create an implicit in method HOTSPOT_CLICK and pass the value of my_tmp_rel_code /ls_data-rel_code to the new declared variable.
now you can access the variable through (SAPLMERELVI)G_REL_CODE in your programs.