SAP Function Modules

BAPI_REQUISITION_RESET_RELEASE SAP Function module - Cancel Release of Purchase Requisition Items







BAPI_REQUISITION_RESET_RELEASE 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_REQUISITION_RESET_RELEASE into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: MEWF
Released Date: 31.10.1997
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM BAPI_REQUISITION_RESET_RELEASE - BAPI REQUISITION RESET RELEASE





CALL FUNCTION 'BAPI_REQUISITION_RESET_RELEASE' "Cancel Release of Purchase Requisition Items
  EXPORTING
    number =                    " bapi2009ob-preq_no  Purchase Requisition
    item =                      " bapi2009ob-preq_item  Purchase Requisition Item
    rel_code =                  " bapimmpara-rel_code  Release Code
*   use_exceptions = 'X'        " bapimmpara-selection  Set Exceptions and Issue Error Messages
*   no_commit_work = SPACE      " bapiflag-bapiflag  Single-Character Indicator
  IMPORTING
    rel_status_new =            " bapimmpara-rel_status  Previous Release Code
    rel_indicator_new =         " bapimmpara-rel_ind  Previous Release Indicator
* TABLES
*   return =                    " bapireturn    Return Messages
  EXCEPTIONS
    AUTHORITY_CHECK_FAIL = 1    "               No Authorization to Release
    REQUISITION_NOT_FOUND = 2   "               Purchase Requisition Does Not Exist
    ENQUEUE_FAIL = 3            "               Purchase Requisition Blocked
    PREREQUISITE_FAIL = 4       "               Release Prerequisite Not Satisfied
    RELEASE_ALREADY_POSTED = 5  "               Release Already Cancelled
    RESPONSIBILITY_FAIL = 6     "               Responsibility for Release Missing
    NO_RELEASE_ALREADY = 7      "               Purchase Requisition Not Yet Released
    NO_NEW_RELEASE_INDICATOR = 8  "             No New Release Status Determinable
    .  "  BAPI_REQUISITION_RESET_RELEASE

ABAP code example for Function Module BAPI_REQUISITION_RESET_RELEASE





The ABAP code below is a full code listing to execute function module BAPI_REQUISITION_RESET_RELEASE 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).

DATA:
ld_rel_status_new  TYPE BAPIMMPARA-REL_STATUS ,
ld_rel_indicator_new  TYPE BAPIMMPARA-REL_IND ,
it_return  TYPE STANDARD TABLE OF BAPIRETURN,"TABLES PARAM
wa_return  LIKE LINE OF it_return .


DATA(ld_number) = some text here

DATA(ld_item) = Check type of data required

DATA(ld_rel_code) = some text here

DATA(ld_use_exceptions) = some text here

DATA(ld_no_commit_work) = some text here

"populate fields of struture and append to itab
append wa_return to it_return. . CALL FUNCTION 'BAPI_REQUISITION_RESET_RELEASE' EXPORTING number = ld_number item = ld_item rel_code = ld_rel_code * use_exceptions = ld_use_exceptions * no_commit_work = ld_no_commit_work IMPORTING rel_status_new = ld_rel_status_new rel_indicator_new = ld_rel_indicator_new * TABLES * return = it_return EXCEPTIONS AUTHORITY_CHECK_FAIL = 1 REQUISITION_NOT_FOUND = 2 ENQUEUE_FAIL = 3 PREREQUISITE_FAIL = 4 RELEASE_ALREADY_POSTED = 5 RESPONSIBILITY_FAIL = 6 NO_RELEASE_ALREADY = 7 NO_NEW_RELEASE_INDICATOR = 8 . " BAPI_REQUISITION_RESET_RELEASE
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 8. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

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:
ld_rel_status_new  TYPE BAPIMMPARA-REL_STATUS ,
ld_number  TYPE BAPI2009OB-PREQ_NO ,
it_return  TYPE STANDARD TABLE OF BAPIRETURN ,
wa_return  LIKE LINE OF it_return,
ld_rel_indicator_new  TYPE BAPIMMPARA-REL_IND ,
ld_item  TYPE BAPI2009OB-PREQ_ITEM ,
ld_rel_code  TYPE BAPIMMPARA-REL_CODE ,
ld_use_exceptions  TYPE BAPIMMPARA-SELECTION ,
ld_no_commit_work  TYPE BAPIFLAG-BAPIFLAG .


ld_number = some text here

"populate fields of struture and append to itab
append wa_return to it_return.

ld_item = Check type of data required

ld_rel_code = some text here

ld_use_exceptions = some text here

ld_no_commit_work = some text here

SAP Documentation for FM BAPI_REQUISITION_RESET_RELEASE


This method can be used to cancel the release (= revoke approval) of purchase requisitions. The requisition number/item and the release code ...See here for full SAP fm documentation





Contribute (Add Comments)

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_REQUISITION_RESET_RELEASE or its description.