SAP BAPI_EXPENDITUREPROGTREE_REASS Function Module for Reassign Program Sub-Tree
BAPI_EXPENDITUREPROGTREE_REASS is a standard bapi expenditureprogtree reass SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Reassign Program Sub-Tree 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 expenditureprogtree reass FM, simply by entering the name BAPI_EXPENDITUREPROGTREE_REASS into the relevant SAP transaction such as SE37 or SE38.
Function Group: 1158
Program Name: SAPL1158
Main Program: SAPL1158
Appliation area: A
Release date: 19-Feb-1999
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_EXPENDITUREPROGTREE_REASS 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_EXPENDITUREPROGTREE_REASS'"Reassign Program Sub-Tree.
EXPORTING
PROGRAM = "Program Name
APPROVALYEAR = "Approval Year of Program
POSITION = "Position ID
* PARENT_NEW = "New ID of Parent Position
* PREDECESSOR_NEW = ' ' "New ID of Predecessor
* TEST_RUN = ' ' "Test Run
* SUPPL_RET_INDIC = 'X' "'Budget Adjustment as Supplement or Return' Indicator
TABLES
* RETURN = "Return Messages
IMPORTING Parameters details for BAPI_EXPENDITUREPROGTREE_REASS
PROGRAM - Program Name
Data type: BAPIPROGPOSID-PROGRAMOptional: No
Call by Reference: No ( called with pass by value option)
APPROVALYEAR - Approval Year of Program
Data type: BAPIPROGPOSID-APPROVALYEAROptional: No
Call by Reference: No ( called with pass by value option)
POSITION - Position ID
Data type: BAPIPROGPOSID-POSITIONOptional: No
Call by Reference: No ( called with pass by value option)
PARENT_NEW - New ID of Parent Position
Data type: BAPIPROGAUX-PARENTNEWOptional: Yes
Call by Reference: No ( called with pass by value option)
PREDECESSOR_NEW - New ID of Predecessor
Data type: BAPIPROGAUX-PREDECESSORNEWDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
TEST_RUN - Test Run
Data type: BAPIPROGAUX-TEST_RUNDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
SUPPL_RET_INDIC - 'Budget Adjustment as Supplement or Return' Indicator
Data type: BAPIPROGAUX-SUPPL_RET_INDICDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_EXPENDITUREPROGTREE_REASS
RETURN - Return Messages
Data type: BAPIRET2Optional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BAPI_EXPENDITUREPROGTREE_REASS 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_program | TYPE BAPIPROGPOSID-PROGRAM, " | |||
| lv_approvalyear | TYPE BAPIPROGPOSID-APPROVALYEAR, " | |||
| lv_position | TYPE BAPIPROGPOSID-POSITION, " | |||
| lv_parent_new | TYPE BAPIPROGAUX-PARENTNEW, " | |||
| lv_predecessor_new | TYPE BAPIPROGAUX-PREDECESSORNEW, " ' ' | |||
| lv_test_run | TYPE BAPIPROGAUX-TEST_RUN, " ' ' | |||
| lv_suppl_ret_indic | TYPE BAPIPROGAUX-SUPPL_RET_INDIC. " 'X' |
|   CALL FUNCTION 'BAPI_EXPENDITUREPROGTREE_REASS' "Reassign Program Sub-Tree |
| EXPORTING | ||
| PROGRAM | = lv_program | |
| APPROVALYEAR | = lv_approvalyear | |
| POSITION | = lv_position | |
| PARENT_NEW | = lv_parent_new | |
| PREDECESSOR_NEW | = lv_predecessor_new | |
| TEST_RUN | = lv_test_run | |
| SUPPL_RET_INDIC | = lv_suppl_ret_indic | |
| TABLES | ||
| RETURN | = lt_return | |
| . " BAPI_EXPENDITUREPROGTREE_REASS | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_EXPENDITUREPROGTREE_REASS
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 PROGRAM FROM BAPIPROGPOSID INTO @DATA(ld_program). | ||||
| "SELECT single APPROVALYEAR FROM BAPIPROGPOSID INTO @DATA(ld_approvalyear). | ||||
| "SELECT single POSITION FROM BAPIPROGPOSID INTO @DATA(ld_position). | ||||
| "SELECT single PARENTNEW FROM BAPIPROGAUX INTO @DATA(ld_parent_new). | ||||
| "SELECT single PREDECESSORNEW FROM BAPIPROGAUX INTO @DATA(ld_predecessor_new). | ||||
| DATA(ld_predecessor_new) | = ' '. | |||
| "SELECT single TEST_RUN FROM BAPIPROGAUX INTO @DATA(ld_test_run). | ||||
| DATA(ld_test_run) | = ' '. | |||
| "SELECT single SUPPL_RET_INDIC FROM BAPIPROGAUX INTO @DATA(ld_suppl_ret_indic). | ||||
| DATA(ld_suppl_ret_indic) | = 'X'. | |||
Search for further information about these or an SAP related objects