SAP MB_CALCULATE_VALUES Function Module for NOTRANSL: Die Buchungsbeträge der Warenbewegung werden gerechnet
MB_CALCULATE_VALUES is a standard mb calculate values 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: Die Buchungsbeträge der Warenbewegung werden gerechnet 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 mb calculate values FM, simply by entering the name MB_CALCULATE_VALUES into the relevant SAP transaction such as SE37 or SE38.
Function Group: MBGB
Program Name: SAPLMBGB
Main Program: SAPLMBGB
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function MB_CALCULATE_VALUES 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 'MB_CALCULATE_VALUES'"NOTRANSL: Die Buchungsbeträge der Warenbewegung werden gerechnet.
EXPORTING
DM07M = "
* XCHECK = ' ' "
* XLBBEW = ' ' "
MKPF = "
MSEG = "
VM07M = "
* MBEQU = ' ' "
* GLVOR = "
* KURST = "
* BRAZIL = ' ' "
* XMBWL = ' ' "
IMPORTING
DM07M = "
MSEG = "
VM07M = "
X_FWDIF = "
X_SHFWDIF = "
X_SHWDIF = "
TABLES
X156W = "
XZCXCB = "
XZCXCM = "
YEKBNK = "
* YEKBNK_CR = "
* YEBEFU_CR = "
* YFBEFU_CR = "
XEBEW = "
XQBEW = "
XOBEW = "
* ZEKBE_CR = "
XEKBN = "
* ZAUFBE_CR = "
* XEKWV = "
* XEKBNK_KDM = "Purch. Fields Inventory Mgmt Overheads Exch. Rate Difference
XEKBV = "
XEKLB = "
XEKLS = "
XEKWS = "
XFAWS = "
XFAWV = "
XMBEW = "
IMPORTING Parameters details for MB_CALCULATE_VALUES
DM07M -
Data type: DM07MOptional: No
Call by Reference: No ( called with pass by value option)
XCHECK -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: Yes
XLBBEW -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
MKPF -
Data type: MKPFOptional: No
Call by Reference: No ( called with pass by value option)
MSEG -
Data type: MSEGOptional: No
Call by Reference: No ( called with pass by value option)
VM07M -
Data type: VM07MOptional: No
Call by Reference: No ( called with pass by value option)
MBEQU -
Data type: TCURM-MBEQUDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
GLVOR -
Data type: ACCHD-GLVOROptional: Yes
Call by Reference: No ( called with pass by value option)
KURST -
Data type: T003-KURSTOptional: Yes
Call by Reference: No ( called with pass by value option)
BRAZIL -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
XMBWL -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: Yes
EXPORTING Parameters details for MB_CALCULATE_VALUES
DM07M -
Data type: DM07MOptional: No
Call by Reference: No ( called with pass by value option)
MSEG -
Data type: MSEGOptional: No
Call by Reference: No ( called with pass by value option)
VM07M -
Data type: VM07MOptional: No
Call by Reference: No ( called with pass by value option)
X_FWDIF -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
X_SHFWDIF -
Data type:Optional: No
Call by Reference: Yes
X_SHWDIF -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for MB_CALCULATE_VALUES
X156W -
Data type: T156WOptional: No
Call by Reference: No ( called with pass by value option)
XZCXCB -
Data type: ZCXCBOptional: No
Call by Reference: No ( called with pass by value option)
XZCXCM -
Data type: ZCXCMOptional: No
Call by Reference: No ( called with pass by value option)
YEKBNK -
Data type: EKBNKOptional: No
Call by Reference: No ( called with pass by value option)
YEKBNK_CR -
Data type: EKBNK_CROptional: Yes
Call by Reference: No ( called with pass by value option)
YEBEFU_CR -
Data type: EBEFU_CROptional: Yes
Call by Reference: No ( called with pass by value option)
YFBEFU_CR -
Data type: FBEFU_CROptional: Yes
Call by Reference: No ( called with pass by value option)
XEBEW -
Data type: SEBEWOptional: No
Call by Reference: No ( called with pass by value option)
XQBEW -
Data type: SQBEWOptional: No
Call by Reference: No ( called with pass by value option)
XOBEW -
Data type: SOBEWOptional: No
Call by Reference: No ( called with pass by value option)
ZEKBE_CR -
Data type: CKI_EKBECROptional: Yes
Call by Reference: No ( called with pass by value option)
XEKBN -
Data type: SEKBNOptional: No
Call by Reference: No ( called with pass by value option)
ZAUFBE_CR -
Data type: CKI_AUFBE_CROptional: Yes
Call by Reference: No ( called with pass by value option)
XEKWV -
Data type: SEKWVOptional: Yes
Call by Reference: No ( called with pass by value option)
XEKBNK_KDM - Purch. Fields Inventory Mgmt Overheads Exch. Rate Difference
Data type: EKBNK_KDMOptional: Yes
Call by Reference: Yes
XEKBV -
Data type: SEKBVOptional: No
Call by Reference: No ( called with pass by value option)
XEKLB -
Data type: SEKLBOptional: No
Call by Reference: No ( called with pass by value option)
XEKLS -
Data type: SEKLSOptional: No
Call by Reference: No ( called with pass by value option)
XEKWS -
Data type: SEKWSOptional: No
Call by Reference: No ( called with pass by value option)
XFAWS -
Data type: SFAWSOptional: No
Call by Reference: No ( called with pass by value option)
XFAWV -
Data type: SFAWVOptional: No
Call by Reference: No ( called with pass by value option)
XMBEW -
Data type: SMBEWOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MB_CALCULATE_VALUES 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_dm07m | TYPE DM07M, " | |||
lv_dm07m | TYPE DM07M, " | |||
lt_x156w | TYPE STANDARD TABLE OF T156W, " | |||
lv_xcheck | TYPE C, " SPACE | |||
lt_xzcxcb | TYPE STANDARD TABLE OF ZCXCB, " | |||
lv_xlbbew | TYPE C, " SPACE | |||
lt_xzcxcm | TYPE STANDARD TABLE OF ZCXCM, " | |||
lt_yekbnk | TYPE STANDARD TABLE OF EKBNK, " | |||
lt_yekbnk_cr | TYPE STANDARD TABLE OF EKBNK_CR, " | |||
lt_yebefu_cr | TYPE STANDARD TABLE OF EBEFU_CR, " | |||
lt_yfbefu_cr | TYPE STANDARD TABLE OF FBEFU_CR, " | |||
lt_xebew | TYPE STANDARD TABLE OF SEBEW, " | |||
lt_xqbew | TYPE STANDARD TABLE OF SQBEW, " | |||
lt_xobew | TYPE STANDARD TABLE OF SOBEW, " | |||
lt_zekbe_cr | TYPE STANDARD TABLE OF CKI_EKBECR, " | |||
lv_mkpf | TYPE MKPF, " | |||
lv_mseg | TYPE MSEG, " | |||
lt_xekbn | TYPE STANDARD TABLE OF SEKBN, " | |||
lt_zaufbe_cr | TYPE STANDARD TABLE OF CKI_AUFBE_CR, " | |||
lt_xekwv | TYPE STANDARD TABLE OF SEKWV, " | |||
lt_xekbnk_kdm | TYPE STANDARD TABLE OF EKBNK_KDM, " | |||
lv_mseg | TYPE MSEG, " | |||
lv_vm07m | TYPE VM07M, " | |||
lt_xekbv | TYPE STANDARD TABLE OF SEKBV, " | |||
lv_vm07m | TYPE VM07M, " | |||
lt_xeklb | TYPE STANDARD TABLE OF SEKLB, " | |||
lv_x_fwdif | TYPE SEKLB, " | |||
lv_mbequ | TYPE TCURM-MBEQU, " SPACE | |||
lt_xekls | TYPE STANDARD TABLE OF SEKLS, " | |||
lv_x_shfwdif | TYPE SEKLS, " | |||
lv_glvor | TYPE ACCHD-GLVOR, " | |||
lt_xekws | TYPE STANDARD TABLE OF SEKWS, " | |||
lv_x_shwdif | TYPE SEKWS, " | |||
lv_kurst | TYPE T003-KURST, " | |||
lt_xfaws | TYPE STANDARD TABLE OF SFAWS, " | |||
lt_xfawv | TYPE STANDARD TABLE OF SFAWV, " | |||
lv_brazil | TYPE C, " SPACE | |||
lt_xmbew | TYPE STANDARD TABLE OF SMBEW, " | |||
lv_xmbwl | TYPE C. " SPACE |
  CALL FUNCTION 'MB_CALCULATE_VALUES' "NOTRANSL: Die Buchungsbeträge der Warenbewegung werden gerechnet |
