SAP GRW_SUBMIT Function Module for Output Stored Report
GRW_SUBMIT is a standard grw submit SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Output Stored Report processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for grw submit FM, simply by entering the name GRW_SUBMIT into the relevant SAP transaction such as SE37 or SE38.
Function Group: GRWS
Program Name: SAPLGRWS
Main Program: SAPLGRWS
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function GRW_SUBMIT pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'GRW_SUBMIT'"Output Stored Report.
EXPORTING
I_PROGRAM_NAME = "ABAP Program Name
* I_WF_OKEY = "
* I_GS_KEY = "
* IT_PARAMS = "Report Writer: Table Type for Parameters and Select Options
* I_VARIANT = ' ' "
* I_VIA_SELSCREEN = ' ' "General Flag
* I_AND_RETURN = 'X' "SUBMIT ... AND RETURN
* I_TO_SAP_SPOOL = ' ' "General Flag
* IS_PRI_PARAMS = "Structure for Passing Print Parameters
* IS_ARC_PARAMS = "ImageLink structure
* I_GS_WITEM = "
IMPORTING Parameters details for GRW_SUBMIT
I_PROGRAM_NAME - ABAP Program Name
Data type: PROGRAMMOptional: No
Call by Reference: Yes
I_WF_OKEY -
Data type: SWOTOBJID-OBJKEYOptional: Yes
Call by Reference: No ( called with pass by value option)
I_GS_KEY -
Data type: SCHEDMAN_KEYOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_PARAMS - Report Writer: Table Type for Parameters and Select Options
Data type: GRW_T_PARAMSOptional: Yes
Call by Reference: Yes
I_VARIANT -
Data type: VARIANTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_VIA_SELSCREEN - General Flag
Data type: FLAGDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_AND_RETURN - SUBMIT ... AND RETURN
Data type: FLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_TO_SAP_SPOOL - General Flag
Data type: FLAGDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
IS_PRI_PARAMS - Structure for Passing Print Parameters
Data type: PRI_PARAMSOptional: Yes
Call by Reference: No ( called with pass by value option)
IS_ARC_PARAMS - ImageLink structure
Data type: ARC_PARAMSOptional: Yes
Call by Reference: No ( called with pass by value option)
I_GS_WITEM -
Data type: SCMA_WITEMOptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for GRW_SUBMIT Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_i_program_name | TYPE PROGRAMM, " | |||
| lv_i_wf_okey | TYPE SWOTOBJID-OBJKEY, " | |||
| lv_i_gs_key | TYPE SCHEDMAN_KEY, " | |||
| lv_it_params | TYPE GRW_T_PARAMS, " | |||
| lv_i_variant | TYPE VARIANT, " SPACE | |||
| lv_i_via_selscreen | TYPE FLAG, " ' ' | |||
| lv_i_and_return | TYPE FLAG, " 'X' | |||
| lv_i_to_sap_spool | TYPE FLAG, " ' ' | |||
| lv_is_pri_params | TYPE PRI_PARAMS, " | |||
| lv_is_arc_params | TYPE ARC_PARAMS, " | |||
| lv_i_gs_witem | TYPE SCMA_WITEM. " |
|   CALL FUNCTION 'GRW_SUBMIT' "Output Stored Report |
| EXPORTING | ||
| I_PROGRAM_NAME | = lv_i_program_name | |
| I_WF_OKEY | = lv_i_wf_okey | |
| I_GS_KEY | = lv_i_gs_key | |
| IT_PARAMS | = lv_it_params | |
| I_VARIANT | = lv_i_variant | |
| I_VIA_SELSCREEN | = lv_i_via_selscreen | |
| I_AND_RETURN | = lv_i_and_return | |
| I_TO_SAP_SPOOL | = lv_i_to_sap_spool | |
| IS_PRI_PARAMS | = lv_is_pri_params | |
| IS_ARC_PARAMS | = lv_is_arc_params | |
| I_GS_WITEM | = lv_i_gs_witem | |
| . " GRW_SUBMIT | ||
ABAP code using 7.40 inline data declarations to call FM GRW_SUBMIT
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single OBJKEY FROM SWOTOBJID INTO @DATA(ld_i_wf_okey). | ||||
| DATA(ld_i_variant) | = ' '. | |||
| DATA(ld_i_via_selscreen) | = ' '. | |||
| DATA(ld_i_and_return) | = 'X'. | |||
| DATA(ld_i_to_sap_spool) | = ' '. | |||
Search for further information about these or an SAP related objects