ABAP Submit Report to Run another ABAP Program
ABAP developers can execute an ABAP report within another ABAP program using ABAP Submit Report statement. For example, there is already an ABAP report built and used in your SAP system. And your ABAP developers need to execute ABAP program within their custom ABAP report. Programmers can call ABAP report just like calling a function module. In this ABAP tutorial I'll give an example of running ABAP Submit Report statement.
Execute ABAP Program using Submit Report Statement
For example, I created an ABAP report which will be executed when an invoice output is created.
The output conditions for the invoice message type is already maintained.
So I created a new invoice output from the copy of the existing invoice output message type.
And in the print program I used ABAP Submit Report syntax to run the target ABAP program with NAST parameters invoice number and invoice partner or the customer number.
Here is the ABAP code to execute an ABAP report and return back to continue from existing code line.
The RETURN hint used at the end of the SUBMIT Report syntax enables the current ABAP program to execute and external ABAP report and continue after the execution of external program finishes.
Of course ABAP developers should take care of secure coding controls by using ABAP Test Cockpit or Code Inspector for Call Executable Program check for ABAP Submit command