BAPI_GOODSMVT_GETITEMS 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 BAPI_GOODSMVT_GETITEMS into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
MB_BUS2017
Released Date:
23.07.1998
Processing type: Remote-Enabled
CALL FUNCTION 'BAPI_GOODSMVT_GETITEMS' "Display Detailed List of Material Documents
TABLES
* material_ra = " bapi2017_gm_material_ra Range for Material
* plant_ra = " bapi2017_gm_plant_ra Range for Plant
* stge_loc_ra = " bapi2017_gm_stge_loc_ra Range for Stor. Loc.
* batch_ra = " bapi2017_gm_batch_ra Range for Batch
* move_type_ra = " bapi2017_gm_move_type_ra Range for Mvt Type
* spec_stock_ra = " bapi2017_gm_spec_stock_ra Range for Special Stock Indicator
* tr_ev_type_ra = " bapi2017_gm_tr_ev_type_ra Range for Trans./Event Type
* pstng_date_ra = " bapi2017_gm_pstng_date_ra Range for Posting Date
* vendor_ra = " bapi2017_gm_vendor_ra Range for Vendor
* username_ra = " bapi2017_gm_username_ra Range for User Name
* purch_doc_ra = " bapi2017_gm_purch_doc_ra Range for Purchasing Document
goodsmvt_header = " bapi2017_gm_head_02 Return Structure, Material Doc. Headers
goodsmvt_items = " bapi2017_gm_item_show Return Structure, Material Doc. Items
return = " bapiret2 Return Messages
. " BAPI_GOODSMVT_GETITEMS
The ABAP code below is a full code listing to execute function module BAPI_GOODSMVT_GETITEMS 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).
| it_material_ra | TYPE STANDARD TABLE OF BAPI2017_GM_MATERIAL_RA,"TABLES PARAM |
| wa_material_ra | LIKE LINE OF it_material_ra , |
| it_plant_ra | TYPE STANDARD TABLE OF BAPI2017_GM_PLANT_RA,"TABLES PARAM |
| wa_plant_ra | LIKE LINE OF it_plant_ra , |
| it_stge_loc_ra | TYPE STANDARD TABLE OF BAPI2017_GM_STGE_LOC_RA,"TABLES PARAM |
| wa_stge_loc_ra | LIKE LINE OF it_stge_loc_ra , |
| it_batch_ra | TYPE STANDARD TABLE OF BAPI2017_GM_BATCH_RA,"TABLES PARAM |
| wa_batch_ra | LIKE LINE OF it_batch_ra , |
| it_move_type_ra | TYPE STANDARD TABLE OF BAPI2017_GM_MOVE_TYPE_RA,"TABLES PARAM |
| wa_move_type_ra | LIKE LINE OF it_move_type_ra , |
| it_spec_stock_ra | TYPE STANDARD TABLE OF BAPI2017_GM_SPEC_STOCK_RA,"TABLES PARAM |
| wa_spec_stock_ra | LIKE LINE OF it_spec_stock_ra , |
| it_tr_ev_type_ra | TYPE STANDARD TABLE OF BAPI2017_GM_TR_EV_TYPE_RA,"TABLES PARAM |
| wa_tr_ev_type_ra | LIKE LINE OF it_tr_ev_type_ra , |
| it_pstng_date_ra | TYPE STANDARD TABLE OF BAPI2017_GM_PSTNG_DATE_RA,"TABLES PARAM |
| wa_pstng_date_ra | LIKE LINE OF it_pstng_date_ra , |
| it_vendor_ra | TYPE STANDARD TABLE OF BAPI2017_GM_VENDOR_RA,"TABLES PARAM |
| wa_vendor_ra | LIKE LINE OF it_vendor_ra , |
| it_username_ra | TYPE STANDARD TABLE OF BAPI2017_GM_USERNAME_RA,"TABLES PARAM |
| wa_username_ra | LIKE LINE OF it_username_ra , |
| it_purch_doc_ra | TYPE STANDARD TABLE OF BAPI2017_GM_PURCH_DOC_RA,"TABLES PARAM |
| wa_purch_doc_ra | LIKE LINE OF it_purch_doc_ra , |
| it_goodsmvt_header | TYPE STANDARD TABLE OF BAPI2017_GM_HEAD_02,"TABLES PARAM |
| wa_goodsmvt_header | LIKE LINE OF it_goodsmvt_header , |
| it_goodsmvt_items | TYPE STANDARD TABLE OF BAPI2017_GM_ITEM_SHOW,"TABLES PARAM |
| wa_goodsmvt_items | LIKE LINE OF it_goodsmvt_items , |
| it_return | TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM |
| wa_return | LIKE LINE OF it_return . |
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:
| it_material_ra | TYPE STANDARD TABLE OF BAPI2017_GM_MATERIAL_RA , |
| wa_material_ra | LIKE LINE OF it_material_ra, |
| it_plant_ra | TYPE STANDARD TABLE OF BAPI2017_GM_PLANT_RA , |
| wa_plant_ra | LIKE LINE OF it_plant_ra, |
| it_stge_loc_ra | TYPE STANDARD TABLE OF BAPI2017_GM_STGE_LOC_RA , |
| wa_stge_loc_ra | LIKE LINE OF it_stge_loc_ra, |
| it_batch_ra | TYPE STANDARD TABLE OF BAPI2017_GM_BATCH_RA , |
| wa_batch_ra | LIKE LINE OF it_batch_ra, |
| it_move_type_ra | TYPE STANDARD TABLE OF BAPI2017_GM_MOVE_TYPE_RA , |
| wa_move_type_ra | LIKE LINE OF it_move_type_ra, |
| it_spec_stock_ra | TYPE STANDARD TABLE OF BAPI2017_GM_SPEC_STOCK_RA , |
| wa_spec_stock_ra | LIKE LINE OF it_spec_stock_ra, |
| it_tr_ev_type_ra | TYPE STANDARD TABLE OF BAPI2017_GM_TR_EV_TYPE_RA , |
| wa_tr_ev_type_ra | LIKE LINE OF it_tr_ev_type_ra, |
| it_pstng_date_ra | TYPE STANDARD TABLE OF BAPI2017_GM_PSTNG_DATE_RA , |
| wa_pstng_date_ra | LIKE LINE OF it_pstng_date_ra, |
| it_vendor_ra | TYPE STANDARD TABLE OF BAPI2017_GM_VENDOR_RA , |
| wa_vendor_ra | LIKE LINE OF it_vendor_ra, |
| it_username_ra | TYPE STANDARD TABLE OF BAPI2017_GM_USERNAME_RA , |
| wa_username_ra | LIKE LINE OF it_username_ra, |
| it_purch_doc_ra | TYPE STANDARD TABLE OF BAPI2017_GM_PURCH_DOC_RA , |
| wa_purch_doc_ra | LIKE LINE OF it_purch_doc_ra, |
| it_goodsmvt_header | TYPE STANDARD TABLE OF BAPI2017_GM_HEAD_02 , |
| wa_goodsmvt_header | LIKE LINE OF it_goodsmvt_header, |
| it_goodsmvt_items | TYPE STANDARD TABLE OF BAPI2017_GM_ITEM_SHOW , |
| wa_goodsmvt_items | LIKE LINE OF it_goodsmvt_items, |
| it_return | TYPE STANDARD TABLE OF BAPIRET2 , |
| wa_return | LIKE LINE OF it_return. |
The GetItems method allows you to read the header and item data of all
material documents that meet the selection criteria below:
...See here for full SAP fm documentation
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 BAPI_GOODSMVT_GETITEMS or its description.
BAPI_GOODSMVT_GETITEMS - Display Detailed List of Material Documents BAPI_GOODSMVT_GETDETAIL_OIL - Display details for material document BAPI_GOODSMVT_GETDETAIL - Display Details for Material Document BAPI_GOODSMVT_CREATE_OIL - Post goods movements with MB_CREATE_GOODS_MOVEMENT BAPI_GOODSMVT_CREATE - Post goods movements with MB_CREATE_GOODS_MOVEMENT BAPI_GOODSMVT_CANCEL - Reverse Goods Movements with MB_CANCEL_GOODS_MOVEMENT