SAP Function Modules

ECRM_READ_GRIDUSAGE_DATA SAP Function module - Read Grid Usage Data







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

Associated Function Group: ECRM_ISU_GRID
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM ECRM_READ_GRIDUSAGE_DATA - ECRM READ GRIDUSAGE DATA





CALL FUNCTION 'ECRM_READ_GRIDUSAGE_DATA' "Read Grid Usage Data
  EXPORTING
    iv_pod_int_ui = SPACE       " int_ui        Internal Key for Point of Delivery
    iv_grid_id =                " grid_id       Grid
    iv_grid_level =             " grid_level    Grid Level
    iv_langu = SY-LANGU         " sy-langu      SAP System, Current Language
*   iv_date = SY-DATUM          " sy-datum      Date and Time, Current (Application Server) Date
    iv_from =                   " abzeitsch     Date from Which a Time Slice is Valid
    iv_to =                     " biszeitsch    Date at Which a Time Slice Expires
  IMPORTING
    ev_grid_id =                " grid_id       Grid
    ev_grid_name =              " grid_name     Grid Description
    ev_service_prov =           " service_prov  Service Providers
    ev_sp_name =                " service_prov_text  Name of Vendor
    et_gridusage_data =         " ecrm_gridusage_data_tab  Rate Data and Prices for Grid, Including Price Categories
  EXCEPTIONS
    NOT_FOUND = 1               "
    NO_RATES_FOUND = 2          "
    .  "  ECRM_READ_GRIDUSAGE_DATA

ABAP code example for Function Module ECRM_READ_GRIDUSAGE_DATA





The ABAP code below is a full code listing to execute function module ECRM_READ_GRIDUSAGE_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_ev_grid_id  TYPE GRID_ID ,
ld_ev_grid_name  TYPE GRID_NAME ,
ld_ev_service_prov  TYPE SERVICE_PROV ,
ld_ev_sp_name  TYPE SERVICE_PROV_TEXT ,
ld_et_gridusage_data  TYPE ECRM_GRIDUSAGE_DATA_TAB .

DATA(ld_iv_pod_int_ui) = 'Check type of data required'.
DATA(ld_iv_grid_id) = 'Check type of data required'.
DATA(ld_iv_grid_level) = 'Check type of data required'.
DATA(ld_iv_langu) = 'Check type of data required'.
DATA(ld_iv_date) = '20210129'.
DATA(ld_iv_from) = '20210129'.
DATA(ld_iv_to) = '20210129'. . CALL FUNCTION 'ECRM_READ_GRIDUSAGE_DATA' EXPORTING iv_pod_int_ui = ld_iv_pod_int_ui iv_grid_id = ld_iv_grid_id iv_grid_level = ld_iv_grid_level iv_langu = ld_iv_langu * iv_date = ld_iv_date iv_from = ld_iv_from iv_to = ld_iv_to IMPORTING ev_grid_id = ld_ev_grid_id ev_grid_name = ld_ev_grid_name ev_service_prov = ld_ev_service_prov ev_sp_name = ld_ev_sp_name et_gridusage_data = ld_et_gridusage_data EXCEPTIONS NOT_FOUND = 1 NO_RATES_FOUND = 2 . " ECRM_READ_GRIDUSAGE_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 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_ev_grid_id  TYPE GRID_ID ,
ld_iv_pod_int_ui  TYPE INT_UI ,
ld_ev_grid_name  TYPE GRID_NAME ,
ld_iv_grid_id  TYPE GRID_ID ,
ld_ev_service_prov  TYPE SERVICE_PROV ,
ld_iv_grid_level  TYPE GRID_LEVEL ,
ld_ev_sp_name  TYPE SERVICE_PROV_TEXT ,
ld_iv_langu  TYPE SY-LANGU ,
ld_et_gridusage_data  TYPE ECRM_GRIDUSAGE_DATA_TAB ,
ld_iv_date  TYPE SY-DATUM ,
ld_iv_from  TYPE ABZEITSCH ,
ld_iv_to  TYPE BISZEITSCH .

ld_iv_pod_int_ui = '20210129'.
ld_iv_grid_id = '20210129'.
ld_iv_grid_level = '20210129'.
ld_iv_langu = 'Check type of data required'.
ld_iv_date = '20210129'.
ld_iv_from = '20210129'.
ld_iv_to = '20210129'.

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