SAP Function Modules

OIURV_READ_CMCC_DATA SAP Function module - Read Contract Marketing Cost Control Header for selection criteria







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

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


Pattern for FM OIURV_READ_CMCC_DATA - OIURV READ CMCC DATA





CALL FUNCTION 'OIURV_READ_CMCC_DATA' "Read Contract Marketing Cost Control Header for selection criteria
  EXPORTING
    i_cmcc_ct_no =              " roiucp_cmcc-ct_no  Contract Number
*   i_cmcc_mp_no =              " roiucp_cmcc-mp_no  Measurement point number
*   i_cmcc_wl_no =              " roiucp_cmcc-wl_no  Well ID Number
*   i_cmcc_wc_no =              " roiucp_cmcc-wc_no  Well Completion Number
*   i_cmcc_matnr =              " roiucp_cmcc-matnr  Material number
    i_eff_from_dt =             " roiucp_cmcc-eff_from_dt  Effective From Date
    i_eff_to_dt =               " roiucp_cmcc-eff_to_dt  Effective To Date
*   i_ct_no =                   " roiucp_cmcc-ct_no  Contract Number
*   i_wl_no =                   " roiucp_cmcc-wl_no  Well ID Number
*   i_wc_no =                   " roiucp_cmcc-wc_no  Well Completion Number
*   i_mp_no =                   " roiucp_cmcc-mp_no  Measurement point number
  IMPORTING
    e_count =                   " i
  TABLES
    repodata =                  " roiucp_cmcc   Structure for Contract Marketing Cost Control Header
  EXCEPTIONS
    NONE_FOUND = 1              "               No records found
    .  "  OIURV_READ_CMCC_DATA

ABAP code example for Function Module OIURV_READ_CMCC_DATA





The ABAP code below is a full code listing to execute function module OIURV_READ_CMCC_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_e_count  TYPE I ,
it_repodata  TYPE STANDARD TABLE OF ROIUCP_CMCC,"TABLES PARAM
wa_repodata  LIKE LINE OF it_repodata .


DATA(ld_i_cmcc_ct_no) = some text here

DATA(ld_i_cmcc_mp_no) = some text here

DATA(ld_i_cmcc_wl_no) = some text here

DATA(ld_i_cmcc_wc_no) = some text here

DATA(ld_i_cmcc_matnr) = some text here

DATA(ld_i_eff_from_dt) = 20210129

DATA(ld_i_eff_to_dt) = 20210129

DATA(ld_i_ct_no) = some text here

DATA(ld_i_wl_no) = some text here

DATA(ld_i_wc_no) = some text here

DATA(ld_i_mp_no) = some text here

"populate fields of struture and append to itab
append wa_repodata to it_repodata. . CALL FUNCTION 'OIURV_READ_CMCC_DATA' EXPORTING i_cmcc_ct_no = ld_i_cmcc_ct_no * i_cmcc_mp_no = ld_i_cmcc_mp_no * i_cmcc_wl_no = ld_i_cmcc_wl_no * i_cmcc_wc_no = ld_i_cmcc_wc_no * i_cmcc_matnr = ld_i_cmcc_matnr i_eff_from_dt = ld_i_eff_from_dt i_eff_to_dt = ld_i_eff_to_dt * i_ct_no = ld_i_ct_no * i_wl_no = ld_i_wl_no * i_wc_no = ld_i_wc_no * i_mp_no = ld_i_mp_no IMPORTING e_count = ld_e_count TABLES repodata = it_repodata EXCEPTIONS NONE_FOUND = 1 . " OIURV_READ_CMCC_DATA
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_e_count  TYPE I ,
ld_i_cmcc_ct_no  TYPE ROIUCP_CMCC-CT_NO ,
it_repodata  TYPE STANDARD TABLE OF ROIUCP_CMCC ,
wa_repodata  LIKE LINE OF it_repodata,
ld_i_cmcc_mp_no  TYPE ROIUCP_CMCC-MP_NO ,
ld_i_cmcc_wl_no  TYPE ROIUCP_CMCC-WL_NO ,
ld_i_cmcc_wc_no  TYPE ROIUCP_CMCC-WC_NO ,
ld_i_cmcc_matnr  TYPE ROIUCP_CMCC-MATNR ,
ld_i_eff_from_dt  TYPE ROIUCP_CMCC-EFF_FROM_DT ,
ld_i_eff_to_dt  TYPE ROIUCP_CMCC-EFF_TO_DT ,
ld_i_ct_no  TYPE ROIUCP_CMCC-CT_NO ,
ld_i_wl_no  TYPE ROIUCP_CMCC-WL_NO ,
ld_i_wc_no  TYPE ROIUCP_CMCC-WC_NO ,
ld_i_mp_no  TYPE ROIUCP_CMCC-MP_NO .


ld_i_cmcc_ct_no = some text here

"populate fields of struture and append to itab
append wa_repodata to it_repodata.

ld_i_cmcc_mp_no = some text here

ld_i_cmcc_wl_no = some text here

ld_i_cmcc_wc_no = some text here

ld_i_cmcc_matnr = some text here

ld_i_eff_from_dt = 20210129

ld_i_eff_to_dt = 20210129

ld_i_ct_no = some text here

ld_i_wl_no = some text here

ld_i_wc_no = some text here

ld_i_mp_no = 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 OIURV_READ_CMCC_DATA or its description.