SAP CACS_GET_CONTRACTS Function Module for Selection of Active Commission Contracts
CACS_GET_CONTRACTS is a standard cacs get contracts SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Selection of Active Commission Contracts processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for cacs get contracts FM, simply by entering the name CACS_GET_CONTRACTS into the relevant SAP transaction such as SE37 or SE38.
Function Group: CACS_EXT_CC
Program Name: SAPLCACS_EXT_CC
Main Program: SAPLCACS_EXT_CC
Appliation area:
Release date: 09-Aug-2004
Mode(Normal, Remote etc): Remote-Enabled
Update:
Function CACS_GET_CONTRACTS pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'CACS_GET_CONTRACTS'"Selection of Active Commission Contracts.
EXPORTING
IV_APPL = "Commission Application Identification
* IV_CLC_TIMESTAMP = "Effective Validity (Time Stamp YYYY.MM.DD hh:mm:ss)
* IV_KNW_TIMESTAMP = "Technical Validity (Time Stamp: YYYY.MM.DD hh:mm:ss)
IT_BU_PARTNER = "Business Partner Data
IT_CTRTB_IDS = "Table Type for Contract IDs
* IV_TBMAXSEL = 200 "Maximum Number of Selected Entries
IMPORTING
ET_CTRTBU_ID = "Commission Contract Data
IMPORTING Parameters details for CACS_GET_CONTRACTS
IV_APPL - Commission Application Identification
Data type: CACSAPPLOptional: No
Call by Reference: No ( called with pass by value option)
IV_CLC_TIMESTAMP - Effective Validity (Time Stamp YYYY.MM.DD hh:mm:ss)
Data type: CACSBUSITIMEOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_KNW_TIMESTAMP - Technical Validity (Time Stamp: YYYY.MM.DD hh:mm:ss)
Data type: CACSTECHTIMEOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_BU_PARTNER - Business Partner Data
Data type: CACS_TT_BU_PARTNEROptional: No
Call by Reference: No ( called with pass by value option)
IT_CTRTB_IDS - Table Type for Contract IDs
Data type: CACS_TT_CTRTBUIDOptional: No
Call by Reference: No ( called with pass by value option)
IV_TBMAXSEL - Maximum Number of Selected Entries
Data type: TBMAXSELDefault: 200
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CACS_GET_CONTRACTS
ET_CTRTBU_ID - Commission Contract Data
Data type: CACS_TT_CTRTBU_EVALPMOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CACS_GET_CONTRACTS Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.DATA: | ||||
lv_iv_appl | TYPE CACSAPPL, " | |||
lv_et_ctrtbu_id | TYPE CACS_TT_CTRTBU_EVALPM, " | |||
lv_iv_clc_timestamp | TYPE CACSBUSITIME, " | |||
lv_iv_knw_timestamp | TYPE CACSTECHTIME, " | |||
lv_it_bu_partner | TYPE CACS_TT_BU_PARTNER, " | |||
lv_it_ctrtb_ids | TYPE CACS_TT_CTRTBUID, " | |||
lv_iv_tbmaxsel | TYPE TBMAXSEL. " 200 |
  CALL FUNCTION 'CACS_GET_CONTRACTS' "Selection of Active Commission Contracts |
EXPORTING | ||
IV_APPL | = lv_iv_appl | |
IV_CLC_TIMESTAMP | = lv_iv_clc_timestamp | |
IV_KNW_TIMESTAMP | = lv_iv_knw_timestamp | |
IT_BU_PARTNER | = lv_it_bu_partner | |
IT_CTRTB_IDS | = lv_it_ctrtb_ids | |
IV_TBMAXSEL | = lv_iv_tbmaxsel | |
IMPORTING | ||
ET_CTRTBU_ID | = lv_et_ctrtbu_id | |
. " CACS_GET_CONTRACTS |
ABAP code using 7.40 inline data declarations to call FM CACS_GET_CONTRACTS
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.DATA(ld_iv_tbmaxsel) | = 200. | |||
Search for further information about these or an SAP related objects