SAP Function Modules

W_FRM_ASSIGNMENT_PREPARE SAP Function module







W_FRM_ASSIGNMENT_PREPARE 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 W_FRM_ASSIGNMENT_PREPARE into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM W_FRM_ASSIGNMENT_PREPARE - W FRM ASSIGNMENT PREPARE





CALL FUNCTION 'W_FRM_ASSIGNMENT_PREPARE' "
* EXPORTING
*   i_status =                  "
  TABLES
    t_xi_fret =                 " wfrm_distribution_tab
*   t_mblnr =                   " wfrm_mblnr_tab
*   t_bldat =                   " wfrm_bldat_tab
*   t_mseg =                    " wfrm_red_mseg_tab
*   t_vbap =                    " vbap
*   t_vbep =                    " vbep
*   t_vbup =                    " vbup
*   t_vbfa =                    " vbfa          Document flow
*   t_vbak =                    " vbak
*   t_ekpo =                    " ekpo
*   t_eket =                    " eket
*   t_ekko =                    " ekko
*   t_ekpv =                    " ekpv
*   t_likp =                    " likp
*   t_lips =                    " lips
*   t_vbuk =                    " vbuk
  EXCEPTIONS
    NOTHING_TO_DO = 1           "
    ERROR_DURING_PROCESSING = 2  "
    .  "  W_FRM_ASSIGNMENT_PREPARE

ABAP code example for Function Module W_FRM_ASSIGNMENT_PREPARE





The ABAP code below is a full code listing to execute function module W_FRM_ASSIGNMENT_PREPARE 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_t_xi_fret  TYPE STANDARD TABLE OF WFRM_DISTRIBUTION_TAB,"TABLES PARAM
wa_t_xi_fret  LIKE LINE OF it_t_xi_fret ,
it_t_mblnr  TYPE STANDARD TABLE OF WFRM_MBLNR_TAB,"TABLES PARAM
wa_t_mblnr  LIKE LINE OF it_t_mblnr ,
it_t_bldat  TYPE STANDARD TABLE OF WFRM_BLDAT_TAB,"TABLES PARAM
wa_t_bldat  LIKE LINE OF it_t_bldat ,
it_t_mseg  TYPE STANDARD TABLE OF WFRM_RED_MSEG_TAB,"TABLES PARAM
wa_t_mseg  LIKE LINE OF it_t_mseg ,
it_t_vbap  TYPE STANDARD TABLE OF VBAP,"TABLES PARAM
wa_t_vbap  LIKE LINE OF it_t_vbap ,
it_t_vbep  TYPE STANDARD TABLE OF VBEP,"TABLES PARAM
wa_t_vbep  LIKE LINE OF it_t_vbep ,
it_t_vbup  TYPE STANDARD TABLE OF VBUP,"TABLES PARAM
wa_t_vbup  LIKE LINE OF it_t_vbup ,
it_t_vbfa  TYPE STANDARD TABLE OF VBFA,"TABLES PARAM
wa_t_vbfa  LIKE LINE OF it_t_vbfa ,
it_t_vbak  TYPE STANDARD TABLE OF VBAK,"TABLES PARAM
wa_t_vbak  LIKE LINE OF it_t_vbak ,
it_t_ekpo  TYPE STANDARD TABLE OF EKPO,"TABLES PARAM
wa_t_ekpo  LIKE LINE OF it_t_ekpo ,
it_t_eket  TYPE STANDARD TABLE OF EKET,"TABLES PARAM
wa_t_eket  LIKE LINE OF it_t_eket ,
it_t_ekko  TYPE STANDARD TABLE OF EKKO,"TABLES PARAM
wa_t_ekko  LIKE LINE OF it_t_ekko ,
it_t_ekpv  TYPE STANDARD TABLE OF EKPV,"TABLES PARAM
wa_t_ekpv  LIKE LINE OF it_t_ekpv ,
it_t_likp  TYPE STANDARD TABLE OF LIKP,"TABLES PARAM
wa_t_likp  LIKE LINE OF it_t_likp ,
it_t_lips  TYPE STANDARD TABLE OF LIPS,"TABLES PARAM
wa_t_lips  LIKE LINE OF it_t_lips ,
it_t_vbuk  TYPE STANDARD TABLE OF VBUK,"TABLES PARAM
wa_t_vbuk  LIKE LINE OF it_t_vbuk .

DATA(ld_i_status) = 'some text here'.

"populate fields of struture and append to itab
append wa_t_xi_fret to it_t_xi_fret.

"populate fields of struture and append to itab
append wa_t_mblnr to it_t_mblnr.

"populate fields of struture and append to itab
append wa_t_bldat to it_t_bldat.

"populate fields of struture and append to itab
append wa_t_mseg to it_t_mseg.

"populate fields of struture and append to itab
append wa_t_vbap to it_t_vbap.

"populate fields of struture and append to itab
append wa_t_vbep to it_t_vbep.

"populate fields of struture and append to itab
append wa_t_vbup to it_t_vbup.

"populate fields of struture and append to itab
append wa_t_vbfa to it_t_vbfa.

"populate fields of struture and append to itab
append wa_t_vbak to it_t_vbak.

"populate fields of struture and append to itab
append wa_t_ekpo to it_t_ekpo.

"populate fields of struture and append to itab
append wa_t_eket to it_t_eket.

"populate fields of struture and append to itab
append wa_t_ekko to it_t_ekko.

