SAP Function Modules

CACS00_CASE_READ_BY_BUSCASE SAP Function module







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

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


Pattern for FM CACS00_CASE_READ_BY_BUSCASE - CACS00 CASE READ BY BUSCASE





CALL FUNCTION 'CACS00_CASE_READ_BY_BUSCASE' "
  EXPORTING
    i_busobj_type =             " cacsbusobjtyp  Business Object Category
    i_busobj_id =               " cacsbusobjid  ID of Business Object
*   i_busobj_vers =             " cacsversionlong  Version of Master Data or Customizing Object
    i_rem_buscase_typ =         " cacstribuscastyp  Business Transaction Category
    i_rem_buscase_id =          " cacstribuscaseid  Business Transaction ID
*   iflg_valid = 'X'            " boolean_flg   The latest version for each case? (X = Newest)
*   iflg_invalid = SPACE        " boolean_flg   The older versions for each case? (X = Older)
*   iflg_active_only = SPACE    " boolean_flg   Only active version per transaction (X = active only)
*   iflg_consistent_only = SPACE  " boolean_flg  Boolean Variables (X=true, space=false)
*   iflg_failed_only = SPACE    " boolean_flg   Boolean Variables (X=true, space=false)
*   iflg_completed_only = SPACE  " boolean_flg  Boolean Variables (X=true, space=false)
*   iflg_pending_only = SPACE   " boolean_flg   Boolean Variables (X=true, space=false)
*   ib_action =                 " tbz0m-action  BDT activity
*   iflg_archive =              " boolean_flg
  TABLES
*   i_status =                  " cacs_s_status  Status (Listed in Single Values)
    e_case =                    " cacs00_cas    Commission Case
  EXCEPTIONS
    NO_CASE_FOUND = 1           "               No commission case found that matched selection
    .  "  CACS00_CASE_READ_BY_BUSCASE

ABAP code example for Function Module CACS00_CASE_READ_BY_BUSCASE





The ABAP code below is a full code listing to execute function module CACS00_CASE_READ_BY_BUSCASE 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_i_status  TYPE STANDARD TABLE OF CACS_S_STATUS,"TABLES PARAM
wa_i_status  LIKE LINE OF it_i_status ,
it_e_case  TYPE STANDARD TABLE OF CACS00_CAS,"TABLES PARAM
wa_e_case  LIKE LINE OF it_e_case .

DATA(ld_i_busobj_type) = 'Check type of data required'.
DATA(ld_i_busobj_id) = 'Check type of data required'.
DATA(ld_i_busobj_vers) = 'Check type of data required'.
DATA(ld_i_rem_buscase_typ) = 'Check type of data required'.
DATA(ld_i_rem_buscase_id) = 'Check type of data required'.
DATA(ld_iflg_valid) = 'Check type of data required'.
DATA(ld_iflg_invalid) = 'Check type of data required'.
DATA(ld_iflg_active_only) = 'Check type of data required'.
DATA(ld_iflg_consistent_only) = 'Check type of data required'.
DATA(ld_iflg_failed_only) = 'Check type of data required'.
DATA(ld_iflg_completed_only) = 'Check type of data required'.
DATA(ld_iflg_pending_only) = 'Check type of data required'.

SELECT single ACTION
FROM TBZ0M
INTO @DATA(ld_ib_action).

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

"populate fields of struture and append to itab
append wa_i_status to it_i_status.

"populate fields of struture and append to itab
append wa_e_case to it_e_case. . CALL FUNCTION 'CACS00_CASE_READ_BY_BUSCASE' EXPORTING i_busobj_type = ld_i_busobj_type i_busobj_id = ld_i_busobj_id * i_busobj_vers = ld_i_busobj_vers i_rem_buscase_typ = ld_i_rem_buscase_typ i_rem_buscase_id = ld_i_rem_buscase_id * iflg_valid = ld_iflg_valid * iflg_invalid = ld_iflg_invalid * iflg_active_only = ld_iflg_active_only * iflg_consistent_only = ld_iflg_consistent_only * iflg_failed_only = ld_iflg_failed_only * iflg_completed_only = ld_iflg_completed_only * iflg_pending_only = ld_iflg_pending_only * ib_action = ld_ib_action * iflg_archive = ld_iflg_archive TABLES * i_status = it_i_status e_case = it_e_case EXCEPTIONS NO_CASE_FOUND = 1 . " CACS00_CASE_READ_BY_BUSCASE
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_busobj_type  TYPE CACSBUSOBJTYP ,
it_i_status  TYPE STANDARD TABLE OF CACS_S_STATUS ,
wa_i_status  LIKE LINE OF it_i_status,
ld_i_busobj_id  TYPE CACSBUSOBJID ,
it_e_case  TYPE STANDARD TABLE OF CACS00_CAS ,
wa_e_case  LIKE LINE OF it_e_case,
ld_i_busobj_vers  TYPE CACSVERSIONLONG ,
ld_i_rem_buscase_typ  TYPE CACSTRIBUSCASTYP ,
ld_i_rem_buscase_id  TYPE CACSTRIBUSCASEID ,
ld_iflg_valid  TYPE BOOLEAN_FLG ,
ld_iflg_invalid  TYPE BOOLEAN_FLG ,
ld_iflg_active_only  TYPE BOOLEAN_FLG ,
ld_iflg_consistent_only  TYPE BOOLEAN_FLG ,
ld_iflg_failed_only  TYPE BOOLEAN_FLG ,
ld_iflg_completed_only  TYPE BOOLEAN_FLG ,
ld_iflg_pending_only  TYPE BOOLEAN_FLG ,
ld_ib_action  TYPE TBZ0M-ACTION ,
ld_iflg_archive  TYPE BOOLEAN_FLG .

ld_i_busobj_type = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_status to it_i_status.
ld_i_busobj_id = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_e_case to it_e_case.
ld_i_busobj_vers = 'Check type of data required'.
ld_i_rem_buscase_typ = 'Check type of data required'.
ld_i_rem_buscase_id = 'Check type of data required'.
ld_iflg_valid = 'Check type of data required'.
ld_iflg_invalid = 'Check type of data required'.
ld_iflg_active_only = 'Check type of data required'.
ld_iflg_consistent_only = 'Check type of data required'.
ld_iflg_failed_only = 'Check type of data required'.
ld_iflg_completed_only = 'Check type of data required'.
ld_iflg_pending_only = 'Check type of data required'.

SELECT single ACTION
FROM TBZ0M
INTO ld_ib_action.

ld_iflg_archive = '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 CACS00_CASE_READ_BY_BUSCASE or its description.