SAP KEDR_COPA_DERIVE Function Module for









KEDR_COPA_DERIVE is a standard kedr copa derive 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 kedr copa derive FM, simply by entering the name KEDR_COPA_DERIVE into the relevant SAP transaction such as SE37 or SE38.

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



Function KEDR_COPA_DERIVE 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 'KEDR_COPA_DERIVE'"
EXPORTING
I_ERKRS = "
* I_CHECK_CHIER_ONLY = "
* I_COPA_REO = "
I_ITEM = "
* I_TAB_EXCEPTIONS = "
* I_DERIVATION_DATE = SY-DATUM "
* I_DERIVE_ANYWAY = "
* I_TRACE_MODE = "
* I_TABNAME = "
* I_GLOBAL_FIELDS = "
* I_MASS_PROCESSING = "

IMPORTING
E_ITEM = "
E_TRACE_HANDLE = "
E_TAB_FIELDS_MODIFIED = "
E_TAB_USED_SOURCE_FIELDS = "

EXCEPTIONS
DERIVATION_FAILED = 1 CHECK_CHIER_FAILED = 2 CHECK_VALUES_FAILED = 3
.




Customer Function user exits

Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.
EXIT_SAPLKEDRCOPA_001 From Release 4.0: Exit in Characteristic Derivation

IMPORTING Parameters details for KEDR_COPA_DERIVE

I_ERKRS -

Data type: TKEB-ERKRS
Optional: No
Call by Reference: Yes

I_CHECK_CHIER_ONLY -

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

I_COPA_REO -

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

I_ITEM -

Data type:
Optional: No
Call by Reference: Yes

I_TAB_EXCEPTIONS -

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

I_DERIVATION_DATE -

Data type: SY-DATUM
Default: SY-DATUM
Optional: Yes
Call by Reference: Yes

I_DERIVE_ANYWAY -

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

I_TRACE_MODE -

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

I_TABNAME -

Data type: DNTAB-TABNAME
Optional: Yes
Call by Reference: Yes

I_GLOBAL_FIELDS -

Data type: KEDR_GLOBAL_FIELDS
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_MASS_PROCESSING -

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

EXPORTING Parameters details for KEDR_COPA_DERIVE

E_ITEM -

Data type:
Optional: No
Call by Reference: Yes

E_TRACE_HANDLE -

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

E_TAB_FIELDS_MODIFIED -

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

E_TAB_USED_SOURCE_FIELDS -

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

EXCEPTIONS details

DERIVATION_FAILED -

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

CHECK_CHIER_FAILED -

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

CHECK_VALUES_FAILED -

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

Copy and paste ABAP code example for KEDR_COPA_DERIVE 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_item  TYPE STRING, "   
lv_i_erkrs  TYPE TKEB-ERKRS, "   
lv_derivation_failed  TYPE TKEB, "   
lv_i_check_chier_only  TYPE KEDR_FLAG, "   
lv_i_copa_reo  TYPE KEDR_FLAG, "   
lv_i_item  TYPE KEDR_FLAG, "   
lv_e_trace_handle  TYPE KEDR_TRACE_HANDLE, "   
lv_check_chier_failed  TYPE KEDR_TRACE_HANDLE, "   
lv_i_tab_exceptions  TYPE KEDR_TAB_FIELDNAMES, "   
lv_check_values_failed  TYPE KEDR_TAB_FIELDNAMES, "   
lv_e_tab_fields_modified  TYPE KEDR_TAB_FIELDNAMES, "   
lv_i_derivation_date  TYPE SY-DATUM, "   SY-DATUM
lv_e_tab_used_source_fields  TYPE KEDR_TAB_FIELDNAMES, "   
lv_i_derive_anyway  TYPE KEDR_FLAG, "   
lv_i_trace_mode  TYPE KEDR_TRACE_MODE, "   
lv_i_tabname  TYPE DNTAB-TABNAME, "   
lv_i_global_fields  TYPE KEDR_GLOBAL_FIELDS, "   
lv_i_mass_processing  TYPE KEDR_FLAG. "   

  CALL FUNCTION 'KEDR_COPA_DERIVE'  "
    EXPORTING
         I_ERKRS = lv_i_erkrs
         I_CHECK_CHIER_ONLY = lv_i_check_chier_only
         I_COPA_REO = lv_i_copa_reo
         I_ITEM = lv_i_item
         I_TAB_EXCEPTIONS = lv_i_tab_exceptions
         I_DERIVATION_DATE = lv_i_derivation_date
         I_DERIVE_ANYWAY = lv_i_derive_anyway
         I_TRACE_MODE = lv_i_trace_mode
         I_TABNAME = lv_i_tabname
         I_GLOBAL_FIELDS = lv_i_global_fields
         I_MASS_PROCESSING = lv_i_mass_processing
    IMPORTING
         E_ITEM = lv_e_item
         E_TRACE_HANDLE = lv_e_trace_handle
         E_TAB_FIELDS_MODIFIED = lv_e_tab_fields_modified
         E_TAB_USED_SOURCE_FIELDS = lv_e_tab_used_source_fields
    EXCEPTIONS
        DERIVATION_FAILED = 1
        CHECK_CHIER_FAILED = 2
        CHECK_VALUES_FAILED = 3
. " KEDR_COPA_DERIVE




ABAP code using 7.40 inline data declarations to call FM KEDR_COPA_DERIVE

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 ERKRS FROM TKEB INTO @DATA(ld_i_erkrs).
 
 
 
 
 
 
 
 
 
 
"SELECT single DATUM FROM SY INTO @DATA(ld_i_derivation_date).
DATA(ld_i_derivation_date) = SY-DATUM.
 
 
 
 
"SELECT single TABNAME FROM DNTAB INTO @DATA(ld_i_tabname).
 
 
 


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!