Quote:
Looking to convert the loop into recursive function as it should need to continue for rest of the records instead of break.
Rewriting the function as recursive will not change its behavior. What you want is changing the behavior of the function, the function is your design, should not be difficult to change the design.
Note that we have no idea of what is supposed to do your code or how you want change its behavior, just remove the break.
Nobody but you can fix your code.