SAP G_SELECT_REPORT Function Module for









G_SELECT_REPORT is a standard g select report SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 g select report FM, simply by entering the name G_SELECT_REPORT into the relevant SAP transaction such as SE37 or SE38.

Function Group: GRWD
Program Name: SAPLGRWD
Main Program:
Appliation area: G
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function G_SELECT_REPORT 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 'G_SELECT_REPORT'"
EXPORTING
LIBRARY = "Library (can be masked)
REPORT = "Report (can be masked)
* SELECTION_SCREEN = 'X' "
* START_COLUMN = 0 "Column of the 'upper left' corner
* START_ROW = 0 "Line of the 'upper left' corner
* WITH_LIBRARY = ' ' "

IMPORTING
LIBRARY_NAME = "Library of the selected report
REPORT_NAME = "selected report

EXCEPTIONS
NO_REPORT_PICKED = 1 NO_REPORTS = 2
.



IMPORTING Parameters details for G_SELECT_REPORT

LIBRARY - Library (can be masked)

Data type: T800-LIB
Optional: No
Call by Reference: No ( called with pass by value option)

REPORT - Report (can be masked)

Data type: T800-RNAME
Optional: No
Call by Reference: No ( called with pass by value option)

SELECTION_SCREEN -

Data type:
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

START_COLUMN - Column of the 'upper left' corner

Data type:
Optional: Yes
Call by Reference: No ( called with pass by value option)

START_ROW - Line of the 'upper left' corner

Data type:
Optional: Yes
Call by Reference: No ( called with pass by value option)

WITH_LIBRARY -

Data type:
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for G_SELECT_REPORT

LIBRARY_NAME - Library of the selected report

Data type: T800-LIB
Optional: No
Call by Reference: No ( called with pass by value option)

REPORT_NAME - selected report

Data type: T800-RNAME
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

NO_REPORT_PICKED - no report selected

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_REPORTS - no report found

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for G_SELECT_REPORT 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_library  TYPE T800-LIB, "   
lv_library_name  TYPE T800-LIB, "   
lv_no_report_picked  TYPE T800, "   
lv_report  TYPE T800-RNAME, "   
lv_no_reports  TYPE T800, "   
lv_report_name  TYPE T800-RNAME, "   
lv_selection_screen  TYPE T800, "   'X'
lv_start_column  TYPE T800, "   0
lv_start_row  TYPE T800, "   0
lv_with_library  TYPE T800. "   ' '

  CALL FUNCTION 'G_SELECT_REPORT'  "
    EXPORTING
         LIBRARY = lv_library
         REPORT = lv_report
         SELECTION_SCREEN = lv_selection_screen
         START_COLUMN = lv_start_column
         START_ROW = lv_start_row
         WITH_LIBRARY = lv_with_library
    IMPORTING
         LIBRARY_NAME = lv_library_name
         REPORT_NAME = lv_report_name
    EXCEPTIONS
        NO_REPORT_PICKED = 1
        NO_REPORTS = 2
. " G_SELECT_REPORT




ABAP code using 7.40 inline data declarations to call FM G_SELECT_REPORT

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 LIB FROM T800 INTO @DATA(ld_library).
 
"SELECT single LIB FROM T800 INTO @DATA(ld_library_name).
 
 
"SELECT single RNAME FROM T800 INTO @DATA(ld_report).
 
 
"SELECT single RNAME FROM T800 INTO @DATA(ld_report_name).
 
DATA(ld_selection_screen) = 'X'.
 
 
 
DATA(ld_with_library) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!