SAP KBPP_COPY_VERSION Function Module for
KBPP_COPY_VERSION is a standard kbpp copy version SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 kbpp copy version FM, simply by entering the name KBPP_COPY_VERSION into the relevant SAP transaction such as SE37 or SE38.
Function Group: KBPP
Program Name: SAPLKBPP
Main Program: SAPLKBPP
Appliation area: K
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function KBPP_COPY_VERSION 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 'KBPP_COPY_VERSION'".
EXPORTING
IM_VERSION_SRC = "Source version
* IM_OVERWRITE_CHECK = ' ' "Safety popup: 'Overwrite data?'
IM_BPIN = "Further budget processor entries (application-dependent)
* IM_IMP01 = ' ' "Additional parameters (application-dependent)
* IM_IMP02 = ' ' "Additional parameters (application-dependent)
* IM_FUNDS_PARAM_EX = ' ' "
IM_VERSION_DEST = "Destination version
IM_TIME = "Time information for copying
* IM_COSTS = ' ' "Copy cost element planning ON/OFF
* IM_REVENUES = ' ' "Copy revenue element planning ON/OFF
* IM_STATISTIC = ' ' "Copy statistical key figures ON/OFF
* IM_DETAIL_PLAN = ' ' "Copy detail planning ON/OFF
* IM_FIN_CODE = ' ' "Financing code
IM_COPY_MODE = "Copy Mode
IMPORTING
EX_SUBRC = "Copy Result
E_DATACHANGED = "Data Was Changed
E_ERROR = "An error has occurred
E_COMMIT = "
TABLES
T_COPY = "Activities and value types to be copied
EXCEPTIONS
SRC_VERSION_NOT_FOUND = 1 FM_AREA_NOT_FOUND = 10 PROFILE_ERROR = 11 PROFILE_ERROR_YEAR = 12 PROFILE_ERROR_TOTAL = 13 YEAR_RANGE = 14 NO_TIME_SELECT = 15 TIME_SELECT_ONE_YEAR = 16 TIME_SELECT_NEG_RANGE = 17 TIME_SELECT_SRC_DEST_START = 18 NO_ACTIVITIES = 19 SRC_VERSION_NOT_USEABLE = 2 PROFILE_ERROR_PERIOD = 20 SRC_VERSION_NOT_COPY = 3 DEST_VERSION_NOT_FOUND = 4 DEST_VERSION_NOT_UPDATE = 5 SRC_AND_DEST_VERSION_EQUAL = 6 DEST_VERSION_NOT_USEABLE = 7 PROFILE_NOT_FOUND = 8 CONTROLLING_AREA_NOT_FOUND = 9
IMPORTING Parameters details for KBPP_COPY_VERSION
IM_VERSION_SRC - Source version
Data type: BPIN-VERSNOptional: No
Call by Reference: No ( called with pass by value option)
IM_OVERWRITE_CHECK - Safety popup: 'Overwrite data?'
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IM_BPIN - Further budget processor entries (application-dependent)
Data type: BPINOptional: No
Call by Reference: No ( called with pass by value option)
IM_IMP01 - Additional parameters (application-dependent)
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IM_IMP02 - Additional parameters (application-dependent)
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IM_FUNDS_PARAM_EX -
Data type: KBPP_COPY_VERSION_PARAM_EXDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IM_VERSION_DEST - Destination version
Data type: BPIN-VERSNOptional: No
Call by Reference: No ( called with pass by value option)
IM_TIME - Time information for copying
Data type: BPTIMEOptional: No
Call by Reference: No ( called with pass by value option)
IM_COSTS - Copy cost element planning ON/OFF
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IM_REVENUES - Copy revenue element planning ON/OFF
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IM_STATISTIC - Copy statistical key figures ON/OFF
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IM_DETAIL_PLAN - Copy detail planning ON/OFF
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IM_FIN_CODE - Financing code
Data type: BPIN-GEBERDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IM_COPY_MODE - Copy Mode
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for KBPP_COPY_VERSION
EX_SUBRC - Copy Result
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
E_DATACHANGED - Data Was Changed
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
E_ERROR - An error has occurred
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
E_COMMIT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for KBPP_COPY_VERSION
T_COPY - Activities and value types to be copied
Data type: BPCOPYOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
SRC_VERSION_NOT_FOUND - Source version does not exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FM_AREA_NOT_FOUND - FM area does not exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PROFILE_ERROR - Profile is defective (no overall, annual, period values allowed)
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PROFILE_ERROR_YEAR - Profile error: annual value processing not allowed
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PROFILE_ERROR_TOTAL - Profile error: overall value processing not allowed
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
YEAR_RANGE - Year in area not allowed
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_TIME_SELECT - Neither annual nor overall values chosen
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TIME_SELECT_ONE_YEAR - You may choose one year only
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TIME_SELECT_NEG_RANGE - Negative year area chosne
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TIME_SELECT_SRC_DEST_START - Reference and target have different start years
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_ACTIVITIES - No activities selected for copying
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SRC_VERSION_NOT_USEABLE - Source version may not be used
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PROFILE_ERROR_PERIOD - Profil error: period value processing not allowed
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SRC_VERSION_NOT_COPY - Source version may not be copied
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DEST_VERSION_NOT_FOUND - Destination version does not exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DEST_VERSION_NOT_UPDATE - Destination version may not be changed
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SRC_AND_DEST_VERSION_EQUAL - Source version and target version identical
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DEST_VERSION_NOT_USEABLE - Destination version must not be used
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PROFILE_NOT_FOUND - Entry not found in profile table
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CONTROLLING_AREA_NOT_FOUND - Controlling area does not exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for KBPP_COPY_VERSION 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_t_copy | TYPE STANDARD TABLE OF BPCOPY, " | |||
| lv_ex_subrc | TYPE BPCOPY, " | |||
| lv_im_version_src | TYPE BPIN-VERSN, " | |||
| lv_src_version_not_found | TYPE BPIN, " | |||
| lv_fm_area_not_found | TYPE BPIN, " | |||
| lv_im_overwrite_check | TYPE BPIN, " SPACE | |||
| lv_im_bpin | TYPE BPIN, " | |||
| lv_profile_error | TYPE BPIN, " | |||
| lv_im_imp01 | TYPE BPIN, " SPACE | |||
| lv_profile_error_year | TYPE BPIN, " | |||
| lv_im_imp02 | TYPE BPIN, " SPACE | |||
| lv_profile_error_total | TYPE BPIN, " | |||
| lv_year_range | TYPE BPIN, " | |||
| lv_im_funds_param_ex | TYPE KBPP_COPY_VERSION_PARAM_EX, " SPACE | |||
| lv_no_time_select | TYPE KBPP_COPY_VERSION_PARAM_EX, " | |||
| lv_time_select_one_year | TYPE KBPP_COPY_VERSION_PARAM_EX, " | |||
| lv_time_select_neg_range | TYPE KBPP_COPY_VERSION_PARAM_EX, " | |||
| lv_time_select_src_dest_start | TYPE KBPP_COPY_VERSION_PARAM_EX, " | |||
| lv_no_activities | TYPE KBPP_COPY_VERSION_PARAM_EX, " | |||
| lv_e_datachanged | TYPE KBPP_COPY_VERSION_PARAM_EX, " | |||
| lv_im_version_dest | TYPE BPIN-VERSN, " | |||
| lv_src_version_not_useable | TYPE BPIN, " | |||
| lv_profile_error_period | TYPE BPIN, " | |||
| lv_e_error | TYPE BPIN, " | |||
| lv_im_time | TYPE BPTIME, " | |||
| lv_src_version_not_copy | TYPE BPTIME, " | |||
| lv_e_commit | TYPE BPTIME, " | |||
| lv_im_costs | TYPE BPTIME, " SPACE | |||
| lv_dest_version_not_found | TYPE BPTIME, " | |||
| lv_im_revenues | TYPE BPTIME, " SPACE | |||
| lv_dest_version_not_update | TYPE BPTIME, " | |||
| lv_im_statistic | TYPE BPTIME, " SPACE | |||
| lv_src_and_dest_version_equal | TYPE BPTIME, " | |||
| lv_im_detail_plan | TYPE BPTIME, " SPACE | |||
| lv_dest_version_not_useable | TYPE BPTIME, " | |||
| lv_im_fin_code | TYPE BPIN-GEBER, " SPACE | |||
| lv_profile_not_found | TYPE BPIN, " | |||
| lv_im_copy_mode | TYPE BPIN, " | |||
| lv_controlling_area_not_found | TYPE BPIN. " |
|   CALL FUNCTION 'KBPP_COPY_VERSION' " |
| EXPORTING | ||
| IM_VERSION_SRC | = lv_im_version_src | |
| IM_OVERWRITE_CHECK | = lv_im_overwrite_check | |
| IM_BPIN | = lv_im_bpin | |
| IM_IMP01 | = lv_im_imp01 | |
| IM_IMP02 | = lv_im_imp02 | |
| IM_FUNDS_PARAM_EX | = lv_im_funds_param_ex | |
| IM_VERSION_DEST | = lv_im_version_dest | |
| IM_TIME | = lv_im_time | |
| IM_COSTS | = lv_im_costs | |
| IM_REVENUES | = lv_im_revenues | |
| IM_STATISTIC | = lv_im_statistic | |
| IM_DETAIL_PLAN | = lv_im_detail_plan | |
| IM_FIN_CODE | = lv_im_fin_code | |
| IM_COPY_MODE | = lv_im_copy_mode | |
| IMPORTING | ||
| EX_SUBRC | = lv_ex_subrc | |
| E_DATACHANGED | = lv_e_datachanged | |
| E_ERROR | = lv_e_error | |
| E_COMMIT | = lv_e_commit | |
| TABLES | ||
| T_COPY | = lt_t_copy | |
| EXCEPTIONS | ||
| SRC_VERSION_NOT_FOUND = 1 | ||
| FM_AREA_NOT_FOUND = 10 | ||
| PROFILE_ERROR = 11 | ||
| PROFILE_ERROR_YEAR = 12 | ||
| PROFILE_ERROR_TOTAL = 13 | ||
| YEAR_RANGE = 14 | ||
| NO_TIME_SELECT = 15 | ||
| TIME_SELECT_ONE_YEAR = 16 | ||
| TIME_SELECT_NEG_RANGE = 17 | ||
| TIME_SELECT_SRC_DEST_START = 18 | ||
| NO_ACTIVITIES = 19 | ||
| SRC_VERSION_NOT_USEABLE = 2 | ||
| PROFILE_ERROR_PERIOD = 20 | ||
| SRC_VERSION_NOT_COPY = 3 | ||
| DEST_VERSION_NOT_FOUND = 4 | ||
| DEST_VERSION_NOT_UPDATE = 5 | ||
| SRC_AND_DEST_VERSION_EQUAL = 6 | ||
| DEST_VERSION_NOT_USEABLE = 7 | ||
| PROFILE_NOT_FOUND = 8 | ||
| CONTROLLING_AREA_NOT_FOUND = 9 | ||
| . " KBPP_COPY_VERSION | ||
ABAP code using 7.40 inline data declarations to call FM KBPP_COPY_VERSION
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 VERSN FROM BPIN INTO @DATA(ld_im_version_src). | ||||
| DATA(ld_im_overwrite_check) | = ' '. | |||
| DATA(ld_im_imp01) | = ' '. | |||
| DATA(ld_im_imp02) | = ' '. | |||
| DATA(ld_im_funds_param_ex) | = ' '. | |||
| "SELECT single VERSN FROM BPIN INTO @DATA(ld_im_version_dest). | ||||
| DATA(ld_im_costs) | = ' '. | |||
| DATA(ld_im_revenues) | = ' '. | |||
| DATA(ld_im_statistic) | = ' '. | |||
| DATA(ld_im_detail_plan) | = ' '. | |||
| "SELECT single GEBER FROM BPIN INTO @DATA(ld_im_fin_code). | ||||
| DATA(ld_im_fin_code) | = ' '. | |||
Search for further information about these or an SAP related objects