SAP Function Modules

W_FRM_ASSIGN_CREATE_ALLOCATION SAP Function module







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

Associated Function Group: WFR7
Released Date: Not Released
Processing type: Start update immediately (start immed)
update module start immediate settings


Pattern for FM W_FRM_ASSIGN_CREATE_ALLOCATION - W FRM ASSIGN CREATE ALLOCATION





CALL FUNCTION 'W_FRM_ASSIGN_CREATE_ALLOCATION' "
* EXPORTING
*   i_internal_commit = SPACE   " wfrm_flag
*   i_init_unit_conv = SPACE    " wfrm_flag
  TABLES
    t_aupo =                    " rw01a
    t_auvz =                    " rw11a
    t_auvw =                    " rw13a
    t_aufi =                    " rw04a
    t_aulw =                    " rw14a
*   t_messagelog =              " wfrm_error_log_t
  EXCEPTIONS
    NOTHING_TO_DO = 1           "
    AUPO_DATA_MISSING = 2       "
    AUVZ_DATA_MISSING = 3       "
    ERROR_AT_UNIT_CONVERSION = 4  "
    .  "  W_FRM_ASSIGN_CREATE_ALLOCATION

ABAP code example for Function Module W_FRM_ASSIGN_CREATE_ALLOCATION





The ABAP code below is a full code listing to execute function module W_FRM_ASSIGN_CREATE_ALLOCATION 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_aupo  TYPE STANDARD TABLE OF RW01A,"TABLES PARAM
wa_t_aupo  LIKE LINE OF it_t_aupo ,
it_t_auvz  TYPE STANDARD TABLE OF RW11A,"TABLES PARAM
wa_t_auvz  LIKE LINE OF it_t_auvz ,
it_t_auvw  TYPE STANDARD TABLE OF RW13A,"TABLES PARAM
wa_t_auvw  LIKE LINE OF it_t_auvw ,
it_t_aufi  TYPE STANDARD TABLE OF RW04A,"TABLES PARAM
wa_t_aufi  LIKE LINE OF it_t_aufi ,
it_t_aulw  TYPE STANDARD TABLE OF RW14A,"TABLES PARAM
wa_t_aulw  LIKE LINE OF it_t_aulw ,
it_t_messagelog  TYPE STANDARD TABLE OF WFRM_ERROR_LOG_T,"TABLES PARAM
wa_t_messagelog  LIKE LINE OF it_t_messagelog .

DATA(ld_i_internal_commit) = 'Check type of data required'.
DATA(ld_i_init_unit_conv) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_aupo to it_t_aupo.

"populate fields of struture and append to itab
append wa_t_auvz to it_t_auvz.

"populate fields of struture and append to itab
append wa_t_auvw to it_t_auvw.

"populate fields of struture and append to itab
append wa_t_aufi to it_t_aufi.

"populate fields of struture and append to itab
append wa_t_aulw to it_t_aulw.

"populate fields of struture and append to itab
append wa_t_messagelog to it_t_messagelog. . CALL FUNCTION 'W_FRM_ASSIGN_CREATE_ALLOCATION' * EXPORTING * i_internal_commit = ld_i_internal_commit * i_init_unit_conv = ld_i_init_unit_conv TABLES t_aupo = it_t_aupo t_auvz = it_t_auvz t_auvw = it_t_auvw t_aufi = it_t_aufi t_aulw = it_t_aulw * t_messagelog = it_t_messagelog EXCEPTIONS NOTHING_TO_DO = 1 AUPO_DATA_MISSING = 2 AUVZ_DATA_MISSING = 3 ERROR_AT_UNIT_CONVERSION = 4 . " W_FRM_ASSIGN_CREATE_ALLOCATION
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 ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "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_internal_commit  TYPE WFRM_FLAG ,
it_t_aupo  TYPE STANDARD TABLE OF RW01A ,
wa_t_aupo  LIKE LINE OF it_t_aupo,
ld_i_init_unit_conv  TYPE WFRM_FLAG ,
it_t_auvz  TYPE STANDARD TABLE OF RW11A ,
wa_t_auvz  LIKE LINE OF it_t_auvz,
it_t_auvw  TYPE STANDARD TABLE OF RW13A ,
wa_t_auvw  LIKE LINE OF it_t_auvw,
it_t_aufi  TYPE STANDARD TABLE OF RW04A ,
wa_t_aufi  LIKE LINE OF it_t_aufi,
it_t_aulw  TYPE STANDARD TABLE OF RW14A ,
wa_t_aulw  LIKE LINE OF it_t_aulw,
it_t_messagelog  TYPE STANDARD TABLE OF WFRM_ERROR_LOG_T ,
wa_t_messagelog  LIKE LINE OF it_t_messagelog.

ld_i_internal_commit = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_aupo to it_t_aupo.
ld_i_init_unit_conv = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_auvz to it_t_auvz.

"populate fields of struture and append to itab
append wa_t_auvw to it_t_auvw.

"populate fields of struture and append to itab
append wa_t_aufi to it_t_aufi.

"populate fields of struture and append to itab
append wa_t_aulw to it_t_aulw.

"populate fields of struture and append to itab
append wa_t_messagelog to it_t_messagelog.

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