This will show you how to call a report program (Executable program) from another program.
In this example I will call transaction FBL5N which is used to check customer open items. I will call this report for company code 3000 and key date as at today.
First go to transaction FBL5N and get its program name. You will need this program name to use in SUBMIT statement.
Go to FBL5N > Status > Program Name
The report you want to call should be an executable program.
Then write your calling program as below.
You can set the selection screen values of the program as below. Here I will set the company code as 3000 and key date as system date.
Then call the report with the selection.
Other variations you can use with SUBMIT
1. Call report with your own selection
2. Call report with a variant
You should have the VARIENT1 saved.
3. Call report and export the list to memory
In this method you can export the result of the report output to memory. This memory can be read by function modules LIST_FROM_MEMORY, LIST_WRITE, and LIST_DISPLAY.