SAP BAPI_PPLAN_REVERSE Function Module for Payment Plan Reversal
BAPI_PPLAN_REVERSE is a standard bapi pplan reverse SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Payment Plan Reversal 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 pplan reverse FM, simply by entering the name BAPI_PPLAN_REVERSE into the relevant SAP transaction such as SE37 or SE38.
Function Group: VKK_BAPI_PPLAN
Program Name: SAPLVKK_BAPI_PPLAN
Main Program: SAPLVKK_BAPI_PPLAN
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_PPLAN_REVERSE 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_PPLAN_REVERSE'"Payment Plan Reversal.
EXPORTING
* POST_TO = '00000000' "To posting date
* RESET_CLEARING = ' ' "Boolean Variables (X=true, space=false)
* TEST_RUN = 'X' "Boolean Variables (X=true, space=false)
BUSPARTNER = "Business Partner Number
CONTRACT = "Reference Specifications from Contract
PAYPLANITEM = "Item ID
BUSCASE = "Business Transaction Number
REVERSAL_FROM = "Reversal from Date
REVERSAL_TO = "Reversal To-Date
* EARLY_ENDING = ' ' "Boolean Variables (X=true, space=false)
TABLES
RETURN = "Return Parameter(s)
IMPORTING Parameters details for BAPI_PPLAN_REVERSE
POST_TO - To posting date
Data type: BAPI_PPLAN_CONTROL-POST_TO_DATEDefault: '00000000'
Optional: Yes
Call by Reference: No ( called with pass by value option)
RESET_CLEARING - Boolean Variables (X=true, space=false)
Data type: BAPI_PPLAN_CONTROL-RESET_CLEARINGDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
TEST_RUN - Boolean Variables (X=true, space=false)
Data type: BAPI_PPLAN_CONTROL-TEST_RUNDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
BUSPARTNER - Business Partner Number
Data type: BAPI_PPLAN_CONTROL-BUSPARTNEROptional: No
Call by Reference: No ( called with pass by value option)
CONTRACT - Reference Specifications from Contract
Data type: BAPI_PPLAN_CONTROL-CONTRACTOptional: No
Call by Reference: No ( called with pass by value option)
PAYPLANITEM - Item ID
Data type: BAPI_PPLAN_CONTROL-PAYPLANITEMOptional: No
Call by Reference: No ( called with pass by value option)
BUSCASE - Business Transaction Number
Data type: BAPI_PPLAN_CONTROL-BUSCASEOptional: No
Call by Reference: No ( called with pass by value option)
REVERSAL_FROM - Reversal from Date
Data type: BAPI_PPLAN_CONTROL-REVFROMDATEOptional: No
Call by Reference: No ( called with pass by value option)
REVERSAL_TO - Reversal To-Date
Data type: BAPI_PPLAN_CONTROL-REVTODATEOptional: No
Call by Reference: No ( called with pass by value option)
EARLY_ENDING - Boolean Variables (X=true, space=false)
Data type: BAPI_PPLAN_CONTROL-EARLY_ENDINGDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_PPLAN_REVERSE
RETURN - Return Parameter(s)
Data type: BAPIRET2Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for BAPI_PPLAN_REVERSE 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: | ||||
| lt_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lv_post_to | TYPE BAPI_PPLAN_CONTROL-POST_TO_DATE, " '00000000' | |||
| lv_reset_clearing | TYPE BAPI_PPLAN_CONTROL-RESET_CLEARING, " ' ' | |||
| lv_test_run | TYPE BAPI_PPLAN_CONTROL-TEST_RUN, " 'X' | |||
| lv_buspartner | TYPE BAPI_PPLAN_CONTROL-BUSPARTNER, " | |||
| lv_contract | TYPE BAPI_PPLAN_CONTROL-CONTRACT, " | |||
| lv_payplanitem | TYPE BAPI_PPLAN_CONTROL-PAYPLANITEM, " | |||
| lv_buscase | TYPE BAPI_PPLAN_CONTROL-BUSCASE, " | |||
| lv_reversal_from | TYPE BAPI_PPLAN_CONTROL-REVFROMDATE, " | |||
| lv_reversal_to | TYPE BAPI_PPLAN_CONTROL-REVTODATE, " | |||
| lv_early_ending | TYPE BAPI_PPLAN_CONTROL-EARLY_ENDING. " ' ' |
|   CALL FUNCTION 'BAPI_PPLAN_REVERSE' "Payment Plan Reversal |
| EXPORTING | ||
| POST_TO | = lv_post_to | |
| RESET_CLEARING | = lv_reset_clearing | |
| TEST_RUN | = lv_test_run | |
| BUSPARTNER | = lv_buspartner | |
| CONTRACT | = lv_contract | |
| PAYPLANITEM | = lv_payplanitem | |
| BUSCASE | = lv_buscase | |
| REVERSAL_FROM | = lv_reversal_from | |
| REVERSAL_TO | = lv_reversal_to | |
| EARLY_ENDING | = lv_early_ending | |
| TABLES | ||
| RETURN | = lt_return | |
| . " BAPI_PPLAN_REVERSE | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_PPLAN_REVERSE
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 POST_TO_DATE FROM BAPI_PPLAN_CONTROL INTO @DATA(ld_post_to). | ||||
| DATA(ld_post_to) | = '00000000'. | |||
| "SELECT single RESET_CLEARING FROM BAPI_PPLAN_CONTROL INTO @DATA(ld_reset_clearing). | ||||
| DATA(ld_reset_clearing) | = ' '. | |||
| "SELECT single TEST_RUN FROM BAPI_PPLAN_CONTROL INTO @DATA(ld_test_run). | ||||
| DATA(ld_test_run) | = 'X'. | |||
| "SELECT single BUSPARTNER FROM BAPI_PPLAN_CONTROL INTO @DATA(ld_buspartner). | ||||
| "SELECT single CONTRACT FROM BAPI_PPLAN_CONTROL INTO @DATA(ld_contract). | ||||
| "SELECT single PAYPLANITEM FROM BAPI_PPLAN_CONTROL INTO @DATA(ld_payplanitem). | ||||
| "SELECT single BUSCASE FROM BAPI_PPLAN_CONTROL INTO @DATA(ld_buscase). | ||||
| "SELECT single REVFROMDATE FROM BAPI_PPLAN_CONTROL INTO @DATA(ld_reversal_from). | ||||
| "SELECT single REVTODATE FROM BAPI_PPLAN_CONTROL INTO @DATA(ld_reversal_to). | ||||
| "SELECT single EARLY_ENDING FROM BAPI_PPLAN_CONTROL INTO @DATA(ld_early_ending). | ||||
| DATA(ld_early_ending) | = ' '. | |||
Search for further information about these or an SAP related objects