I have a screen with a table control in it (generated with the Screen Painter) that shows records from a database table. The screen also has a button, which shows a popup when it's clicked. The popup has a form to add a record to the database table.
When the form is submitted the record is added to the database, but when the popup is closed, the screen that shows the database records isn't refreshed i.e. the new record isn't shown. Simply calling the screen again doesn't seem to work.
How to refresh the table control to show the new record?
Just because your table refers to database fields does not mean it will be updated/populated automatically to reflect the state of the database. You need to programmatically populate the table during the PBO (Process Before Output) event that occurs before the screen is displayed.
To gain an understanding of how this works, you may need to spend some time understanding table controls in ABAP dynpros (screens). Here is a good place to get started:
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/frameset.htm