SAP MM_CALCULATION_RULE Function Module for NOTRANSL: Ermittelung des Kalkulationschemas zur Abrechnung Absprachen Ein









MM_CALCULATION_RULE is a standard mm calculation rule SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Ermittelung des Kalkulationschemas zur Abrechnung Absprachen Ein 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 mm calculation rule FM, simply by entering the name MM_CALCULATION_RULE into the relevant SAP transaction such as SE37 or SE38.

Function Group: WN05
Program Name: SAPLWN05
Main Program: SAPLWN05
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function MM_CALCULATION_RULE 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 'MM_CALCULATION_RULE'"NOTRANSL: Ermittelung des Kalkulationschemas zur Abrechnung Absprachen Ein
EXPORTING
LIFNR = "Vendor Number
EKORG = "Purchasing Organization
* I_T024E = ' ' "
* I_LFA1 = ' ' "
* I_LFM1 = ' ' "
* I_TMKS = ' ' "

IMPORTING
KALSM = "
KALBO = "

EXCEPTIONS
INVALID_EKORG = 1 INVALID_LIFNR = 2 INVALID_LIFNR_EKORG = 3 MISSING_CALC_RULE = 4 NOT_BONUS = 5
.



IMPORTING Parameters details for MM_CALCULATION_RULE

LIFNR - Vendor Number

Data type: LFA1-LIFNR
Optional: No
Call by Reference: No ( called with pass by value option)

EKORG - Purchasing Organization

Data type: LFM1-EKORG
Optional: No
Call by Reference: No ( called with pass by value option)

I_T024E -

Data type: T024E
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_LFA1 -

Data type: LFA1
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_LFM1 -

Data type: LFM1
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_TMKS -

Data type: TMKS
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for MM_CALCULATION_RULE

KALSM -

Data type: TMKS-KALSM
Optional: No
Call by Reference: Yes

KALBO -

Data type: TMKS-KALBO
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

INVALID_EKORG -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

INVALID_LIFNR -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

INVALID_LIFNR_EKORG -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

MISSING_CALC_RULE -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NOT_BONUS -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for MM_CALCULATION_RULE 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_kalsm  TYPE TMKS-KALSM, "   
lv_lifnr  TYPE LFA1-LIFNR, "   
lv_invalid_ekorg  TYPE LFA1, "   
lv_ekorg  TYPE LFM1-EKORG, "   
lv_kalbo  TYPE TMKS-KALBO, "   
lv_invalid_lifnr  TYPE TMKS, "   
lv_i_t024e  TYPE T024E, "   SPACE
lv_invalid_lifnr_ekorg  TYPE T024E, "   
lv_i_lfa1  TYPE LFA1, "   SPACE
lv_missing_calc_rule  TYPE LFA1, "   
lv_i_lfm1  TYPE LFM1, "   SPACE
lv_not_bonus  TYPE LFM1, "   
lv_i_tmks  TYPE TMKS. "   SPACE

  CALL FUNCTION 'MM_CALCULATION_RULE'  "NOTRANSL: Ermittelung des Kalkulationschemas zur Abrechnung Absprachen Ein
    EXPORTING
         LIFNR = lv_lifnr
         EKORG = lv_ekorg
         I_T024E = lv_i_t024e
         I_LFA1 = lv_i_lfa1
         I_LFM1 = lv_i_lfm1
         I_TMKS = lv_i_tmks
    IMPORTING
         KALSM = lv_kalsm
         KALBO = lv_kalbo
    EXCEPTIONS
        INVALID_EKORG = 1
        INVALID_LIFNR = 2
        INVALID_LIFNR_EKORG = 3
        MISSING_CALC_RULE = 4
        NOT_BONUS = 5
. " MM_CALCULATION_RULE




ABAP code using 7.40 inline data declarations to call FM MM_CALCULATION_RULE

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 TMKS INTO @DATA(ld_kalsm).
 
"SELECT single LIFNR FROM LFA1 INTO @DATA(ld_lifnr).
 
 
"SELECT single EKORG FROM LFM1 INTO @DATA(ld_ekorg).
 
"SELECT single KALBO FROM TMKS INTO @DATA(ld_kalbo).
 
 
DATA(ld_i_t024e) = ' '.
 
 
DATA(ld_i_lfa1) = ' '.
 
 
DATA(ld_i_lfm1) = ' '.
 
 
DATA(ld_i_tmks) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!