Problem solved.
I had to add a check statement for lr_parent after first if statement like that:
CASE lr_parent IS NOT INITIAL.
Problem solved.
I had to add a check statement for lr_parent after first if statement like that:
CASE lr_parent IS NOT INITIAL.