SAP BAPI_RESERVATION_GETITEMS1 Function Module for BAPI to Read Reservation Items
BAPI_RESERVATION_GETITEMS1 is a standard bapi reservation getitems1 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for BAPI to Read Reservation Items 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 reservation getitems1 FM, simply by entering the name BAPI_RESERVATION_GETITEMS1 into the relevant SAP transaction such as SE37 or SE38.
Function Group: MB_BUS2093
Program Name: SAPLMB_BUS2093
Main Program: SAPLMB_BUS2093
Appliation area:
Release date: 12-Mar-2004
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_RESERVATION_GETITEMS1 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_RESERVATION_GETITEMS1'"BAPI to Read Reservation Items.
EXPORTING
* RESERVATION_NO = "Number of Reservation/Dependent Requirement
* MATERIAL_EVG = "
* MATERIAL = "Material Number
* PLANT = "Plant
* REQ_DATE = "Requirements Date for the Component
* MOVE_PLANT = "Receiving/Issuing Plant
* GR_RCPT = "Goods Recipient
* WITHDRAWN = ' ' "Final Issue for This Reservation
* DELETE_IND = ' ' "Item is deleted
* MOVEMENT = 'X' "Goods Movement for Reservation Allowed
TABLES
RESERVATION_ITEMS = "BAPI Communication Structure: Return Reservation Items
* RETURN = "Return Parameters
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLMB_BUS2093_001 Customer Exit for BAPI_RESERVATION_CREATE1
IMPORTING Parameters details for BAPI_RESERVATION_GETITEMS1
RESERVATION_NO - Number of Reservation/Dependent Requirement
Data type: BAPI2093_RES_KEY-RESERV_NOOptional: Yes
Call by Reference: No ( called with pass by value option)
MATERIAL_EVG -
Data type: BAPIMGVMATNROptional: Yes
Call by Reference: No ( called with pass by value option)
MATERIAL - Material Number
Data type: BAPI2093_RES_ITEM-MATERIALOptional: Yes
Call by Reference: No ( called with pass by value option)
PLANT - Plant
Data type: BAPI2093_RES_ITEM-PLANTOptional: Yes
Call by Reference: No ( called with pass by value option)
REQ_DATE - Requirements Date for the Component
Data type: BAPI2093_RES_ITEM-REQ_DATEOptional: Yes
Call by Reference: No ( called with pass by value option)
MOVE_PLANT - Receiving/Issuing Plant
Data type: BAPI2093_RES_HEAD-MOVE_PLANTOptional: Yes
Call by Reference: No ( called with pass by value option)
GR_RCPT - Goods Recipient
Data type: BAPI2093_RES_ITEM-GR_RCPTOptional: Yes
Call by Reference: No ( called with pass by value option)
WITHDRAWN - Final Issue for This Reservation
Data type: BAPI2093_RES_ITEM_CHANGE-WITHDRAWNDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DELETE_IND - Item is deleted
Data type: BAPI2093_RES_ITEM_CHANGE-DELETE_INDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
MOVEMENT - Goods Movement for Reservation Allowed
Data type: BAPI2093_RES_ITEM-MOVEMENTDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_RESERVATION_GETITEMS1
RESERVATION_ITEMS - BAPI Communication Structure: Return Reservation Items
Data type: BAPI2093_RES_ITEMS_GETOptional: No
Call by Reference: Yes
RETURN - Return Parameters
Data type: BAPIRET2Optional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for BAPI_RESERVATION_GETITEMS1 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_reservation_no | TYPE BAPI2093_RES_KEY-RESERV_NO, " | |||
| lt_reservation_items | TYPE STANDARD TABLE OF BAPI2093_RES_ITEMS_GET, " | |||
| lv_material_evg | TYPE BAPIMGVMATNR, " | |||
| lt_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lv_material | TYPE BAPI2093_RES_ITEM-MATERIAL, " | |||
| lv_plant | TYPE BAPI2093_RES_ITEM-PLANT, " | |||
| lv_req_date | TYPE BAPI2093_RES_ITEM-REQ_DATE, " | |||
| lv_move_plant | TYPE BAPI2093_RES_HEAD-MOVE_PLANT, " | |||
| lv_gr_rcpt | TYPE BAPI2093_RES_ITEM-GR_RCPT, " | |||
| lv_withdrawn | TYPE BAPI2093_RES_ITEM_CHANGE-WITHDRAWN, " SPACE | |||
| lv_delete_ind | TYPE BAPI2093_RES_ITEM_CHANGE-DELETE_IND, " SPACE | |||
| lv_movement | TYPE BAPI2093_RES_ITEM-MOVEMENT. " 'X' |
|   CALL FUNCTION 'BAPI_RESERVATION_GETITEMS1' "BAPI to Read Reservation Items |
| EXPORTING | ||
| RESERVATION_NO | = lv_reservation_no | |
| MATERIAL_EVG | = lv_material_evg | |
| MATERIAL | = lv_material | |
| PLANT | = lv_plant | |
| REQ_DATE | = lv_req_date | |
| MOVE_PLANT | = lv_move_plant | |
| GR_RCPT | = lv_gr_rcpt | |
| WITHDRAWN | = lv_withdrawn | |
| DELETE_IND | = lv_delete_ind | |
| MOVEMENT | = lv_movement | |
| TABLES | ||
| RESERVATION_ITEMS | = lt_reservation_items | |
| RETURN | = lt_return | |
| . " BAPI_RESERVATION_GETITEMS1 | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_RESERVATION_GETITEMS1
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 RESERV_NO FROM BAPI2093_RES_KEY INTO @DATA(ld_reservation_no). | ||||
| "SELECT single MATERIAL FROM BAPI2093_RES_ITEM INTO @DATA(ld_material). | ||||
| "SELECT single PLANT FROM BAPI2093_RES_ITEM INTO @DATA(ld_plant). | ||||
| "SELECT single REQ_DATE FROM BAPI2093_RES_ITEM INTO @DATA(ld_req_date). | ||||
| "SELECT single MOVE_PLANT FROM BAPI2093_RES_HEAD INTO @DATA(ld_move_plant). | ||||
| "SELECT single GR_RCPT FROM BAPI2093_RES_ITEM INTO @DATA(ld_gr_rcpt). | ||||
| "SELECT single WITHDRAWN FROM BAPI2093_RES_ITEM_CHANGE INTO @DATA(ld_withdrawn). | ||||
| DATA(ld_withdrawn) | = ' '. | |||
| "SELECT single DELETE_IND FROM BAPI2093_RES_ITEM_CHANGE INTO @DATA(ld_delete_ind). | ||||
| DATA(ld_delete_ind) | = ' '. | |||
| "SELECT single MOVEMENT FROM BAPI2093_RES_ITEM INTO @DATA(ld_movement). | ||||
| DATA(ld_movement) | = 'X'. | |||
Search for further information about these or an SAP related objects