You may need to add code for the fields. In SQ02 select the relevant fields. There is an option to add code.
Generate the query. It saves the program in a pool.
Immediately after generating, go to SE38,
-usually this should display the program name in the SE38 screen.
-Or enter in the program name the query name with * in both ends, and look for prog name, it should display the prog name generated.
You may be able to add code in the code used for report output
Or create variants for country grouping.