SAP Function Modules

GRPC_API_REPORT_RESULT SAP Function module - Retrieve the result of the report







GRPC_API_REPORT_RESULT is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name GRPC_API_REPORT_RESULT into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: GRPC_API_REPORT
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM GRPC_API_REPORT_RESULT - GRPC API REPORT RESULT





CALL FUNCTION 'GRPC_API_REPORT_RESULT' "Retrieve the result of the report
  EXPORTING
    i_report_id =               " grpc_api_object_id  GRPC ID of the individual object
*   i_btc_mode = SPACE          " flag          'X' means result of background report
*   i_sel_screen =              " grpc_rep_sel_screen  Report: Selection screen
  IMPORTING
    es_filter =                 " grpc_s_rep_selection  Selection for Reporting
    es_details =                " grpc_s_rep_details  Selection for Reporting
    e_return_code =             " int4          Natural number
    et_result =                 " table         Any table
    es_ac_filter =              " grpc_s_rep_selection_ac  Selection for Reporting Central Automatic Control
* TABLES
*   et_message =                " bapirettab    Table with BAPI Return Information
*   it_rating_filter_value =    " grpc_t_rating_value  Rating values relevant for the rating filter in reporting
*   it_rating_filter_category =   " grpc_t_rating_category  Case categories relevant for the rating filter
*   et_rating_filter_value =    " grpc_t_rating_value  Rating values relevant for the rating filter in reporting
*   et_rating_filter_category =   " grpc_t_rating_category  Case categories relevant for the rating filter
    .  "  GRPC_API_REPORT_RESULT

ABAP code example for Function Module GRPC_API_REPORT_RESULT





The ABAP code below is a full code listing to execute function module GRPC_API_REPORT_RESULT including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_es_filter  TYPE GRPC_S_REP_SELECTION ,
ld_es_details  TYPE GRPC_S_REP_DETAILS ,
ld_e_return_code  TYPE INT4 ,
ld_et_result  TYPE TABLE ,
ld_es_ac_filter  TYPE GRPC_S_REP_SELECTION_AC ,
it_et_message  TYPE STANDARD TABLE OF BAPIRETTAB,"TABLES PARAM
wa_et_message  LIKE LINE OF it_et_message ,
it_it_rating_filter_value  TYPE STANDARD TABLE OF GRPC_T_RATING_VALUE,"TABLES PARAM
wa_it_rating_filter_value  LIKE LINE OF it_it_rating_filter_value ,
it_it_rating_filter_category  TYPE STANDARD TABLE OF GRPC_T_RATING_CATEGORY,"TABLES PARAM
wa_it_rating_filter_category  LIKE LINE OF it_it_rating_filter_category ,
it_et_rating_filter_value  TYPE STANDARD TABLE OF GRPC_T_RATING_VALUE,"TABLES PARAM
wa_et_rating_filter_value  LIKE LINE OF it_et_rating_filter_value ,
it_et_rating_filter_category  TYPE STANDARD TABLE OF GRPC_T_RATING_CATEGORY,"TABLES PARAM
wa_et_rating_filter_category  LIKE LINE OF it_et_rating_filter_category .

DATA(ld_i_report_id) = 'Check type of data required'.
DATA(ld_i_btc_mode) = 'Check type of data required'.
DATA(ld_i_sel_screen) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_et_message to it_et_message.

"populate fields of struture and append to itab
append wa_it_rating_filter_value to it_it_rating_filter_value.

"populate fields of struture and append to itab
append wa_it_rating_filter_category to it_it_rating_filter_category.

"populate fields of struture and append to itab
append wa_et_rating_filter_value to it_et_rating_filter_value.

"populate fields of struture and append to itab
append wa_et_rating_filter_category to it_et_rating_filter_category. . CALL FUNCTION 'GRPC_API_REPORT_RESULT' EXPORTING i_report_id = ld_i_report_id * i_btc_mode = ld_i_btc_mode * i_sel_screen = ld_i_sel_screen IMPORTING es_filter = ld_es_filter es_details = ld_es_details e_return_code = ld_e_return_code et_result = ld_et_result es_ac_filter = ld_es_ac_filter * TABLES * et_message = it_et_message * it_rating_filter_value = it_it_rating_filter_value * it_rating_filter_category = it_it_rating_filter_category * et_rating_filter_value = it_et_rating_filter_value * et_rating_filter_category = it_et_rating_filter_category . " GRPC_API_REPORT_RESULT
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_es_filter  TYPE GRPC_S_REP_SELECTION ,
ld_i_report_id  TYPE GRPC_API_OBJECT_ID ,
it_et_message  TYPE STANDARD TABLE OF BAPIRETTAB ,
wa_et_message  LIKE LINE OF it_et_message,
ld_es_details  TYPE GRPC_S_REP_DETAILS ,
ld_i_btc_mode  TYPE FLAG ,
it_it_rating_filter_value  TYPE STANDARD TABLE OF GRPC_T_RATING_VALUE ,
wa_it_rating_filter_value  LIKE LINE OF it_it_rating_filter_value,
ld_e_return_code  TYPE INT4 ,
ld_i_sel_screen  TYPE GRPC_REP_SEL_SCREEN ,
it_it_rating_filter_category  TYPE STANDARD TABLE OF GRPC_T_RATING_CATEGORY ,
wa_it_rating_filter_category  LIKE LINE OF it_it_rating_filter_category,
ld_et_result  TYPE TABLE ,
it_et_rating_filter_value  TYPE STANDARD TABLE OF GRPC_T_RATING_VALUE ,
wa_et_rating_filter_value  LIKE LINE OF it_et_rating_filter_value,
ld_es_ac_filter  TYPE GRPC_S_REP_SELECTION_AC ,
it_et_rating_filter_category  TYPE STANDARD TABLE OF GRPC_T_RATING_CATEGORY ,
wa_et_rating_filter_category  LIKE LINE OF it_et_rating_filter_category.

ld_i_report_id = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_et_message to it_et_message.
ld_i_btc_mode = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_rating_filter_value to it_it_rating_filter_value.
ld_i_sel_screen = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_rating_filter_category to it_it_rating_filter_category.

"populate fields of struture and append to itab
append wa_et_rating_filter_value to it_et_rating_filter_value.

"populate fields of struture and append to itab
append wa_et_rating_filter_category to it_et_rating_filter_category.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name GRPC_API_REPORT_RESULT or its description.