SAP Function Modules

BDM1MODEL_GETVIEW SAP Function module







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

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


Pattern for FM BDM1MODEL_GETVIEW - BDM1MODEL GETVIEW





CALL FUNCTION 'BDM1MODEL_GETVIEW' "
  EXPORTING
    bdm1model =                 " bdm1_distmodel_type
*   viewname =                  " bdm1_viewname_type
*   template =                  " bdm1_templatename_type
*   flag_istemplate =           " c
*   flag_use_senders =          " c
*   flag_use_receivers =        " c
*   flag_use_bapis =            " c
*   flag_use_messagetypes =     " c
*   flag_get_mcomms =           " c
*   flag_get_bcomms =           " c
*   flag_get_msg_filter =       " c
*   flag_get_bapi_rcvfilter =   " c
*   flag_get_bapi_datafilter =   " c
  IMPORTING
    modelview =                 " bdm1_modelview_type
* TABLES
*   t_senders =                 " bdm1_system_ltype
*   t_receivers =               " bdm1_system_ltype
*   t_bapis =                   " bdm1_bapi_ltype
*   t_messagetypes =            " bdm1_messagetype_ltype
  EXCEPTIONS
    INVALID_VIEW = 1            "
    UNEXPECTED_ERROR = 2        "
    .  "  BDM1MODEL_GETVIEW

ABAP code example for Function Module BDM1MODEL_GETVIEW





The ABAP code below is a full code listing to execute function module BDM1MODEL_GETVIEW 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_modelview  TYPE BDM1_MODELVIEW_TYPE ,
it_t_senders  TYPE STANDARD TABLE OF BDM1_SYSTEM_LTYPE,"TABLES PARAM
wa_t_senders  LIKE LINE OF it_t_senders ,
it_t_receivers  TYPE STANDARD TABLE OF BDM1_SYSTEM_LTYPE,"TABLES PARAM
wa_t_receivers  LIKE LINE OF it_t_receivers ,
it_t_bapis  TYPE STANDARD TABLE OF BDM1_BAPI_LTYPE,"TABLES PARAM
wa_t_bapis  LIKE LINE OF it_t_bapis ,
it_t_messagetypes  TYPE STANDARD TABLE OF BDM1_MESSAGETYPE_LTYPE,"TABLES PARAM
wa_t_messagetypes  LIKE LINE OF it_t_messagetypes .

DATA(ld_bdm1model) = 'Check type of data required'.
DATA(ld_viewname) = 'Check type of data required'.
DATA(ld_template) = 'Check type of data required'.
DATA(ld_flag_istemplate) = 'Check type of data required'.
DATA(ld_flag_use_senders) = 'Check type of data required'.
DATA(ld_flag_use_receivers) = 'Check type of data required'.
DATA(ld_flag_use_bapis) = 'Check type of data required'.
DATA(ld_flag_use_messagetypes) = 'Check type of data required'.
DATA(ld_flag_get_mcomms) = 'Check type of data required'.
DATA(ld_flag_get_bcomms) = 'Check type of data required'.
DATA(ld_flag_get_msg_filter) = 'Check type of data required'.
DATA(ld_flag_get_bapi_rcvfilter) = 'Check type of data required'.
DATA(ld_flag_get_bapi_datafilter) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_senders to it_t_senders.

"populate fields of struture and append to itab
append wa_t_receivers to it_t_receivers.

"populate fields of struture and append to itab
append wa_t_bapis to it_t_bapis.

"populate fields of struture and append to itab
append wa_t_messagetypes to it_t_messagetypes. . CALL FUNCTION 'BDM1MODEL_GETVIEW' EXPORTING bdm1model = ld_bdm1model * viewname = ld_viewname * template = ld_template * flag_istemplate = ld_flag_istemplate * flag_use_senders = ld_flag_use_senders * flag_use_receivers = ld_flag_use_receivers * flag_use_bapis = ld_flag_use_bapis * flag_use_messagetypes = ld_flag_use_messagetypes * flag_get_mcomms = ld_flag_get_mcomms * flag_get_bcomms = ld_flag_get_bcomms * flag_get_msg_filter = ld_flag_get_msg_filter * flag_get_bapi_rcvfilter = ld_flag_get_bapi_rcvfilter * flag_get_bapi_datafilter = ld_flag_get_bapi_datafilter IMPORTING modelview = ld_modelview * TABLES * t_senders = it_t_senders * t_receivers = it_t_receivers * t_bapis = it_t_bapis * t_messagetypes = it_t_messagetypes EXCEPTIONS INVALID_VIEW = 1 UNEXPECTED_ERROR = 2 . " BDM1MODEL_GETVIEW
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_modelview  TYPE BDM1_MODELVIEW_TYPE ,
ld_bdm1model  TYPE BDM1_DISTMODEL_TYPE ,
it_t_senders  TYPE STANDARD TABLE OF BDM1_SYSTEM_LTYPE ,
wa_t_senders  LIKE LINE OF it_t_senders,
ld_viewname  TYPE BDM1_VIEWNAME_TYPE ,
it_t_receivers  TYPE STANDARD TABLE OF BDM1_SYSTEM_LTYPE ,
wa_t_receivers  LIKE LINE OF it_t_receivers,
ld_template  TYPE BDM1_TEMPLATENAME_TYPE ,
it_t_bapis  TYPE STANDARD TABLE OF BDM1_BAPI_LTYPE ,
wa_t_bapis  LIKE LINE OF it_t_bapis,
ld_flag_istemplate  TYPE C ,
it_t_messagetypes  TYPE STANDARD TABLE OF BDM1_MESSAGETYPE_LTYPE ,
wa_t_messagetypes  LIKE LINE OF it_t_messagetypes,
ld_flag_use_senders  TYPE C ,
ld_flag_use_receivers  TYPE C ,
ld_flag_use_bapis  TYPE C ,
ld_flag_use_messagetypes  TYPE C ,
ld_flag_get_mcomms  TYPE C ,
ld_flag_get_bcomms  TYPE C ,
ld_flag_get_msg_filter  TYPE C ,
ld_flag_get_bapi_rcvfilter  TYPE C ,
ld_flag_get_bapi_datafilter  TYPE C .

ld_bdm1model = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_senders to it_t_senders.
ld_viewname = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_receivers to it_t_receivers.
ld_template = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_bapis to it_t_bapis.
ld_flag_istemplate = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_messagetypes to it_t_messagetypes.
ld_flag_use_senders = 'Check type of data required'.
ld_flag_use_receivers = 'Check type of data required'.
ld_flag_use_bapis = 'Check type of data required'.
ld_flag_use_messagetypes = 'Check type of data required'.
ld_flag_get_mcomms = 'Check type of data required'.
ld_flag_get_bcomms = 'Check type of data required'.
ld_flag_get_msg_filter = 'Check type of data required'.
ld_flag_get_bapi_rcvfilter = 'Check type of data required'.
ld_flag_get_bapi_datafilter = '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 BDM1MODEL_GETVIEW or its description.