SAP Function Modules

CACS_CSC_TRCAS_READ SAP Function module







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

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


Pattern for FM CACS_CSC_TRCAS_READ - CACS CSC TRCAS READ





CALL FUNCTION 'CACS_CSC_TRCAS_READ' "
  EXPORTING
    i_appl =                    " cacsappl
*   i_busi_begin =              " cacs_ctrtbu-busi_begin
*   i_busi_end =                " cacs_ctrtbu-busi_end
*   i_tech_begin =              " cacs_ctrtbu-tech_begin
*   i_tech_end =                " cacs_ctrtbu-tech_end
    i_ctrtst_id =               " cacs_ctrtbu-ctrtst_id
*   i_trgcas_type =             " cacs_trgcas_type
*   i_chk_ess =                 " boole_d
*   i_trgcas_ess = SPACE        " cacs_trgcas_essence
  TABLES
    e_trcas =                   " cacs_s_trcas_info
  EXCEPTIONS
    NO_LED_CURR_FOUND = 1       "
    .  "  CACS_CSC_TRCAS_READ

ABAP code example for Function Module CACS_CSC_TRCAS_READ





The ABAP code below is a full code listing to execute function module CACS_CSC_TRCAS_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_e_trcas  TYPE STANDARD TABLE OF CACS_S_TRCAS_INFO,"TABLES PARAM
wa_e_trcas  LIKE LINE OF it_e_trcas .

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

SELECT single BUSI_BEGIN
FROM CACS_CTRTBU
INTO @DATA(ld_i_busi_begin).


SELECT single BUSI_END
FROM CACS_CTRTBU
INTO @DATA(ld_i_busi_end).


SELECT single TECH_BEGIN
FROM CACS_CTRTBU
INTO @DATA(ld_i_tech_begin).


SELECT single TECH_END
FROM CACS_CTRTBU
INTO @DATA(ld_i_tech_end).


SELECT single CTRTST_ID
FROM CACS_CTRTBU
INTO @DATA(ld_i_ctrtst_id).

DATA(ld_i_trgcas_type) = 'Check type of data required'.
DATA(ld_i_chk_ess) = 'Check type of data required'.
DATA(ld_i_trgcas_ess) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_e_trcas to it_e_trcas. . CALL FUNCTION 'CACS_CSC_TRCAS_READ' EXPORTING i_appl = ld_i_appl * i_busi_begin = ld_i_busi_begin * i_busi_end = ld_i_busi_end * i_tech_begin = ld_i_tech_begin * i_tech_end = ld_i_tech_end i_ctrtst_id = ld_i_ctrtst_id * i_trgcas_type = ld_i_trgcas_type * i_chk_ess = ld_i_chk_ess * i_trgcas_ess = ld_i_trgcas_ess TABLES e_trcas = it_e_trcas EXCEPTIONS NO_LED_CURR_FOUND = 1 . " CACS_CSC_TRCAS_READ
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_i_appl  TYPE CACSAPPL ,
it_e_trcas  TYPE STANDARD TABLE OF CACS_S_TRCAS_INFO ,
wa_e_trcas  LIKE LINE OF it_e_trcas,
ld_i_busi_begin  TYPE CACS_CTRTBU-BUSI_BEGIN ,
ld_i_busi_end  TYPE CACS_CTRTBU-BUSI_END ,
ld_i_tech_begin  TYPE CACS_CTRTBU-TECH_BEGIN ,
ld_i_tech_end  TYPE CACS_CTRTBU-TECH_END ,
ld_i_ctrtst_id  TYPE CACS_CTRTBU-CTRTST_ID ,
ld_i_trgcas_type  TYPE CACS_TRGCAS_TYPE ,
ld_i_chk_ess  TYPE BOOLE_D ,
ld_i_trgcas_ess  TYPE CACS_TRGCAS_ESSENCE .

ld_i_appl = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_e_trcas to it_e_trcas.

SELECT single BUSI_BEGIN
FROM CACS_CTRTBU
INTO ld_i_busi_begin.


SELECT single BUSI_END
FROM CACS_CTRTBU
INTO ld_i_busi_end.


SELECT single TECH_BEGIN
FROM CACS_CTRTBU
INTO ld_i_tech_begin.


SELECT single TECH_END
FROM CACS_CTRTBU
INTO ld_i_tech_end.


SELECT single CTRTST_ID
FROM CACS_CTRTBU
INTO ld_i_ctrtst_id.

ld_i_trgcas_type = 'Check type of data required'.
ld_i_chk_ess = 'Check type of data required'.
ld_i_trgcas_ess = 'Check type of data required'.

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