SAP BAPI_GOODSMVT_GETITEMS Function Module for Display Detailed List of Material Documents









BAPI_GOODSMVT_GETITEMS is a standard bapi goodsmvt getitems SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Display Detailed List of Material Documents processing and below is the pattern details for this FM, 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 bapi goodsmvt getitems FM, simply by entering the name BAPI_GOODSMVT_GETITEMS into the relevant SAP transaction such as SE37 or SE38.

Function Group: MB_BUS2017
Program Name: SAPLMB_BUS2017
Main Program: SAPLMB_BUS2017
Appliation area: M
Release date: 23-Jul-1998
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function BAPI_GOODSMVT_GETITEMS 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 'BAPI_GOODSMVT_GETITEMS'"Display Detailed List of Material Documents
TABLES
* MATERIAL_RA = "Range for Material
* USERNAME_RA = "Range for User Name
* PURCH_DOC_RA = "Range for Purchasing Document
GOODSMVT_HEADER = "Return Structure, Material Doc. Headers
GOODSMVT_ITEMS = "Return Structure, Material Doc. Items
RETURN = "Return Messages
* PLANT_RA = "Range for Plant
* STGE_LOC_RA = "Range for Stor. Loc.
* BATCH_RA = "Range for Batch
* MOVE_TYPE_RA = "Range for Mvt Type
* SPEC_STOCK_RA = "Range for Special Stock Indicator
* TR_EV_TYPE_RA = "Range for Trans./Event Type
* PSTNG_DATE_RA = "Range for Posting Date
* VENDOR_RA = "Range for Vendor
.



TABLES Parameters details for BAPI_GOODSMVT_GETITEMS

MATERIAL_RA - Range for Material

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

USERNAME_RA - Range for User Name

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

PURCH_DOC_RA - Range for Purchasing Document

Data type: BAPI2017_GM_PURCH_DOC_RA
Optional: Yes
Call by Reference: Yes

GOODSMVT_HEADER - Return Structure, Material Doc. Headers

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

GOODSMVT_ITEMS - Return Structure, Material Doc. Items

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

RETURN - Return Messages

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

PLANT_RA - Range for Plant

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

STGE_LOC_RA - Range for Stor. Loc.

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

BATCH_RA - Range for Batch

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

MOVE_TYPE_RA - Range for Mvt Type

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

SPEC_STOCK_RA - Range for Special Stock Indicator

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

TR_EV_TYPE_RA - Range for Trans./Event Type

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

PSTNG_DATE_RA - Range for Posting Date

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

VENDOR_RA - Range for Vendor

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

Copy and paste ABAP code example for BAPI_GOODSMVT_GETITEMS 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:
lt_material_ra  TYPE STANDARD TABLE OF BAPI2017_GM_MATERIAL_RA, "   
lt_username_ra  TYPE STANDARD TABLE OF BAPI2017_GM_USERNAME_RA, "   
lt_purch_doc_ra  TYPE STANDARD TABLE OF BAPI2017_GM_PURCH_DOC_RA, "   
lt_goodsmvt_header  TYPE STANDARD TABLE OF BAPI2017_GM_HEAD_02, "   
lt_goodsmvt_items  TYPE STANDARD TABLE OF BAPI2017_GM_ITEM_SHOW, "   
lt_return  TYPE STANDARD TABLE OF BAPIRET2, "   
lt_plant_ra  TYPE STANDARD TABLE OF BAPI2017_GM_PLANT_RA, "   
lt_stge_loc_ra  TYPE STANDARD TABLE OF BAPI2017_GM_STGE_LOC_RA, "   
lt_batch_ra  TYPE STANDARD TABLE OF BAPI2017_GM_BATCH_RA, "   
lt_move_type_ra  TYPE STANDARD TABLE OF BAPI2017_GM_MOVE_TYPE_RA, "   
lt_spec_stock_ra  TYPE STANDARD TABLE OF BAPI2017_GM_SPEC_STOCK_RA, "   
lt_tr_ev_type_ra  TYPE STANDARD TABLE OF BAPI2017_GM_TR_EV_TYPE_RA, "   
lt_pstng_date_ra  TYPE STANDARD TABLE OF BAPI2017_GM_PSTNG_DATE_RA, "   
lt_vendor_ra  TYPE STANDARD TABLE OF BAPI2017_GM_VENDOR_RA. "   

  CALL FUNCTION 'BAPI_GOODSMVT_GETITEMS'  "Display Detailed List of Material Documents
    TABLES
         MATERIAL_RA = lt_material_ra
         USERNAME_RA = lt_username_ra
         PURCH_DOC_RA = lt_purch_doc_ra
         GOODSMVT_HEADER = lt_goodsmvt_header
         GOODSMVT_ITEMS = lt_goodsmvt_items
         RETURN = lt_return
         PLANT_RA = lt_plant_ra
         STGE_LOC_RA = lt_stge_loc_ra
         BATCH_RA = lt_batch_ra
         MOVE_TYPE_RA = lt_move_type_ra
         SPEC_STOCK_RA = lt_spec_stock_ra
         TR_EV_TYPE_RA = lt_tr_ev_type_ra
         PSTNG_DATE_RA = lt_pstng_date_ra
         VENDOR_RA = lt_vendor_ra
. " BAPI_GOODSMVT_GETITEMS




ABAP code using 7.40 inline data declarations to call FM BAPI_GOODSMVT_GETITEMS

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.

 
 
 
 
 
 
 
 
 
 
 
 
 
 


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!