SAP Function Modules

MM_ARRANG_READ_EBAB SAP Function module







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

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


Pattern for FM MM_ARRANG_READ_EBAB - MM ARRANG READ EBAB





CALL FUNCTION 'MM_ARRANG_READ_EBAB' "
* EXPORTING
*   i_knuma =                   " ebab-knuma
*   i_abrlf =                   " ebab-abrlf
*   i_s_abrlf =                 " ebab-s_abrlf
*   i_buffer_refresh =          " c
*   i_bypassing_buffer =        " c
  IMPORTING
    e_ebab =                    " ebab
* TABLES
*   t_ernam =                   " ernam_ran
*   t_erdat =                   " bldat_ran
*   t_abrdate =                 " bldat_ran
*   t_budate =                  " bldat_ran
*   t_bldate =                  " bldat_ran
*   t_ebab =                    " ebab
  EXCEPTIONS
    ENTRY_NOT_FOUND = 1         "
    FATAL_ERROR = 2             "
    .  "  MM_ARRANG_READ_EBAB

ABAP code example for Function Module MM_ARRANG_READ_EBAB





The ABAP code below is a full code listing to execute function module MM_ARRANG_READ_EBAB 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_e_ebab  TYPE EBAB ,
it_t_ernam  TYPE STANDARD TABLE OF ERNAM_RAN,"TABLES PARAM
wa_t_ernam  LIKE LINE OF it_t_ernam ,
it_t_erdat  TYPE STANDARD TABLE OF BLDAT_RAN,"TABLES PARAM
wa_t_erdat  LIKE LINE OF it_t_erdat ,
it_t_abrdate  TYPE STANDARD TABLE OF BLDAT_RAN,"TABLES PARAM
wa_t_abrdate  LIKE LINE OF it_t_abrdate ,
it_t_budate  TYPE STANDARD TABLE OF BLDAT_RAN,"TABLES PARAM
wa_t_budate  LIKE LINE OF it_t_budate ,
it_t_bldate  TYPE STANDARD TABLE OF BLDAT_RAN,"TABLES PARAM
wa_t_bldate  LIKE LINE OF it_t_bldate ,
it_t_ebab  TYPE STANDARD TABLE OF EBAB,"TABLES PARAM
wa_t_ebab  LIKE LINE OF it_t_ebab .


SELECT single KNUMA
FROM EBAB
INTO @DATA(ld_i_knuma).


SELECT single ABRLF
FROM EBAB
INTO @DATA(ld_i_abrlf).


SELECT single S_ABRLF
FROM EBAB
INTO @DATA(ld_i_s_abrlf).

DATA(ld_i_buffer_refresh) = 'Check type of data required'.
DATA(ld_i_bypassing_buffer) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_ernam to it_t_ernam.

"populate fields of struture and append to itab
append wa_t_erdat to it_t_erdat.

"populate fields of struture and append to itab
append wa_t_abrdate to it_t_abrdate.

"populate fields of struture and append to itab
append wa_t_budate to it_t_budate.

"populate fields of struture and append to itab
append wa_t_bldate to it_t_bldate.

"populate fields of struture and append to itab
append wa_t_ebab to it_t_ebab. . CALL FUNCTION 'MM_ARRANG_READ_EBAB' * EXPORTING * i_knuma = ld_i_knuma * i_abrlf = ld_i_abrlf * i_s_abrlf = ld_i_s_abrlf * i_buffer_refresh = ld_i_buffer_refresh * i_bypassing_buffer = ld_i_bypassing_buffer IMPORTING e_ebab = ld_e_ebab * TABLES * t_ernam = it_t_ernam * t_erdat = it_t_erdat * t_abrdate = it_t_abrdate * t_budate = it_t_budate * t_bldate = it_t_bldate * t_ebab = it_t_ebab EXCEPTIONS ENTRY_NOT_FOUND = 1 FATAL_ERROR = 2 . " MM_ARRANG_READ_EBAB
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_e_ebab  TYPE EBAB ,
ld_i_knuma  TYPE EBAB-KNUMA ,
it_t_ernam  TYPE STANDARD TABLE OF ERNAM_RAN ,
wa_t_ernam  LIKE LINE OF it_t_ernam,
ld_i_abrlf  TYPE EBAB-ABRLF ,
it_t_erdat  TYPE STANDARD TABLE OF BLDAT_RAN ,
wa_t_erdat  LIKE LINE OF it_t_erdat,
ld_i_s_abrlf  TYPE EBAB-S_ABRLF ,
it_t_abrdate  TYPE STANDARD TABLE OF BLDAT_RAN ,
wa_t_abrdate  LIKE LINE OF it_t_abrdate,
ld_i_buffer_refresh  TYPE C ,
it_t_budate  TYPE STANDARD TABLE OF BLDAT_RAN ,
wa_t_budate  LIKE LINE OF it_t_budate,
ld_i_bypassing_buffer  TYPE C ,
it_t_bldate  TYPE STANDARD TABLE OF BLDAT_RAN ,
wa_t_bldate  LIKE LINE OF it_t_bldate,
it_t_ebab  TYPE STANDARD TABLE OF EBAB ,
wa_t_ebab  LIKE LINE OF it_t_ebab.


SELECT single KNUMA
FROM EBAB
INTO ld_i_knuma.


"populate fields of struture and append to itab
append wa_t_ernam to it_t_ernam.

SELECT single ABRLF
FROM EBAB
INTO ld_i_abrlf.


"populate fields of struture and append to itab
append wa_t_erdat to it_t_erdat.

SELECT single S_ABRLF
FROM EBAB
INTO ld_i_s_abrlf.


"populate fields of struture and append to itab
append wa_t_abrdate to it_t_abrdate.
ld_i_buffer_refresh = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_budate to it_t_budate.
ld_i_bypassing_buffer = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_bldate to it_t_bldate.

"populate fields of struture and append to itab
append wa_t_ebab to it_t_ebab.

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