SAP FWBU_POSTING_REVERSAL_EXECUTE Function Module for TRTMSE: Reverse Posting Function: Update on Database
FWBU_POSTING_REVERSAL_EXECUTE is a standard fwbu posting reversal execute SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for TRTMSE: Reverse Posting Function: Update on Database 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 fwbu posting reversal execute FM, simply by entering the name FWBU_POSTING_REVERSAL_EXECUTE into the relevant SAP transaction such as SE37 or SE38.
Function Group: FWBU
Program Name: SAPLFWBU
Main Program: SAPLFWBU
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FWBU_POSTING_REVERSAL_EXECUTE 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 'FWBU_POSTING_REVERSAL_EXECUTE'"TRTMSE: Reverse Posting Function: Update on Database.
EXPORTING
I_BUKRS = "Company Code
* I_FLAG_FI_REVERSAL = 'X' "Storno auch im Hauptbuch?
I_TCODE = "Transaction Code of Calling Program
I_RPNNR = "Daybk No.
I_REVERSAL_RECORDS = "zu stornierende Buchungen
I_ACTUAL_RECORDS = "alte Istsätze zu beteiligten Beständen
I_MEMO_RECORDS = "alte Plansätze zu beteiligten Beständen
I_REVERSAL_REASON = "Reason for Reversal
I_REVERSAL_REASON_FI = "FI Reversal Reason
I_POSTING_DATE = "Posting Date
I_POSTING_PERIOD = "Fiscal Period
IMPORTING
E_REVERSAL_SUCCESSFULLY_POSTED = "
EXCEPTIONS
I_BUKRS_INITIAL = 1 I_RPNNR_INITIAL = 2 NO_AUTHORITY = 3 POSTING_ABORTED = 4
IMPORTING Parameters details for FWBU_POSTING_REVERSAL_EXECUTE
I_BUKRS - Company Code
Data type: BUKRSOptional: No
Call by Reference: No ( called with pass by value option)
I_FLAG_FI_REVERSAL - Storno auch im Hauptbuch?
Data type: CDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_TCODE - Transaction Code of Calling Program
Data type: SY-TCODEOptional: No
Call by Reference: No ( called with pass by value option)
I_RPNNR - Daybk No.
Data type: VWBEKI-RPNNROptional: No
Call by Reference: No ( called with pass by value option)
I_REVERSAL_RECORDS - zu stornierende Buchungen
Data type: TRPM_IT_VWBEVIOptional: No
Call by Reference: No ( called with pass by value option)
I_ACTUAL_RECORDS - alte Istsätze zu beteiligten Beständen
Data type: TRPM_IT_VWBEVIOptional: No
Call by Reference: No ( called with pass by value option)
I_MEMO_RECORDS - alte Plansätze zu beteiligten Beständen
Data type: TRPM_IT_VWBEPPOptional: No
Call by Reference: No ( called with pass by value option)
I_REVERSAL_REASON - Reason for Reversal
Data type: VWBEKI-SSTOGRDOptional: No
Call by Reference: No ( called with pass by value option)
I_REVERSAL_REASON_FI - FI Reversal Reason
Data type: STGRDOptional: No
Call by Reference: No ( called with pass by value option)
I_POSTING_DATE - Posting Date
Data type: VWBEKI-DBUDATOptional: No
Call by Reference: No ( called with pass by value option)
I_POSTING_PERIOD - Fiscal Period
Data type: MONATOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for FWBU_POSTING_REVERSAL_EXECUTE
E_REVERSAL_SUCCESSFULLY_POSTED -
Data type: COptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
I_BUKRS_INITIAL - Company code has initial value
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
I_RPNNR_INITIAL - Primanota initial
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_AUTHORITY - keine Berechtigung zum Stornieren
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
POSTING_ABORTED - Update terminated
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for FWBU_POSTING_REVERSAL_EXECUTE 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_i_bukrs | TYPE BUKRS, " | |||
| lv_i_bukrs_initial | TYPE BUKRS, " | |||
| lv_e_reversal_successfully_posted | TYPE C, " | |||
| lv_i_flag_fi_reversal | TYPE C, " 'X' | |||
| lv_i_tcode | TYPE SY-TCODE, " | |||
| lv_i_rpnnr | TYPE VWBEKI-RPNNR, " | |||
| lv_i_rpnnr_initial | TYPE VWBEKI, " | |||
| lv_no_authority | TYPE VWBEKI, " | |||
| lv_i_reversal_records | TYPE TRPM_IT_VWBEVI, " | |||
| lv_posting_aborted | TYPE TRPM_IT_VWBEVI, " | |||
| lv_i_actual_records | TYPE TRPM_IT_VWBEVI, " | |||
| lv_i_memo_records | TYPE TRPM_IT_VWBEPP, " | |||
| lv_i_reversal_reason | TYPE VWBEKI-SSTOGRD, " | |||
| lv_i_reversal_reason_fi | TYPE STGRD, " | |||
| lv_i_posting_date | TYPE VWBEKI-DBUDAT, " | |||
| lv_i_posting_period | TYPE MONAT. " |
|   CALL FUNCTION 'FWBU_POSTING_REVERSAL_EXECUTE' "TRTMSE: Reverse Posting Function: Update on Database |
| EXPORTING | ||
| I_BUKRS | = lv_i_bukrs | |
| I_FLAG_FI_REVERSAL | = lv_i_flag_fi_reversal | |
| I_TCODE | = lv_i_tcode | |
| I_RPNNR | = lv_i_rpnnr | |
| I_REVERSAL_RECORDS | = lv_i_reversal_records | |
| I_ACTUAL_RECORDS | = lv_i_actual_records | |
| I_MEMO_RECORDS | = lv_i_memo_records | |
| I_REVERSAL_REASON | = lv_i_reversal_reason | |
| I_REVERSAL_REASON_FI | = lv_i_reversal_reason_fi | |
| I_POSTING_DATE | = lv_i_posting_date | |
| I_POSTING_PERIOD | = lv_i_posting_period | |
| IMPORTING | ||
| E_REVERSAL_SUCCESSFULLY_POSTED | = lv_e_reversal_successfully_posted | |
| EXCEPTIONS | ||
| I_BUKRS_INITIAL = 1 | ||
| I_RPNNR_INITIAL = 2 | ||
| NO_AUTHORITY = 3 | ||
| POSTING_ABORTED = 4 | ||
| . " FWBU_POSTING_REVERSAL_EXECUTE | ||
ABAP code using 7.40 inline data declarations to call FM FWBU_POSTING_REVERSAL_EXECUTE
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.| DATA(ld_i_flag_fi_reversal) | = 'X'. | |||
| "SELECT single TCODE FROM SY INTO @DATA(ld_i_tcode). | ||||
| "SELECT single RPNNR FROM VWBEKI INTO @DATA(ld_i_rpnnr). | ||||
| "SELECT single SSTOGRD FROM VWBEKI INTO @DATA(ld_i_reversal_reason). | ||||
| "SELECT single DBUDAT FROM VWBEKI INTO @DATA(ld_i_posting_date). | ||||
Search for further information about these or an SAP related objects