SAP Function Modules

CACS_STM_CTR_READ SAP Function module







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

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


Pattern for FM CACS_STM_CTR_READ - CACS STM CTR READ





CALL FUNCTION 'CACS_STM_CTR_READ' "
  EXPORTING
    i_when =                    " cacstimestamp  Key Date
    i_appl =                    " cacsappl      Application
*   i_busitime =                " cacsbusitime  Effective Validity (Time Stamp YYYY.MM.DD hh:mm:ss)
*   i_techtime =                " cacstechtime  Technical Validity (Time Stamp: YYYY.MM.DD hh:mm:ss)
  TABLES
    cacs_back =                 " cacs_ctrtbu   Return Message Tables
    i_vert =                    "               Contract Number
*   i_stm =                     "               Settlement Types
*   i_rem =                     "               Remuneration Types
*   i_si_contract =             " cacs_s_ctrtbu_id  Commission Contracts
  EXCEPTIONS
    CTRTBU_NOT_FOUND = 1        "
    CTRTBU_ERROR = 2            "
    .  "  CACS_STM_CTR_READ

ABAP code example for Function Module CACS_STM_CTR_READ





The ABAP code below is a full code listing to execute function module CACS_STM_CTR_READ 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_cacs_back  TYPE STANDARD TABLE OF CACS_CTRTBU,"TABLES PARAM
wa_cacs_back  LIKE LINE OF it_cacs_back ,
it_i_vert  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_i_vert  LIKE LINE OF it_i_vert ,
it_i_stm  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_i_stm  LIKE LINE OF it_i_stm ,
it_i_rem  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_i_rem  LIKE LINE OF it_i_rem ,
it_i_si_contract  TYPE STANDARD TABLE OF CACS_S_CTRTBU_ID,"TABLES PARAM
wa_i_si_contract  LIKE LINE OF it_i_si_contract .

DATA(ld_i_when) = 'Check type of data required'.
DATA(ld_i_appl) = 'Check type of data required'.
DATA(ld_i_busitime) = 'Check type of data required'.
DATA(ld_i_techtime) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_cacs_back to it_cacs_back.

"populate fields of struture and append to itab
append wa_i_vert to it_i_vert.

"populate fields of struture and append to itab
append wa_i_stm to it_i_stm.

"populate fields of struture and append to itab
append wa_i_rem to it_i_rem.

"populate fields of struture and append to itab
append wa_i_si_contract to it_i_si_contract. . CALL FUNCTION 'CACS_STM_CTR_READ' EXPORTING i_when = ld_i_when i_appl = ld_i_appl * i_busitime = ld_i_busitime * i_techtime = ld_i_techtime TABLES cacs_back = it_cacs_back i_vert = it_i_vert * i_stm = it_i_stm * i_rem = it_i_rem * i_si_contract = it_i_si_contract EXCEPTIONS CTRTBU_NOT_FOUND = 1 CTRTBU_ERROR = 2 . " CACS_STM_CTR_READ
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_i_when  TYPE CACSTIMESTAMP ,
it_cacs_back  TYPE STANDARD TABLE OF CACS_CTRTBU ,
wa_cacs_back  LIKE LINE OF it_cacs_back,
ld_i_appl  TYPE CACSAPPL ,
it_i_vert  TYPE STANDARD TABLE OF STRING ,
wa_i_vert  LIKE LINE OF it_i_vert,
ld_i_busitime  TYPE CACSBUSITIME ,
it_i_stm  TYPE STANDARD TABLE OF STRING ,
wa_i_stm  LIKE LINE OF it_i_stm,
ld_i_techtime  TYPE CACSTECHTIME ,
it_i_rem  TYPE STANDARD TABLE OF STRING ,
wa_i_rem  LIKE LINE OF it_i_rem,
it_i_si_contract  TYPE STANDARD TABLE OF CACS_S_CTRTBU_ID ,
wa_i_si_contract  LIKE LINE OF it_i_si_contract.

ld_i_when = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_cacs_back to it_cacs_back.
ld_i_appl = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_vert to it_i_vert.
ld_i_busitime = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_stm to it_i_stm.
ld_i_techtime = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_rem to it_i_rem.

"populate fields of struture and append to itab
append wa_i_si_contract to it_i_si_contract.

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