SAP FRE_MD_DIF_INIT_CREATE Function Module for Creation of DIF occurences for initial load
FRE_MD_DIF_INIT_CREATE is a standard fre md dif init create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Creation of DIF occurences for initial load 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 fre md dif init create FM, simply by entering the name FRE_MD_DIF_INIT_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: FRE_MD_DIF_OUT
Program Name: SAPLFRE_MD_DIF_OUT
Main Program: SAPLFRE_MD_DIF_OUT
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FRE_MD_DIF_INIT_CREATE 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 'FRE_MD_DIF_INIT_CREATE'"Creation of DIF occurences for initial load.
EXPORTING
IS_SEND_OPTION = "Maintain Basic Settings for Data Transfer
* IP_SAVE_OBJECTS = 'X' "save sent objects into file
IP_CALLING_PROCESS = "Current Interface Process: Initial or Delta Load
IP_WO_ABI_CHECK = "Anew full supply for promotions
IT_ABI_HEAD_EXIST = "Table type for FRE_DB_ABI_HEAD
IT_WAKH = "Promotion header data
IT_WAKP = "Table Type for DB Table WAKP
IT_WALE = "Material to store assignment to promotion
IT_EKPO = "Purchasing document item (various fields)
TABLES
IT_AUVZ = "Distribution Center
IT_AUFI = "Allocation Table, Document Sub-item, Stores
EXCEPTIONS
NOTHING_TO_DO = 1
IMPORTING Parameters details for FRE_MD_DIF_INIT_CREATE
IS_SEND_OPTION - Maintain Basic Settings for Data Transfer
Data type: FRE_SEND_OPTIONOptional: No
Call by Reference: Yes
IP_SAVE_OBJECTS - save sent objects into file
Data type: XFELDDefault: 'X'
Optional: Yes
Call by Reference: Yes
IP_CALLING_PROCESS - Current Interface Process: Initial or Delta Load
Data type: FRE_ACTUAL_PROCESSOptional: No
Call by Reference: Yes
IP_WO_ABI_CHECK - Anew full supply for promotions
Data type: FRE_DIF_WO_ABI_CHECKOptional: No
Call by Reference: Yes
IT_ABI_HEAD_EXIST - Table type for FRE_DB_ABI_HEAD
Data type: FRE_DB_ABI_HEAD_TTYOptional: No
Call by Reference: Yes
IT_WAKH - Promotion header data
Data type: FRE_WAKH_TTYOptional: No
Call by Reference: Yes
IT_WAKP - Table Type for DB Table WAKP
Data type: WAKP_TABOptional: No
Call by Reference: Yes
IT_WALE - Material to store assignment to promotion
Data type: FRE_WALE_TTYOptional: No
Call by Reference: Yes
IT_EKPO - Purchasing document item (various fields)
Data type: FRE_EKPO_TTYOptional: No
Call by Reference: Yes
TABLES Parameters details for FRE_MD_DIF_INIT_CREATE
IT_AUVZ - Distribution Center
Data type: AUVZOptional: No
Call by Reference: Yes
IT_AUFI - Allocation Table, Document Sub-item, Stores
Data type: AUFIOptional: No
Call by Reference: Yes
EXCEPTIONS details
NOTHING_TO_DO - No data existing
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for FRE_MD_DIF_INIT_CREATE 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_it_auvz | TYPE STANDARD TABLE OF AUVZ, " | |||
| lv_nothing_to_do | TYPE AUVZ, " | |||
| lv_is_send_option | TYPE FRE_SEND_OPTION, " | |||
| lt_it_aufi | TYPE STANDARD TABLE OF AUFI, " | |||
| lv_ip_save_objects | TYPE XFELD, " 'X' | |||
| lv_ip_calling_process | TYPE FRE_ACTUAL_PROCESS, " | |||
| lv_ip_wo_abi_check | TYPE FRE_DIF_WO_ABI_CHECK, " | |||
| lv_it_abi_head_exist | TYPE FRE_DB_ABI_HEAD_TTY, " | |||
| lv_it_wakh | TYPE FRE_WAKH_TTY, " | |||
| lv_it_wakp | TYPE WAKP_TAB, " | |||
| lv_it_wale | TYPE FRE_WALE_TTY, " | |||
| lv_it_ekpo | TYPE FRE_EKPO_TTY. " |
|   CALL FUNCTION 'FRE_MD_DIF_INIT_CREATE' "Creation of DIF occurences for initial load |
| EXPORTING | ||
| IS_SEND_OPTION | = lv_is_send_option | |
| IP_SAVE_OBJECTS | = lv_ip_save_objects | |
| IP_CALLING_PROCESS | = lv_ip_calling_process | |
| IP_WO_ABI_CHECK | = lv_ip_wo_abi_check | |
| IT_ABI_HEAD_EXIST | = lv_it_abi_head_exist | |
| IT_WAKH | = lv_it_wakh | |
| IT_WAKP | = lv_it_wakp | |
| IT_WALE | = lv_it_wale | |
| IT_EKPO | = lv_it_ekpo | |
| TABLES | ||
| IT_AUVZ | = lt_it_auvz | |
| IT_AUFI | = lt_it_aufi | |
| EXCEPTIONS | ||
| NOTHING_TO_DO = 1 | ||
| . " FRE_MD_DIF_INIT_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM FRE_MD_DIF_INIT_CREATE
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_ip_save_objects) | = 'X'. | |||
Search for further information about these or an SAP related objects