SAP BAPI_REQUISITION_RELEASE Function Module for Release Purchase Requisition Item by Item









BAPI_REQUISITION_RELEASE is a standard bapi requisition release SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Release Purchase Requisition Item by Item 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 requisition release FM, simply by entering the name BAPI_REQUISITION_RELEASE into the relevant SAP transaction such as SE37 or SE38.

Function Group: MEWF
Program Name: SAPLMEWF
Main Program: SAPLMEWF
Appliation area: M
Release date: 31-Oct-1997
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function BAPI_REQUISITION_RELEASE 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_REQUISITION_RELEASE'"Release Purchase Requisition Item by Item
EXPORTING
NUMBER = "Purchase Requisition
REL_CODE = "Release Code
ITEM = "Purchase Requisition Item
* USE_EXCEPTIONS = 'X' "Set Exceptions and Issue Error Messages
* NO_COMMIT_WORK = ' ' "Circumvent COMMIT WORK

IMPORTING
REL_STATUS_NEW = "New Release Status
REL_INDICATOR_NEW = "New Release Indicator

TABLES
* RETURN = "Return Messages

EXCEPTIONS
AUTHORITY_CHECK_FAIL = 1 REQUISITION_NOT_FOUND = 2 ENQUEUE_FAIL = 3 PREREQUISITE_FAIL = 4 RELEASE_ALREADY_POSTED = 5 RESPONSIBILITY_FAIL = 6
.



IMPORTING Parameters details for BAPI_REQUISITION_RELEASE

NUMBER - Purchase Requisition

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

REL_CODE - Release Code

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

ITEM - Purchase Requisition Item

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

USE_EXCEPTIONS - Set Exceptions and Issue Error Messages

Data type: BAPIMMPARA-SELECTION
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

NO_COMMIT_WORK - Circumvent COMMIT WORK

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

EXPORTING Parameters details for BAPI_REQUISITION_RELEASE

REL_STATUS_NEW - New Release Status

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

REL_INDICATOR_NEW - New Release Indicator

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

TABLES Parameters details for BAPI_REQUISITION_RELEASE

RETURN - Return Messages

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

EXCEPTIONS details

AUTHORITY_CHECK_FAIL - No Authorization to Release

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

REQUISITION_NOT_FOUND - Purchase Requisition Does Not Exist

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

ENQUEUE_FAIL - Purchase Requisition Blocked

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

PREREQUISITE_FAIL - Release Prerequisite Not Satisfied

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

RELEASE_ALREADY_POSTED - Release Already Effected

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

RESPONSIBILITY_FAIL - Responsibility for Release Missing

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

Copy and paste ABAP code example for BAPI_REQUISITION_RELEASE 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_number  TYPE BAPI2009OB-PREQ_NO, "   
lt_return  TYPE STANDARD TABLE OF BAPIRETURN, "   
lv_rel_status_new  TYPE BAPIMMPARA-REL_STATUS, "   
lv_authority_check_fail  TYPE BAPIMMPARA, "   
lv_rel_code  TYPE BAPIMMPARA-REL_CODE, "   
lv_rel_indicator_new  TYPE BAPIMMPARA-REL_IND, "   
lv_requisition_not_found  TYPE BAPIMMPARA, "   
lv_item  TYPE BAPI2009OB-PREQ_ITEM, "   
lv_enqueue_fail  TYPE BAPI2009OB, "   
lv_use_exceptions  TYPE BAPIMMPARA-SELECTION, "   'X'
lv_prerequisite_fail  TYPE BAPIMMPARA, "   
lv_no_commit_work  TYPE BAPIFLAG-BAPIFLAG, "   SPACE
lv_release_already_posted  TYPE BAPIFLAG, "   
lv_responsibility_fail  TYPE BAPIFLAG. "   

  CALL FUNCTION 'BAPI_REQUISITION_RELEASE'  "Release Purchase Requisition Item by Item
    EXPORTING
         NUMBER = lv_number
         REL_CODE = lv_rel_code
         ITEM = lv_item
         USE_EXCEPTIONS = lv_use_exceptions
         NO_COMMIT_WORK = lv_no_commit_work
    IMPORTING
         REL_STATUS_NEW = lv_rel_status_new
         REL_INDICATOR_NEW = lv_rel_indicator_new
    TABLES
         RETURN = lt_return
    EXCEPTIONS
        AUTHORITY_CHECK_FAIL = 1
        REQUISITION_NOT_FOUND = 2
        ENQUEUE_FAIL = 3
        PREREQUISITE_FAIL = 4
        RELEASE_ALREADY_POSTED = 5
        RESPONSIBILITY_FAIL = 6
. " BAPI_REQUISITION_RELEASE




ABAP code using 7.40 inline data declarations to call FM BAPI_REQUISITION_RELEASE

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 PREQ_NO FROM BAPI2009OB INTO @DATA(ld_number).
 
 
"SELECT single REL_STATUS FROM BAPIMMPARA INTO @DATA(ld_rel_status_new).
 
 
"SELECT single REL_CODE FROM BAPIMMPARA INTO @DATA(ld_rel_code).
 
"SELECT single REL_IND FROM BAPIMMPARA INTO @DATA(ld_rel_indicator_new).
 
 
"SELECT single PREQ_ITEM FROM BAPI2009OB INTO @DATA(ld_item).
 
 
"SELECT single SELECTION FROM BAPIMMPARA INTO @DATA(ld_use_exceptions).
DATA(ld_use_exceptions) = 'X'.
 
 
"SELECT single BAPIFLAG FROM BAPIFLAG INTO @DATA(ld_no_commit_work).
DATA(ld_no_commit_work) = ' '.
 
 
 


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!