SAP CMAC_PRICING_SM Function Module for Pricing for Module in CM Student Accounting
CMAC_PRICING_SM is a standard cmac pricing sm SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Pricing for Module in CM Student Accounting 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 pricing sm FM, simply by entering the name CMAC_PRICING_SM into the relevant SAP transaction such as SE37 or SE38.
Function Group: CMACFEE1
Program Name: SAPLCMACFEE1
Main Program: SAPLCMACFEE1
Appliation area: H
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function CMAC_PRICING_SM 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_PRICING_SM'"Pricing for Module in CM Student Accounting.
EXPORTING
IV_SWITCH_AD = "X: Store additional deatils (price per course)
IS_ST_DATA = "Student Info for CM Student Accounting
IT_SM_DATA = "Table Type for Module in CM Student Acct.
IV_PRIPROC = "Procedure (pricing, output control, acct. det., costing,...)
IS_FEE_CONTROL = "Fee Calculation Control for CM Student Acct.
IMPORTING
ET_FEE_TYPE = "Fee Type Table for CM Student Acct.
ET_FEEDOC_AD = "
ET_FEE_TYPE_EXC = "Gebührenartentabelle für CM Studentenkonto-Verwaltung
TABLES
* CT_LOG_TAB = "Return parameter for error message
EXCEPTIONS
NO_STUDENT_DATA = 1 NO_PRICING_PROC = 2 NO_ACTKEY_ASSIGNED = 3 CO_ASSIGNMENT_ERROR = 4 DDS_EVALUATION_ERROR = 5 PRICING_ERROR = 6
IMPORTING Parameters details for CMAC_PRICING_SM
IV_SWITCH_AD - X: Store additional deatils (price per course)
Data type: BOOLE_DOptional: No
Call by Reference: Yes
IS_ST_DATA - Student Info for CM Student Accounting
Data type: CMAC_STOptional: No
Call by Reference: Yes
IT_SM_DATA - Table Type for Module in CM Student Acct.
Data type: CMAC_T_SMOptional: No
Call by Reference: Yes
IV_PRIPROC - Procedure (pricing, output control, acct. det., costing,...)
Data type: KOMK-KALSMOptional: No
Call by Reference: Yes
IS_FEE_CONTROL - Fee Calculation Control for CM Student Acct.
Data type: CMAC_FEE_CONTROLOptional: No
Call by Reference: Yes
EXPORTING Parameters details for CMAC_PRICING_SM
ET_FEE_TYPE - Fee Type Table for CM Student Acct.
Data type: CMAC_T_FEE_TYPEOptional: No
Call by Reference: Yes
ET_FEEDOC_AD -
Data type: CMAC_ITEMRES_TOptional: No
Call by Reference: Yes
ET_FEE_TYPE_EXC - Gebührenartentabelle für CM Studentenkonto-Verwaltung
Data type: CMAC_T_FEE_TYPEOptional: No
Call by Reference: Yes
TABLES Parameters details for CMAC_PRICING_SM
CT_LOG_TAB - Return parameter for error message
Data type: PIQ_ERROR_STRUCTUREOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
NO_STUDENT_DATA - No student data
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_PRICING_PROC - No pricing procedure
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_ACTKEY_ASSIGNED - No account key assigned to this pricing procedure
Data type:Optional: No
Call by Reference: Yes
CO_ASSIGNMENT_ERROR - CO account assignment error
Data type:Optional: No
Call by Reference: Yes
DDS_EVALUATION_ERROR - DDS evaluation error
Data type:Optional: No
Call by Reference: Yes
PRICING_ERROR - Pricing error
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for CMAC_PRICING_SM 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_ct_log_tab | TYPE STANDARD TABLE OF PIQ_ERROR_STRUCTURE, " | |||
lv_et_fee_type | TYPE CMAC_T_FEE_TYPE, " | |||
lv_iv_switch_ad | TYPE BOOLE_D, " | |||
lv_no_student_data | TYPE BOOLE_D, " | |||
lv_is_st_data | TYPE CMAC_ST, " | |||
lv_et_feedoc_ad | TYPE CMAC_ITEMRES_T, " | |||
lv_no_pricing_proc | TYPE CMAC_ITEMRES_T, " | |||
lv_it_sm_data | TYPE CMAC_T_SM, " | |||
lv_et_fee_type_exc | TYPE CMAC_T_FEE_TYPE, " | |||
lv_no_actkey_assigned | TYPE CMAC_T_FEE_TYPE, " | |||
lv_iv_priproc | TYPE KOMK-KALSM, " | |||
lv_co_assignment_error | TYPE KOMK, " | |||
lv_is_fee_control | TYPE CMAC_FEE_CONTROL, " | |||
lv_dds_evaluation_error | TYPE CMAC_FEE_CONTROL, " | |||
lv_pricing_error | TYPE CMAC_FEE_CONTROL. " |
  CALL FUNCTION 'CMAC_PRICING_SM' "Pricing for Module in CM Student Accounting |
EXPORTING | ||
IV_SWITCH_AD | = lv_iv_switch_ad | |
IS_ST_DATA | = lv_is_st_data | |
IT_SM_DATA | = lv_it_sm_data | |
IV_PRIPROC | = lv_iv_priproc | |
IS_FEE_CONTROL | = lv_is_fee_control | |
IMPORTING | ||
ET_FEE_TYPE | = lv_et_fee_type | |
ET_FEEDOC_AD | = lv_et_feedoc_ad | |
ET_FEE_TYPE_EXC | = lv_et_fee_type_exc | |
TABLES | ||
CT_LOG_TAB | = lt_ct_log_tab | |
EXCEPTIONS | ||
NO_STUDENT_DATA = 1 | ||
NO_PRICING_PROC = 2 | ||
NO_ACTKEY_ASSIGNED = 3 | ||
CO_ASSIGNMENT_ERROR = 4 | ||
DDS_EVALUATION_ERROR = 5 | ||
PRICING_ERROR = 6 | ||
. " CMAC_PRICING_SM |
ABAP code using 7.40 inline data declarations to call FM CMAC_PRICING_SM
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 KALSM FROM KOMK INTO @DATA(ld_iv_priproc). | ||||
Search for further information about these or an SAP related objects