You have to read the comments at the beginning of the source code.
For instance, there is the following comment for program SALV_DEMO_TABLE_SIMPLE:
* If the table ALV_T_T2 is empty, please create data for the demo
* by running report BCALV_GENERATE_ALV_T_T2
The program BCALV_GENERATE_ALV_T_T2 will fill the tables ALV_T_T2, ALV_CHCK, ALV_TAB and ALV_CUR, based on some predefined constants and some random logic.
It should be sufficient to run the program with the default values:

By default, after the data has been inserted into the four tables, it displays the contents of ALV_T_T2:

Most of SALV_DEMO* and BCALV_TEST* programs are based on these tables.
NB: other demo programs, like BCALV_GRID* or BCALV_EDIT*, are based on other tables like SCARR, SFLIGHT, etc., which are filled by another report, SAPBC_DATA_GENERATOR.