"populate fields of struture and append to itab
append wa_t_ekpv to it_t_ekpv.

"populate fields of struture and append to itab
append wa_t_likp to it_t_likp.

"populate fields of struture and append to itab
append wa_t_lips to it_t_lips.

"populate fields of struture and append to itab
append wa_t_vbuk to it_t_vbuk. . CALL FUNCTION 'W_FRM_ASSIGNMENT_PREPARE' * EXPORTING * i_status = ld_i_status TABLES t_xi_fret = it_t_xi_fret * t_mblnr = it_t_mblnr * t_bldat = it_t_bldat * t_mseg = it_t_mseg * t_vbap = it_t_vbap * t_vbep = it_t_vbep * t_vbup = it_t_vbup * t_vbfa = it_t_vbfa * t_vbak = it_t_vbak * t_ekpo = it_t_ekpo * t_eket = it_t_eket * t_ekko = it_t_ekko * t_ekpv = it_t_ekpv * t_likp = it_t_likp * t_lips = it_t_lips * t_vbuk = it_t_vbuk EXCEPTIONS NOTHING_TO_DO = 1 ERROR_DURING_PROCESSING = 2 . " W_FRM_ASSIGNMENT_PREPARE
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "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_i_status  TYPE STRING ,
it_t_xi_fret  TYPE STANDARD TABLE OF WFRM_DISTRIBUTION_TAB ,
wa_t_xi_fret  LIKE LINE OF it_t_xi_fret,
it_t_mblnr  TYPE STANDARD TABLE OF WFRM_MBLNR_TAB ,
wa_t_mblnr  LIKE LINE OF it_t_mblnr,
it_t_bldat  TYPE STANDARD TABLE OF WFRM_BLDAT_TAB ,
wa_t_bldat  LIKE LINE OF it_t_bldat,
it_t_mseg  TYPE STANDARD TABLE OF WFRM_RED_MSEG_TAB ,
wa_t_mseg  LIKE LINE OF it_t_mseg,
it_t_vbap  TYPE STANDARD TABLE OF VBAP ,
wa_t_vbap  LIKE LINE OF it_t_vbap,
it_t_vbep  TYPE STANDARD TABLE OF VBEP ,
wa_t_vbep  LIKE LINE OF it_t_vbep,
it_t_vbup  TYPE STANDARD TABLE OF VBUP ,
wa_t_vbup  LIKE LINE OF it_t_vbup,
it_t_vbfa  TYPE STANDARD TABLE OF VBFA ,
wa_t_vbfa  LIKE LINE OF it_t_vbfa,
it_t_vbak  TYPE STANDARD TABLE OF VBAK ,
wa_t_vbak  LIKE LINE OF it_t_vbak,
it_t_ekpo  TYPE STANDARD TABLE OF EKPO ,
wa_t_ekpo  LIKE LINE OF it_t_ekpo,
it_t_eket  TYPE STANDARD TABLE OF EKET ,
wa_t_eket  LIKE LINE OF it_t_eket,
it_t_ekko  TYPE STANDARD TABLE OF EKKO ,
wa_t_ekko  LIKE LINE OF it_t_ekko,
it_t_ekpv  TYPE STANDARD TABLE OF EKPV ,
wa_t_ekpv  LIKE LINE OF it_t_ekpv,
it_t_likp  TYPE STANDARD TABLE OF LIKP ,
wa_t_likp  LIKE LINE OF it_t_likp,
it_t_lips  TYPE STANDARD TABLE OF LIPS ,
wa_t_lips  LIKE LINE OF it_t_lips,
it_t_vbuk  TYPE STANDARD TABLE OF VBUK ,
wa_t_vbuk  LIKE LINE OF it_t_vbuk.

ld_i_status = 'some text here'.

"populate fields of struture and append to itab
append wa_t_xi_fret to it_t_xi_fret.

"populate fields of struture and append to itab
append wa_t_mblnr to it_t_mblnr.

"populate fields of struture and append to itab
append wa_t_bldat to it_t_bldat.

"populate fields of struture and append to itab
append wa_t_mseg to it_t_mseg.

"populate fields of struture and append to itab
append wa_t_vbap to it_t_vbap.

"populate fields of struture and append to itab
append wa_t_vbep to it_t_vbep.

"populate fields of struture and append to itab
append wa_t_vbup to it_t_vbup.

"populate fields of struture and append to itab
append wa_t_vbfa to it_t_vbfa.

"populate fields of struture and append to itab
append wa_t_vbak to it_t_vbak.

"populate fields of struture and append to itab
append wa_t_ekpo to it_t_ekpo.

"populate fields of struture and append to itab
append wa_t_eket to it_t_eket.

"populate fields of struture and append to itab
append wa_t_ekko to it_t_ekko.

"populate fields of struture and append to itab
append wa_t_ekpv to it_t_ekpv.

"populate fields of struture and append to itab
append wa_t_likp to it_t_likp.

"populate fields of struture and append to itab
append wa_t_lips to it_t_lips.

"populate fields of struture and append to itab
append wa_t_vbuk to it_t_vbuk.

SAP Documentation for FM W_FRM_ASSIGNMENT_PREPARE


This function module prepares the extended distribution structure of its input interface in such a way that general distribution processing ...See here for full SAP fm documentation



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 W_FRM_ASSIGNMENT_PREPARE or its description.