SAP COPA_ITEM_CONV_AND_PRICING Function Module for









COPA_ITEM_CONV_AND_PRICING is a standard copa item conv and pricing 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 copa item conv and pricing FM, simply by entering the name COPA_ITEM_CONV_AND_PRICING into the relevant SAP transaction such as SE37 or SE38.

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



Function COPA_ITEM_CONV_AND_PRICING 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 'COPA_ITEM_CONV_AND_PRICING'"
EXPORTING
I_ERKRS = "
* I_VERSI = '000' "
* I_VALUTYP = '0' "
* I_CURRENCY_MODE = "
I_ITEM = "
* I_ERROR_IGNORE = ' ' "
* I_CONDITION_ANALYSIS = ' ' "
* I_TRACE_MODE_BEAN = "
* I_TRACE_MODE_COPC = "
* I_BWFKT = '01' "

IMPORTING
ET_ITEMS = "
ET_PRICED_FIELDS = "
E_SUBRC = "
E_TRACE_HANDLE_COPC = "
E_TRACE_HANDLE_BEAN = "

TABLES
* IT_FIELDTAB = "

EXCEPTIONS
PRICING_ERROR = 1
.




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_SAPLKECU_001 User Exit for Determining the Exchange Rate Type

IMPORTING Parameters details for COPA_ITEM_CONV_AND_PRICING

I_ERKRS -

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

I_VERSI -

Data type: TKEVA01-VERSI
Default: '000'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_VALUTYP -

Data type: CEST0-VALUTYP
Default: '0'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_CURRENCY_MODE -

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

I_ITEM -

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

I_ERROR_IGNORE -

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

I_CONDITION_ANALYSIS -

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

I_TRACE_MODE_BEAN -

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

I_TRACE_MODE_COPC -

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

I_BWFKT -

Data type: TKEVA01-BWFKT
Default: '01'
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for COPA_ITEM_CONV_AND_PRICING

ET_ITEMS -

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

ET_PRICED_FIELDS -

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

E_SUBRC -

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

E_TRACE_HANDLE_COPC -

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

E_TRACE_HANDLE_BEAN -

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

TABLES Parameters details for COPA_ITEM_CONV_AND_PRICING

IT_FIELDTAB -

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

EXCEPTIONS details

PRICING_ERROR -

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

Copy and paste ABAP code example for COPA_ITEM_CONV_AND_PRICING 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_i_erkrs  TYPE TKEB-ERKRS, "   
lv_et_items  TYPE TABLE, "   
lt_it_fieldtab  TYPE STANDARD TABLE OF RKEA1_FIELDTAB, "   
lv_pricing_error  TYPE RKEA1_FIELDTAB, "   
lv_i_versi  TYPE TKEVA01-VERSI, "   '000'
lv_i_valutyp  TYPE CEST0-VALUTYP, "   '0'
lv_et_priced_fields  TYPE RKEI1_YT_FIELD, "   
lv_e_subrc  TYPE SY-SUBRC, "   
lv_i_currency_mode  TYPE C, "   
lv_i_item  TYPE C, "   
lv_e_trace_handle_copc  TYPE KEDR_TRACE_HANDLE, "   
lv_i_error_ignore  TYPE RKEA1_FLAG, "   SPACE
lv_e_trace_handle_bean  TYPE KEDR_TRACE_HANDLE, "   
lv_i_condition_analysis  TYPE RKEA1_FLAG, "   SPACE
lv_i_trace_mode_bean  TYPE KEDR_TRACE_MODE, "   
lv_i_trace_mode_copc  TYPE KEDR_TRACE_MODE, "   
lv_i_bwfkt  TYPE TKEVA01-BWFKT. "   '01'

  CALL FUNCTION 'COPA_ITEM_CONV_AND_PRICING'  "
    EXPORTING
         I_ERKRS = lv_i_erkrs
         I_VERSI = lv_i_versi
         I_VALUTYP = lv_i_valutyp
         I_CURRENCY_MODE = lv_i_currency_mode
         I_ITEM = lv_i_item
         I_ERROR_IGNORE = lv_i_error_ignore
         I_CONDITION_ANALYSIS = lv_i_condition_analysis
         I_TRACE_MODE_BEAN = lv_i_trace_mode_bean
         I_TRACE_MODE_COPC = lv_i_trace_mode_copc
         I_BWFKT = lv_i_bwfkt
    IMPORTING
         ET_ITEMS = lv_et_items
         ET_PRICED_FIELDS = lv_et_priced_fields
         E_SUBRC = lv_e_subrc
         E_TRACE_HANDLE_COPC = lv_e_trace_handle_copc
         E_TRACE_HANDLE_BEAN = lv_e_trace_handle_bean
    TABLES
         IT_FIELDTAB = lt_it_fieldtab
    EXCEPTIONS
        PRICING_ERROR = 1
. " COPA_ITEM_CONV_AND_PRICING




ABAP code using 7.40 inline data declarations to call FM COPA_ITEM_CONV_AND_PRICING

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 VERSI FROM TKEVA01 INTO @DATA(ld_i_versi).
DATA(ld_i_versi) = '000'.
 
"SELECT single VALUTYP FROM CEST0 INTO @DATA(ld_i_valutyp).
DATA(ld_i_valutyp) = '0'.
 
 
"SELECT single SUBRC FROM SY INTO @DATA(ld_e_subrc).
 
 
 
 
DATA(ld_i_error_ignore) = ' '.
 
 
DATA(ld_i_condition_analysis) = ' '.
 
 
 
"SELECT single BWFKT FROM TKEVA01 INTO @DATA(ld_i_bwfkt).
DATA(ld_i_bwfkt) = '01'.
 


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!