SAP Function Modules

BAPI_RE_CG_GET_LIST SAP Function module - Return Data of Multiple Comparative Groups







BAPI_RE_CG_GET_LIST 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 BAPI_RE_CG_GET_LIST into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: REAJ_BAPI_COMP_GRP
Released Date: 31.08.2005
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM BAPI_RE_CG_GET_LIST - BAPI RE CG GET LIST





CALL FUNCTION 'BAPI_RE_CG_GET_LIST' "Return Data of Multiple Comparative Groups
* EXPORTING
*   detail_data_from =          " bapi_re_additional_fields-detail_valid_from  Date: Detailed Data Valid From
*   detail_data_to =            " bapi_re_additional_fields-detail_valid_to  Date: Detailed Data Valid To
*   select_x =                  " bapi_re_comp_grp_selx  Comparative Group - Fields for Mass Selection
*   max_rows = 0                " bapi_re_additional_fields-bapimaxrow  Maximum Number of Lines of Hits
  TABLES
    seloption =                 " bapi_re_seloption  Selection Options
*   comp_grp =                  " bapi_re_comp_grp  Comparative Groups
*   object_rel =                " bapi_re_object_rel  Objects
*   resubm_rule =               " bapi_re_resubm_rule  Reminder Rules
*   resubm_date =               " bapi_re_resubm_date  Reminder Dates
*   status =                    " bapi_re_status  Status
*   extension_out =             " bapi_re_ident_parex  Data of User Fields
*   return =                    " bapiret2      Return Parameter(s)
    .  "  BAPI_RE_CG_GET_LIST

ABAP code example for Function Module BAPI_RE_CG_GET_LIST





The ABAP code below is a full code listing to execute function module BAPI_RE_CG_GET_LIST 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:
it_seloption  TYPE STANDARD TABLE OF BAPI_RE_SELOPTION,"TABLES PARAM
wa_seloption  LIKE LINE OF it_seloption ,
it_comp_grp  TYPE STANDARD TABLE OF BAPI_RE_COMP_GRP,"TABLES PARAM
wa_comp_grp  LIKE LINE OF it_comp_grp ,
it_object_rel  TYPE STANDARD TABLE OF BAPI_RE_OBJECT_REL,"TABLES PARAM
wa_object_rel  LIKE LINE OF it_object_rel ,
it_resubm_rule  TYPE STANDARD TABLE OF BAPI_RE_RESUBM_RULE,"TABLES PARAM
wa_resubm_rule  LIKE LINE OF it_resubm_rule ,
it_resubm_date  TYPE STANDARD TABLE OF BAPI_RE_RESUBM_DATE,"TABLES PARAM
wa_resubm_date  LIKE LINE OF it_resubm_date ,
it_status  TYPE STANDARD TABLE OF BAPI_RE_STATUS,"TABLES PARAM
wa_status  LIKE LINE OF it_status ,
it_extension_out  TYPE STANDARD TABLE OF BAPI_RE_IDENT_PAREX,"TABLES PARAM
wa_extension_out  LIKE LINE OF it_extension_out ,
it_return  TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM
wa_return  LIKE LINE OF it_return .


DATA(ld_detail_data_from) = 20210129

DATA(ld_detail_data_to) = 20210129
DATA(ld_select_x) = 'Check type of data required'.

DATA(ld_max_rows) = 123

"populate fields of struture and append to itab
append wa_seloption to it_seloption.

"populate fields of struture and append to itab
append wa_comp_grp to it_comp_grp.

"populate fields of struture and append to itab
append wa_object_rel to it_object_rel.

"populate fields of struture and append to itab
append wa_resubm_rule to it_resubm_rule.

"populate fields of struture and append to itab
append wa_resubm_date to it_resubm_date.

"populate fields of struture and append to itab
append wa_status to it_status.

"populate fields of struture and append to itab
append wa_extension_out to it_extension_out.

"populate fields of struture and append to itab
append wa_return to it_return. . CALL FUNCTION 'BAPI_RE_CG_GET_LIST' * EXPORTING * detail_data_from = ld_detail_data_from * detail_data_to = ld_detail_data_to * select_x = ld_select_x * max_rows = ld_max_rows TABLES seloption = it_seloption * comp_grp = it_comp_grp * object_rel = it_object_rel * resubm_rule = it_resubm_rule * resubm_date = it_resubm_date * status = it_status * extension_out = it_extension_out * return = it_return . " BAPI_RE_CG_GET_LIST
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_detail_data_from  TYPE BAPI_RE_ADDITIONAL_FIELDS-DETAIL_VALID_FROM ,
it_seloption  TYPE STANDARD TABLE OF BAPI_RE_SELOPTION ,
wa_seloption  LIKE LINE OF it_seloption,
ld_detail_data_to  TYPE BAPI_RE_ADDITIONAL_FIELDS-DETAIL_VALID_TO ,
it_comp_grp  TYPE STANDARD TABLE OF BAPI_RE_COMP_GRP ,
wa_comp_grp  LIKE LINE OF it_comp_grp,
ld_select_x  TYPE BAPI_RE_COMP_GRP_SELX ,
it_object_rel  TYPE STANDARD TABLE OF BAPI_RE_OBJECT_REL ,
wa_object_rel  LIKE LINE OF it_object_rel,
ld_max_rows  TYPE BAPI_RE_ADDITIONAL_FIELDS-BAPIMAXROW ,
it_resubm_rule  TYPE STANDARD TABLE OF BAPI_RE_RESUBM_RULE ,
wa_resubm_rule  LIKE LINE OF it_resubm_rule,
it_resubm_date  TYPE STANDARD TABLE OF BAPI_RE_RESUBM_DATE ,
wa_resubm_date  LIKE LINE OF it_resubm_date,
it_status  TYPE STANDARD TABLE OF BAPI_RE_STATUS ,
wa_status  LIKE LINE OF it_status,
it_extension_out  TYPE STANDARD TABLE OF BAPI_RE_IDENT_PAREX ,
wa_extension_out  LIKE LINE OF it_extension_out,
it_return  TYPE STANDARD TABLE OF BAPIRET2 ,
wa_return  LIKE LINE OF it_return.


ld_detail_data_from = 20210129

"populate fields of struture and append to itab
append wa_seloption to it_seloption.

ld_detail_data_to = 20210129

"populate fields of struture and append to itab
append wa_comp_grp to it_comp_grp.
ld_select_x = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_object_rel to it_object_rel.

ld_max_rows = 123

"populate fields of struture and append to itab
append wa_resubm_rule to it_resubm_rule.

"populate fields of struture and append to itab
append wa_resubm_date to it_resubm_date.

"populate fields of struture and append to itab
append wa_status to it_status.

"populate fields of struture and append to itab
append wa_extension_out to it_extension_out.

"populate fields of struture and append to itab
append wa_return to it_return.

SAP Documentation for FM BAPI_RE_CG_GET_LIST


Using this BAPI you can read the data of a comparative group of apartments in the system. ...See here for full SAP fm documentation






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 BAPI_RE_CG_GET_LIST or its description.