SAP CMAC_FEE_ACC_ASSIGNMENT_GET Function Module for Get CO Account Assignment
CMAC_FEE_ACC_ASSIGNMENT_GET is a standard cmac fee acc assignment get SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Get CO Account Assignment 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 cmac fee acc assignment get FM, simply by entering the name CMAC_FEE_ACC_ASSIGNMENT_GET into the relevant SAP transaction such as SE37 or SE38.
Function Group: CMACFEE1
Program Name: SAPLCMACFEE1
Main Program: SAPLCMACFEE1
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CMAC_FEE_ACC_ASSIGNMENT_GET 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 'CMAC_FEE_ACC_ASSIGNMENT_GET'"Get CO Account Assignment.
EXPORTING
IV_ACTKEY = "Account key
IV_PERSL = "Key for period allocation
IS_STINFO = "Student Information
* IS_SCINFO = "Program of Study
* IS_SMINFO = "Modules Information
IMPORTING
EV_BUKRS = "Company Code
TABLES
ET_PERCT = "Allocation rule for CO objects
* CT_LOG_TAB = "Return Parameter for Error Message
EXCEPTIONS
CORULE_NOT_FOUND = 1 NO_RULE_ELEMENT_FOUND = 2 NO_ALLOCATION_FOUND = 3
IMPORTING Parameters details for CMAC_FEE_ACC_ASSIGNMENT_GET
IV_ACTKEY - Account key
Data type: T687-KVSL1Optional: No
Call by Reference: Yes
IV_PERSL - Key for period allocation
Data type: CMAC_FEE_CONTROL-PERSLOptional: No
Call by Reference: Yes
IS_STINFO - Student Information
Data type: CMAC_STOptional: No
Call by Reference: Yes
IS_SCINFO - Program of Study
Data type: CMAC_SCOptional: Yes
Call by Reference: Yes
IS_SMINFO - Modules Information
Data type: CMAC_SMOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for CMAC_FEE_ACC_ASSIGNMENT_GET
EV_BUKRS - Company Code
Data type: BUKRSOptional: No
Call by Reference: Yes
TABLES Parameters details for CMAC_FEE_ACC_ASSIGNMENT_GET
ET_PERCT - Allocation rule for CO objects
Data type: PIQ_ACC_OBJ_PERCTOptional: No
Call by Reference: Yes
CT_LOG_TAB - Return Parameter for Error Message
Data type: PIQ_ERROR_STRUCTUREOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
CORULE_NOT_FOUND - CO rule not determined
Data type:Optional: No
Call by Reference: Yes
NO_RULE_ELEMENT_FOUND - No rule element assigned to the current rule
Data type:Optional: No
Call by Reference: Yes
NO_ALLOCATION_FOUND - No allocation found at all
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for CMAC_FEE_ACC_ASSIGNMENT_GET 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: | ||||
| lt_et_perct | TYPE STANDARD TABLE OF PIQ_ACC_OBJ_PERCT, " | |||
| lv_ev_bukrs | TYPE BUKRS, " | |||
| lv_iv_actkey | TYPE T687-KVSL1, " | |||
| lv_corule_not_found | TYPE T687, " | |||
| lv_iv_persl | TYPE CMAC_FEE_CONTROL-PERSL, " | |||
| lt_ct_log_tab | TYPE STANDARD TABLE OF PIQ_ERROR_STRUCTURE, " | |||
| lv_no_rule_element_found | TYPE PIQ_ERROR_STRUCTURE, " | |||
| lv_is_stinfo | TYPE CMAC_ST, " | |||
| lv_no_allocation_found | TYPE CMAC_ST, " | |||
| lv_is_scinfo | TYPE CMAC_SC, " | |||
| lv_is_sminfo | TYPE CMAC_SM. " |
|   CALL FUNCTION 'CMAC_FEE_ACC_ASSIGNMENT_GET' "Get CO Account Assignment |
| EXPORTING | ||
| IV_ACTKEY | = lv_iv_actkey | |
| IV_PERSL | = lv_iv_persl | |
| IS_STINFO | = lv_is_stinfo | |
| IS_SCINFO | = lv_is_scinfo | |
| IS_SMINFO | = lv_is_sminfo | |
| IMPORTING | ||
| EV_BUKRS | = lv_ev_bukrs | |
| TABLES | ||
| ET_PERCT | = lt_et_perct | |
| CT_LOG_TAB | = lt_ct_log_tab | |
| EXCEPTIONS | ||
| CORULE_NOT_FOUND = 1 | ||
| NO_RULE_ELEMENT_FOUND = 2 | ||
| NO_ALLOCATION_FOUND = 3 | ||
| . " CMAC_FEE_ACC_ASSIGNMENT_GET | ||
ABAP code using 7.40 inline data declarations to call FM CMAC_FEE_ACC_ASSIGNMENT_GET
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.| "SELECT single KVSL1 FROM T687 INTO @DATA(ld_iv_actkey). | ||||
| "SELECT single PERSL FROM CMAC_FEE_CONTROL INTO @DATA(ld_iv_persl). | ||||
Search for further information about these or an SAP related objects