SAP Function Modules

MVEW_ARRAY_READ_MATNR_ALL SAP Function module







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

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


Pattern for FM MVEW_ARRAY_READ_MATNR_ALL - MVEW ARRAY READ MATNR ALL





CALL FUNCTION 'MVEW_ARRAY_READ_MATNR_ALL' "
* EXPORTING
*   kzrfb = ' '                 " mtcom-kzrfb
*   neuflag = ' '               " t130f-kzref
*   sperrmodus = ' '            " tvgvi-spera
*   std_sperrmodus = ' '        " tvgvi-spera
*   exception_on_lock = ' '     " mtcom-kzrfb
  TABLES
    ipre03 =                    " pre03
*   mvew_tab =                  " mvew
  EXCEPTIONS
    ENQUEUE_MODE_CHANGED = 1    "
    LOCK_SYSTEM_ERROR = 2       "
    LOCK_ON_MVEW = 3            "
    .  "  MVEW_ARRAY_READ_MATNR_ALL

ABAP code example for Function Module MVEW_ARRAY_READ_MATNR_ALL





The ABAP code below is a full code listing to execute function module MVEW_ARRAY_READ_MATNR_ALL 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_ipre03  TYPE STANDARD TABLE OF PRE03,"TABLES PARAM
wa_ipre03  LIKE LINE OF it_ipre03 ,
it_mvew_tab  TYPE STANDARD TABLE OF MVEW,"TABLES PARAM
wa_mvew_tab  LIKE LINE OF it_mvew_tab .


DATA(ld_kzrfb) = some text here

SELECT single KZREF
FROM T130F
INTO @DATA(ld_neuflag).


SELECT single SPERA
FROM TVGVI
INTO @DATA(ld_sperrmodus).


SELECT single SPERA
FROM TVGVI
INTO @DATA(ld_std_sperrmodus).


DATA(ld_exception_on_lock) = some text here

"populate fields of struture and append to itab
append wa_ipre03 to it_ipre03.

"populate fields of struture and append to itab
append wa_mvew_tab to it_mvew_tab. . CALL FUNCTION 'MVEW_ARRAY_READ_MATNR_ALL' * EXPORTING * kzrfb = ld_kzrfb * neuflag = ld_neuflag * sperrmodus = ld_sperrmodus * std_sperrmodus = ld_std_sperrmodus * exception_on_lock = ld_exception_on_lock TABLES ipre03 = it_ipre03 * mvew_tab = it_mvew_tab EXCEPTIONS ENQUEUE_MODE_CHANGED = 1 LOCK_SYSTEM_ERROR = 2 LOCK_ON_MVEW = 3 . " MVEW_ARRAY_READ_MATNR_ALL
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 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_kzrfb  TYPE MTCOM-KZRFB ,
it_ipre03  TYPE STANDARD TABLE OF PRE03 ,
wa_ipre03  LIKE LINE OF it_ipre03,
ld_neuflag  TYPE T130F-KZREF ,
it_mvew_tab  TYPE STANDARD TABLE OF MVEW ,
wa_mvew_tab  LIKE LINE OF it_mvew_tab,
ld_sperrmodus  TYPE TVGVI-SPERA ,
ld_std_sperrmodus  TYPE TVGVI-SPERA ,
ld_exception_on_lock  TYPE MTCOM-KZRFB .


ld_kzrfb = some text here

"populate fields of struture and append to itab
append wa_ipre03 to it_ipre03.

SELECT single KZREF
FROM T130F
INTO ld_neuflag.


"populate fields of struture and append to itab
append wa_mvew_tab to it_mvew_tab.

SELECT single SPERA
FROM TVGVI
INTO ld_sperrmodus.


SELECT single SPERA
FROM TVGVI
INTO ld_std_sperrmodus.


ld_exception_on_lock = some text here

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