SAP KCPY_PLANNED_COSTS_TAKE_OVER Function Module for NOTRANSL: Übernahme Plankosten von Netzplänen auf PSP-Elemente









KCPY_PLANNED_COSTS_TAKE_OVER is a standard kcpy planned costs take over SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Übernahme Plankosten von Netzplänen auf PSP-Elemente 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 kcpy planned costs take over FM, simply by entering the name KCPY_PLANNED_COSTS_TAKE_OVER into the relevant SAP transaction such as SE37 or SE38.

Function Group: KCPY
Program Name: SAPLKCPY
Main Program: SAPLKCPY
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function KCPY_PLANNED_COSTS_TAKE_OVER 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 'KCPY_PLANNED_COSTS_TAKE_OVER'"NOTRANSL: Übernahme Plankosten von Netzplänen auf PSP-Elemente
EXPORTING
I_VERSION_SOURCE = "Source Version
I_VERSION_TARGET = "Target Version
I_KOKRS = "Controlling Area
* I_COMMIT = 'X' "
* I_CHECK = "
I_YEAR = "
I_PERAB = "Selection Table with Field Name
I_PERBI = "To Period

IMPORTING
E_EXIT = "

TABLES
T_OBJNR = "Table with Object Numbers
* T_LIST = "Log Table
* T_MESG = "Collected Messages
* T_OBJ_LIST = "
T_OBJNR_WBS = "Project System object data (IDs and selected fields)

EXCEPTIONS
VERSION_NOT_ALLOWED = 1 NO_DATA_SELECTED = 2
.



IMPORTING Parameters details for KCPY_PLANNED_COSTS_TAKE_OVER

I_VERSION_SOURCE - Source Version

Data type: TKA09-VERSN
Optional: No
Call by Reference: No ( called with pass by value option)

I_VERSION_TARGET - Target Version

Data type: TKA09-VERSN
Optional: No
Call by Reference: No ( called with pass by value option)

I_KOKRS - Controlling Area

Data type: TKA01-KOKRS
Optional: No
Call by Reference: No ( called with pass by value option)

I_COMMIT -

Data type: BOOLE-BOOLE
Default: 'X'
Optional: Yes
Call by Reference: Yes

I_CHECK -

Data type: BOOLE-BOOLE
Optional: Yes
Call by Reference: Yes

I_YEAR -

Data type: COSPA-GJAHR
Optional: No
Call by Reference: Yes

I_PERAB - Selection Table with Field Name

Data type: COBK-PERAB
Optional: No
Call by Reference: Yes

I_PERBI - To Period

Data type: COBK-PERBI
Optional: No
Call by Reference: Yes

EXPORTING Parameters details for KCPY_PLANNED_COSTS_TAKE_OVER

E_EXIT -

Data type: BOOLE-BOOLE
Optional: No
Call by Reference: Yes

TABLES Parameters details for KCPY_PLANNED_COSTS_TAKE_OVER

T_OBJNR - Table with Object Numbers

Data type: LFOBJ
Optional: No
Call by Reference: Yes

T_LIST - Log Table

Data type: KCPY_S_DONE
Optional: Yes
Call by Reference: Yes

T_MESG - Collected Messages

Data type: KALK_MESG_TYPE_TAB
Optional: Yes
Call by Reference: Yes

T_OBJ_LIST -

Data type: KPU3_LIST
Optional: Yes
Call by Reference: Yes

T_OBJNR_WBS - Project System object data (IDs and selected fields)

Data type: LFOBJ
Optional: No
Call by Reference: Yes

EXCEPTIONS details

VERSION_NOT_ALLOWED -

Data type:
Optional: No
Call by Reference: Yes

NO_DATA_SELECTED -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for KCPY_PLANNED_COSTS_TAKE_OVER 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_e_exit  TYPE BOOLE-BOOLE, "   
lt_t_objnr  TYPE STANDARD TABLE OF LFOBJ, "   
lv_i_version_source  TYPE TKA09-VERSN, "   
lv_version_not_allowed  TYPE TKA09, "   
lt_t_list  TYPE STANDARD TABLE OF KCPY_S_DONE, "   
lv_i_version_target  TYPE TKA09-VERSN, "   
lv_no_data_selected  TYPE TKA09, "   
lt_t_mesg  TYPE STANDARD TABLE OF KALK_MESG_TYPE_TAB, "   
lv_i_kokrs  TYPE TKA01-KOKRS, "   
lv_i_commit  TYPE BOOLE-BOOLE, "   'X'
lt_t_obj_list  TYPE STANDARD TABLE OF KPU3_LIST, "   
lv_i_check  TYPE BOOLE-BOOLE, "   
lt_t_objnr_wbs  TYPE STANDARD TABLE OF LFOBJ, "   
lv_i_year  TYPE COSPA-GJAHR, "   
lv_i_perab  TYPE COBK-PERAB, "   
lv_i_perbi  TYPE COBK-PERBI. "   

  CALL FUNCTION 'KCPY_PLANNED_COSTS_TAKE_OVER'  "NOTRANSL: Übernahme Plankosten von Netzplänen auf PSP-Elemente
    EXPORTING
         I_VERSION_SOURCE = lv_i_version_source
         I_VERSION_TARGET = lv_i_version_target
         I_KOKRS = lv_i_kokrs
         I_COMMIT = lv_i_commit
         I_CHECK = lv_i_check
         I_YEAR = lv_i_year
         I_PERAB = lv_i_perab
         I_PERBI = lv_i_perbi
    IMPORTING
         E_EXIT = lv_e_exit
    TABLES
         T_OBJNR = lt_t_objnr
         T_LIST = lt_t_list
         T_MESG = lt_t_mesg
         T_OBJ_LIST = lt_t_obj_list
         T_OBJNR_WBS = lt_t_objnr_wbs
    EXCEPTIONS
        VERSION_NOT_ALLOWED = 1
        NO_DATA_SELECTED = 2
. " KCPY_PLANNED_COSTS_TAKE_OVER




ABAP code using 7.40 inline data declarations to call FM KCPY_PLANNED_COSTS_TAKE_OVER

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 BOOLE FROM BOOLE INTO @DATA(ld_e_exit).
 
 
"SELECT single VERSN FROM TKA09 INTO @DATA(ld_i_version_source).
 
 
 
"SELECT single VERSN FROM TKA09 INTO @DATA(ld_i_version_target).
 
 
 
"SELECT single KOKRS FROM TKA01 INTO @DATA(ld_i_kokrs).
 
"SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_commit).
DATA(ld_i_commit) = 'X'.
 
 
"SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_check).
 
 
"SELECT single GJAHR FROM COSPA INTO @DATA(ld_i_year).
 
"SELECT single PERAB FROM COBK INTO @DATA(ld_i_perab).
 
"SELECT single PERBI FROM COBK INTO @DATA(ld_i_perbi).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!