SAP Function Modules

FRE_MD_DIF_INIT_CREATE SAP Function module - Creation of DIF occurences for initial load







FRE_MD_DIF_INIT_CREATE is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name FRE_MD_DIF_INIT_CREATE into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: FRE_MD_DIF_OUT
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM FRE_MD_DIF_INIT_CREATE - FRE MD DIF INIT CREATE





CALL FUNCTION 'FRE_MD_DIF_INIT_CREATE' "Creation of DIF occurences for initial load
  EXPORTING
    is_send_option =            " fre_send_option  Maintain Basic Settings for Data Transfer
*   ip_save_objects = 'X'       " xfeld         save sent objects into file
    ip_calling_process =        " fre_actual_process  Current Interface Process: Initial or Delta Load
    ip_wo_abi_check =           " fre_dif_wo_abi_check  Anew full supply for promotions
    it_abi_head_exist =         " fre_db_abi_head_tty  Table type for FRE_DB_ABI_HEAD
    it_wakh =                   " fre_wakh_tty  Promotion header data
    it_wakp =                   " wakp_tab      Table Type for DB Table WAKP
    it_wale =                   " fre_wale_tty  Material to store assignment to promotion
    it_ekpo =                   " fre_ekpo_tty  Purchasing document item (various fields)
  TABLES
    it_auvz =                   " auvz          Distribution Center
    it_aufi =                   " aufi          Allocation Table, Document Sub-item, Stores
  EXCEPTIONS
    NOTHING_TO_DO = 1           "               No data existing
    .  "  FRE_MD_DIF_INIT_CREATE

ABAP code example for Function Module FRE_MD_DIF_INIT_CREATE





The ABAP code below is a full code listing to execute function module FRE_MD_DIF_INIT_CREATE including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
it_it_auvz  TYPE STANDARD TABLE OF AUVZ,"TABLES PARAM
wa_it_auvz  LIKE LINE OF it_it_auvz ,
it_it_aufi  TYPE STANDARD TABLE OF AUFI,"TABLES PARAM
wa_it_aufi  LIKE LINE OF it_it_aufi .

DATA(ld_is_send_option) = 'Check type of data required'.
DATA(ld_ip_save_objects) = 'Check type of data required'.
DATA(ld_ip_calling_process) = 'Check type of data required'.
DATA(ld_ip_wo_abi_check) = 'Check type of data required'.
DATA(ld_it_abi_head_exist) = 'Check type of data required'.
DATA(ld_it_wakh) = 'Check type of data required'.
DATA(ld_it_wakp) = 'Check type of data required'.
DATA(ld_it_wale) = 'Check type of data required'.
DATA(ld_it_ekpo) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_auvz to it_it_auvz.

"populate fields of struture and append to itab
append wa_it_aufi to it_it_aufi. . CALL FUNCTION 'FRE_MD_DIF_INIT_CREATE' EXPORTING is_send_option = ld_is_send_option * ip_save_objects = ld_ip_save_objects ip_calling_process = ld_ip_calling_process ip_wo_abi_check = ld_ip_wo_abi_check it_abi_head_exist = ld_it_abi_head_exist it_wakh = ld_it_wakh it_wakp = ld_it_wakp it_wale = ld_it_wale it_ekpo = ld_it_ekpo TABLES it_auvz = it_it_auvz it_aufi = it_it_aufi EXCEPTIONS NOTHING_TO_DO = 1 . " FRE_MD_DIF_INIT_CREATE
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_is_send_option  TYPE FRE_SEND_OPTION ,
it_it_auvz  TYPE STANDARD TABLE OF AUVZ ,
wa_it_auvz  LIKE LINE OF it_it_auvz,
ld_ip_save_objects  TYPE XFELD ,
it_it_aufi  TYPE STANDARD TABLE OF AUFI ,
wa_it_aufi  LIKE LINE OF it_it_aufi,
ld_ip_calling_process  TYPE FRE_ACTUAL_PROCESS ,
ld_ip_wo_abi_check  TYPE FRE_DIF_WO_ABI_CHECK ,
ld_it_abi_head_exist  TYPE FRE_DB_ABI_HEAD_TTY ,
ld_it_wakh  TYPE FRE_WAKH_TTY ,
ld_it_wakp  TYPE WAKP_TAB ,
ld_it_wale  TYPE FRE_WALE_TTY ,
ld_it_ekpo  TYPE FRE_EKPO_TTY .

ld_is_send_option = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_auvz to it_it_auvz.
ld_ip_save_objects = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_aufi to it_it_aufi.
ld_ip_calling_process = 'Check type of data required'.
ld_ip_wo_abi_check = 'Check type of data required'.
ld_it_abi_head_exist = 'Check type of data required'.
ld_it_wakh = 'Check type of data required'.
ld_it_wakp = 'Check type of data required'.
ld_it_wale = 'Check type of data required'.
ld_it_ekpo = 'Check type of data required'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name FRE_MD_DIF_INIT_CREATE or its description.