SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software
Development resources, articles, tutorials, code samples, tools and downloads for SAP HANA and ABAP, HANA Database, SQLScript, SAP UI5, Screen Personas, Web Dynpro, Workflow

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.

SUBMIT z_invoice_program
 WITH p_vbeln = nast-objky
 WITH p_kunnr = nast-parnr AND RETURN.

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


Install SAP Free
CRM Companies List
Web Based CRM Software

Copyright © 2004 - 2021 Eralper YILMAZ. All rights reserved.