Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Passing data from one report to another in ABAP using SUBMIT
In ABAP, passing data from one report to another using the SUBMIT statement is a common requirement for modular programming. The SUBMIT statement allows you to execute another report and optionally pass selection screen parameters and internal table data to it.
Basic SUBMIT Syntax
The basic syntax for submitting a report with parameters is ?
SUBMIT report_name WITH parameter_name = value WITH SELECTION-TABLE selection_table AND RETURN.
Passing Selection Screen Parameters
You can pass values to selection screen parameters of the target report using the WITH clause ?
DATA: lv_matnr TYPE matnr VALUE '100-100'. SUBMIT zreport_target WITH s_matnr-low = lv_matnr WITH s_matnr-sign = 'I' WITH s_matnr-option = 'EQ' AND RETURN.
Using Selection Tables
For complex parameter passing, create a selection table and populate it before submitting ?
DATA: lt_seltab TYPE TABLE OF rsparams. APPEND VALUE rsparams( selname = 'S_MATNR' kind = 'S' sign = 'I' option = 'EQ' low = '100-100' ) TO lt_seltab. SUBMIT zreport_target WITH SELECTION-TABLE lt_seltab AND RETURN.
Common Issues and Solutions
If you encounter syntax errors when using SUBMIT, verify that variables are declared correctly. For complex issues, use the extended syntax check by navigating to Program ? Check ? Extended Syntax Check in SE80 or SE38.
Ensure that parameter names match exactly with the selection screen parameters in the target report, including case sensitivity.
Conclusion
The SUBMIT statement provides a flexible way to execute reports with dynamic parameters, enabling modular and reusable ABAP code design.
