@1st question: there is no API to receive this information.
In general: refreshing the data of a dialog does no move the focus... So if you press a button to re-load date in some fields/labels - then the focus is not moved (and still is in the button after the refresh).
If your question is related to "focus in grid/tree" and you want to explicitly pass the focus into a certain item, then use FIXGRIDList/TreeBinding.selectAndFocusItem()
@2nd question:
If you mean browser-tabs then the focus is kept by the browser.
If you mean workpage-tabs - then the focus is moved, because there is only one focus that is managed in the browser (and not an individual one per workpage-tab).