EXPORTING | ||
DM07M | = lv_dm07m | |
XCHECK | = lv_xcheck | |
XLBBEW | = lv_xlbbew | |
MKPF | = lv_mkpf | |
MSEG | = lv_mseg | |
VM07M | = lv_vm07m | |
MBEQU | = lv_mbequ | |
GLVOR | = lv_glvor | |
KURST | = lv_kurst | |
BRAZIL | = lv_brazil | |
XMBWL | = lv_xmbwl | |
IMPORTING | ||
DM07M | = lv_dm07m | |
MSEG | = lv_mseg | |
VM07M | = lv_vm07m | |
X_FWDIF | = lv_x_fwdif | |
X_SHFWDIF | = lv_x_shfwdif | |
X_SHWDIF | = lv_x_shwdif | |
TABLES | ||
X156W | = lt_x156w | |
XZCXCB | = lt_xzcxcb | |
XZCXCM | = lt_xzcxcm | |
YEKBNK | = lt_yekbnk | |
YEKBNK_CR | = lt_yekbnk_cr | |
YEBEFU_CR | = lt_yebefu_cr | |
YFBEFU_CR | = lt_yfbefu_cr | |
XEBEW | = lt_xebew | |
XQBEW | = lt_xqbew | |
XOBEW | = lt_xobew | |
ZEKBE_CR | = lt_zekbe_cr | |
XEKBN | = lt_xekbn | |
ZAUFBE_CR | = lt_zaufbe_cr | |
XEKWV | = lt_xekwv | |
XEKBNK_KDM | = lt_xekbnk_kdm | |
XEKBV | = lt_xekbv | |
XEKLB | = lt_xeklb | |
XEKLS | = lt_xekls | |
XEKWS | = lt_xekws | |
XFAWS | = lt_xfaws | |
XFAWV | = lt_xfawv | |
XMBEW | = lt_xmbew | |
. " MB_CALCULATE_VALUES |
ABAP code using 7.40 inline data declarations to call FM MB_CALCULATE_VALUES
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_xcheck) | = ' '. | |||
DATA(ld_xlbbew) | = ' '. | |||
"SELECT single MBEQU FROM TCURM INTO @DATA(ld_mbequ). | ||||
DATA(ld_mbequ) | = ' '. | |||
"SELECT single GLVOR FROM ACCHD INTO @DATA(ld_glvor). | ||||
"SELECT single KURST FROM T003 INTO @DATA(ld_kurst). | ||||
DATA(ld_brazil) | = ' '. | |||
DATA(ld_xmbwl) | = ' '. | |||
Search for further information about these or an SAP related objects