Hi..
Add a check for that particular screen
if sy-index eq 1.
**Execute popup code
Endif.
Starting from second record , if there is a change in company code you have to call another window
"Change company code"
Hope it will help you, if you need more info, please let me know.
Thanks
Gowrishankar