Ok, thanks for your time and help.
There was still some issue with the data _null_ step and I finally figured out what I did wrong with the %sysfunction. This is the macro now:
%macro id_relevant(tab= ,id= );
%local result;
%let result = %sysfunc(find(&&&id._RELEVANT.,%sysfunc(cat(_,&tab.,_))));
&result
%mend id_relevant;
and it is running fine in the process - but as you said, it can't run alone since it returns a single number, but that's fine in this case.