Complex Source
In SQL Script, after FROM the source can be a simple DB table/Internal Table/it can be a complex may be below here the source is a UNION of two Internal Tables serving as the selection source.

The test report that calls the AMDP method/procedure-

Here is the result-
