SAP Function Modules

G_REPORT_GET_DIMENSION_DATA SAP Function module - Determine description of a dimension







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

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


Pattern for FM G_REPORT_GET_DIMENSION_DATA - G REPORT GET DIMENSION DATA





CALL FUNCTION 'G_REPORT_GET_DIMENSION_DATA' "Determine description of a dimension
  EXPORTING
    dim_number =                "               Consecutive dimension number of th
    dim_type =                  " rgcdi-f_type  Type of the desired dimensions.
  IMPORTING
    dim_cb =                    " rgcct-dim_cb  Control block number of the dimens
    dim_count =                 "               Number of dimensions of the desire
    dim_data =                  " rgcdi         Data of the chosen dimension.
  EXCEPTIONS
    RC_INTERFACE_NOT_INITIALIZED = 1  "         Interface not initialized.
    RC_INVALID_DIM_NUMBER = 2   "               Dimension number not allowed for t
    RC_INVALID_DIM_TYPE = 3     "               Dimension category is not allowed.
    .  "  G_REPORT_GET_DIMENSION_DATA

ABAP code example for Function Module G_REPORT_GET_DIMENSION_DATA





The ABAP code below is a full code listing to execute function module G_REPORT_GET_DIMENSION_DATA 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_dim_cb  TYPE RGCCT-DIM_CB ,
ld_dim_count  TYPE STRING ,
ld_dim_data  TYPE RGCDI .

DATA(ld_dim_number) = 'some text here'.

DATA(ld_dim_type) = some text here . CALL FUNCTION 'G_REPORT_GET_DIMENSION_DATA' EXPORTING dim_number = ld_dim_number dim_type = ld_dim_type IMPORTING dim_cb = ld_dim_cb dim_count = ld_dim_count dim_data = ld_dim_data EXCEPTIONS RC_INTERFACE_NOT_INITIALIZED = 1 RC_INVALID_DIM_NUMBER = 2 RC_INVALID_DIM_TYPE = 3 . " G_REPORT_GET_DIMENSION_DATA
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here 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_dim_cb  TYPE RGCCT-DIM_CB ,
ld_dim_number  TYPE STRING ,
ld_dim_count  TYPE STRING ,
ld_dim_type  TYPE RGCDI-F_TYPE ,
ld_dim_data  TYPE RGCDI .

ld_dim_number = 'some text here'.

ld_dim_type = some text here

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