SAP MV_GET_AREA Function Module for









MV_GET_AREA is a standard mv get area SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for mv get area FM, simply by entering the name MV_GET_AREA into the relevant SAP transaction such as SE37 or SE38.

Function Group: FVI2
Program Name: SAPLFVI2
Main Program:
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function MV_GET_AREA pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'MV_GET_AREA'"
EXPORTING
* BUKRS = "
* SWENR = "
* SMENR = "
* DSTICH = SY-DATUM "
* I_VIMI01 = "
* I_VIOB01 = "

IMPORTING
PVIMI01 = "
RMEDAT = "

EXCEPTIONS
AREADESC_NOTFOUND = 1 AREATYPE_NOTFOUND = 2 AREA_NOTFOUND = 3 DATABASE_ERROR = 4 ME_NOTFOUND = 5
.



IMPORTING Parameters details for MV_GET_AREA

BUKRS -

Data type: VIMI01-BUKRS
Optional: Yes
Call by Reference: No ( called with pass by value option)

SWENR -

Data type: VIMI01-SWENR
Optional: Yes
Call by Reference: No ( called with pass by value option)

SMENR -

Data type: VIMI01-SMENR
Optional: Yes
Call by Reference: No ( called with pass by value option)

DSTICH -

Data type: SY-DATUM
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_VIMI01 -

Data type: VIMI01
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_VIOB01 -

Data type: VIOB01
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for MV_GET_AREA

PVIMI01 -

Data type: VIMI01
Optional: No
Call by Reference: No ( called with pass by value option)

RMEDAT -

Data type: RMEDAT
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

AREADESC_NOTFOUND -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

AREATYPE_NOTFOUND -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

AREA_NOTFOUND -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

DATABASE_ERROR -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ME_NOTFOUND -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for MV_GET_AREA Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_bukrs  TYPE VIMI01-BUKRS, "   
lv_pvimi01  TYPE VIMI01, "   
lv_areadesc_notfound  TYPE VIMI01, "   
lv_swenr  TYPE VIMI01-SWENR, "   
lv_rmedat  TYPE RMEDAT, "   
lv_areatype_notfound  TYPE RMEDAT, "   
lv_smenr  TYPE VIMI01-SMENR, "   
lv_area_notfound  TYPE VIMI01, "   
lv_dstich  TYPE SY-DATUM, "   SY-DATUM
lv_database_error  TYPE SY, "   
lv_i_vimi01  TYPE VIMI01, "   
lv_me_notfound  TYPE VIMI01, "   
lv_i_viob01  TYPE VIOB01. "   

  CALL FUNCTION 'MV_GET_AREA'  "
    EXPORTING
         BUKRS = lv_bukrs
         SWENR = lv_swenr
         SMENR = lv_smenr
         DSTICH = lv_dstich
         I_VIMI01 = lv_i_vimi01
         I_VIOB01 = lv_i_viob01
    IMPORTING
         PVIMI01 = lv_pvimi01
         RMEDAT = lv_rmedat
    EXCEPTIONS
        AREADESC_NOTFOUND = 1
        AREATYPE_NOTFOUND = 2
        AREA_NOTFOUND = 3
        DATABASE_ERROR = 4
        ME_NOTFOUND = 5
. " MV_GET_AREA




ABAP code using 7.40 inline data declarations to call FM MV_GET_AREA

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

"SELECT single BUKRS FROM VIMI01 INTO @DATA(ld_bukrs).
 
 
 
"SELECT single SWENR FROM VIMI01 INTO @DATA(ld_swenr).
 
 
 
"SELECT single SMENR FROM VIMI01 INTO @DATA(ld_smenr).
 
 
"SELECT single DATUM FROM SY INTO @DATA(ld_dstich).
DATA(ld_dstich) = SY-DATUM.
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!