SAP Function Modules

MAP_BAPI2DI_STRUC SAP Function module - Mapping of BAPI structures to DI structures







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

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


Pattern for FM MAP_BAPI2DI_STRUC - MAP BAPI2DI STRUC





CALL FUNCTION 'MAP_BAPI2DI_STRUC' "Mapping of BAPI structures to DI structures
  EXPORTING
    im_fmarea =                 " fikrs         Financial Management Area
    im_measure =                " fm_measure    Program in Funds Management
    im_fmmeasure_data =         " bapi_0038_data  Funded Program data structure
*   im_fmmeasure_admin =        " bapi_0038_admin  Funded Program admin structure
    im_fmmeasuret =             " bapi_0038_fmmeasuret_text_tab  Table type for BAPI_0038_TEXT structure
  IMPORTING
    ex_fmme_di =                " sfmme_di      Funded Program all data for direct input   (S4)
  TABLES
    t_fmmet_di =                " sfmmeasuret_di  funded Program DI fields FMMEASURET
  CHANGING
    ct_return =                 " bapiret2_t    Return parameter table
    c_subrc =                   " sy-subrc      Return Value, Return Value After ABAP Statements
    .  "  MAP_BAPI2DI_STRUC

ABAP code example for Function Module MAP_BAPI2DI_STRUC





The ABAP code below is a full code listing to execute function module MAP_BAPI2DI_STRUC 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:
ld_ex_fmme_di  TYPE SFMME_DI ,
it_t_fmmet_di  TYPE STANDARD TABLE OF SFMMEASURET_DI,"TABLES PARAM
wa_t_fmmet_di  LIKE LINE OF it_t_fmmet_di .

DATA(ld_ct_return) = 'Check type of data required'.
DATA(ld_c_subrc) = 'Check type of data required'.
DATA(ld_im_fmarea) = 'Check type of data required'.
DATA(ld_im_measure) = 'Check type of data required'.
DATA(ld_im_fmmeasure_data) = 'Check type of data required'.
DATA(ld_im_fmmeasure_admin) = 'Check type of data required'.
DATA(ld_im_fmmeasuret) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_fmmet_di to it_t_fmmet_di. . CALL FUNCTION 'MAP_BAPI2DI_STRUC' EXPORTING im_fmarea = ld_im_fmarea im_measure = ld_im_measure im_fmmeasure_data = ld_im_fmmeasure_data * im_fmmeasure_admin = ld_im_fmmeasure_admin im_fmmeasuret = ld_im_fmmeasuret IMPORTING ex_fmme_di = ld_ex_fmme_di TABLES t_fmmet_di = it_t_fmmet_di CHANGING ct_return = ld_ct_return c_subrc = ld_c_subrc . " MAP_BAPI2DI_STRUC
IF SY-SUBRC EQ 0. "All OK 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_ct_return  TYPE BAPIRET2_T ,
ld_ex_fmme_di  TYPE SFMME_DI ,
ld_im_fmarea  TYPE FIKRS ,
it_t_fmmet_di  TYPE STANDARD TABLE OF SFMMEASURET_DI ,
wa_t_fmmet_di  LIKE LINE OF it_t_fmmet_di,
ld_c_subrc  TYPE SY-SUBRC ,
ld_im_measure  TYPE FM_MEASURE ,
ld_im_fmmeasure_data  TYPE BAPI_0038_DATA ,
ld_im_fmmeasure_admin  TYPE BAPI_0038_ADMIN ,
ld_im_fmmeasuret  TYPE BAPI_0038_FMMEASURET_TEXT_TAB .

ld_ct_return = 'Check type of data required'.
ld_im_fmarea = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_fmmet_di to it_t_fmmet_di.
ld_c_subrc = 'Check type of data required'.
ld_im_measure = 'Check type of data required'.
ld_im_fmmeasure_data = 'Check type of data required'.
ld_im_fmmeasure_admin = 'Check type of data required'.
ld_im_fmmeasuret = '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 MAP_BAPI2DI_STRUC or its description.