SAP DMC_PRECALCULATION Function Module for
DMC_PRECALCULATION is a standard dmc precalculation SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 dmc precalculation FM, simply by entering the name DMC_PRECALCULATION into the relevant SAP transaction such as SE37 or SE38.
Function Group: CNV2
Program Name: SAPLCNV2
Main Program: SAPLCNV2
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function DMC_PRECALCULATION 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 'DMC_PRECALCULATION'".
EXPORTING
IM_TABNAME = "
IM_CLIENT_SPEC = "
IM_SEARCH_DEPTH = "
IM_SEGMENT_SIZE = "
IM_TBL_COUNT = "
IM_REC_SEARCH = "
TABLES
* IM_IT_SETTINGS = "
* IM_IT_CONSTKEY_CHCKTBL = "
EX_IT_PRE_CALC_STG = "
EXCEPTIONS
CALCULATION_ERROR = 1 NO_RANGES_FOUND = 2
IMPORTING Parameters details for DMC_PRECALCULATION
IM_TABNAME -
Data type: DD03L-TABNAMEOptional: No
Call by Reference: No ( called with pass by value option)
IM_CLIENT_SPEC -
Data type: DMC_TYPES-BOOLEANOptional: No
Call by Reference: No ( called with pass by value option)
IM_SEARCH_DEPTH -
Data type: DMC_TYPES-INT4Optional: No
Call by Reference: No ( called with pass by value option)
IM_SEGMENT_SIZE -
Data type: DMC_TYPES-INT4Optional: No
Call by Reference: No ( called with pass by value option)
IM_TBL_COUNT -
Data type: DMC_TYPES-BOOLEANOptional: No
Call by Reference: No ( called with pass by value option)
IM_REC_SEARCH -
Data type: DMC_TYPES-BOOLEANOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for DMC_PRECALCULATION
IM_IT_SETTINGS -
Data type: DMCSTGOptional: Yes
Call by Reference: No ( called with pass by value option)
IM_IT_CONSTKEY_CHCKTBL -
Data type: DMCCHCKTBLOptional: Yes
Call by Reference: No ( called with pass by value option)
EX_IT_PRE_CALC_STG -
Data type: DMCSTGOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
CALCULATION_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_RANGES_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for DMC_PRECALCULATION 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_im_tabname | TYPE DD03L-TABNAME, " | |||
| lt_im_it_settings | TYPE STANDARD TABLE OF DMCSTG, " | |||
| lv_calculation_error | TYPE DMCSTG, " | |||
| lv_im_client_spec | TYPE DMC_TYPES-BOOLEAN, " | |||
| lv_no_ranges_found | TYPE DMC_TYPES, " | |||
| lt_im_it_constkey_chcktbl | TYPE STANDARD TABLE OF DMCCHCKTBL, " | |||
| lv_im_search_depth | TYPE DMC_TYPES-INT4, " | |||
| lt_ex_it_pre_calc_stg | TYPE STANDARD TABLE OF DMCSTG, " | |||
| lv_im_segment_size | TYPE DMC_TYPES-INT4, " | |||
| lv_im_tbl_count | TYPE DMC_TYPES-BOOLEAN, " | |||
| lv_im_rec_search | TYPE DMC_TYPES-BOOLEAN. " |
|   CALL FUNCTION 'DMC_PRECALCULATION' " |
| EXPORTING | ||
| IM_TABNAME | = lv_im_tabname | |
| IM_CLIENT_SPEC | = lv_im_client_spec | |
| IM_SEARCH_DEPTH | = lv_im_search_depth | |
| IM_SEGMENT_SIZE | = lv_im_segment_size | |
| IM_TBL_COUNT | = lv_im_tbl_count | |
| IM_REC_SEARCH | = lv_im_rec_search | |
| TABLES | ||
| IM_IT_SETTINGS | = lt_im_it_settings | |
| IM_IT_CONSTKEY_CHCKTBL | = lt_im_it_constkey_chcktbl | |
| EX_IT_PRE_CALC_STG | = lt_ex_it_pre_calc_stg | |
| EXCEPTIONS | ||
| CALCULATION_ERROR = 1 | ||
| NO_RANGES_FOUND = 2 | ||
| . " DMC_PRECALCULATION | ||
ABAP code using 7.40 inline data declarations to call FM DMC_PRECALCULATION
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 TABNAME FROM DD03L INTO @DATA(ld_im_tabname). | ||||
| "SELECT single BOOLEAN FROM DMC_TYPES INTO @DATA(ld_im_client_spec). | ||||
| "SELECT single INT4 FROM DMC_TYPES INTO @DATA(ld_im_search_depth). | ||||
| "SELECT single INT4 FROM DMC_TYPES INTO @DATA(ld_im_segment_size). | ||||
| "SELECT single BOOLEAN FROM DMC_TYPES INTO @DATA(ld_im_tbl_count). | ||||
| "SELECT single BOOLEAN FROM DMC_TYPES INTO @DATA(ld_im_rec_search). | ||||
Search for further information about these or an SAP related objects