Pass through the lines after field action in header

When I execute a routine that modifies fields in a budget line after a After_modif action in a header field, if I don't position myself in the lines the changes are lost when I register the budget.

I need some action in code that simulates as if I click on a line to save those changes. I have tried with zonsui but it does not work.

Can anyone help me?

Thank you very much