SAP K_QUANTITY_EVALUATE Function Module for









K_QUANTITY_EVALUATE is a standard k quantity evaluate 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 k quantity evaluate FM, simply by entering the name K_QUANTITY_EVALUATE into the relevant SAP transaction such as SE37 or SE38.

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



Function K_QUANTITY_EVALUATE 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 'K_QUANTITY_EVALUATE'"
EXPORTING
* EXT_PRICE = "External Price for CO Valuation Functions
* FRZ_PRICE = "CO Valuation Module: Additional Parameters for ML Prices
* S_CURR = "
* R_CURR = "
* WSDAT = "Date and Time, Current (Application Server) Date
* ONLY_VARIABLE = "
* COMPARE_TO_PLAN = "
* READ_COMPONENTS = "

IMPORTING
COMPONENT_VALUES_INCOMPLETE = "
COSTCOMPONENT_STRUCTURE = "
VALDATE = "Valuation Date
EXCHG_RATE = "Exchange Rate Type

CHANGING
PD_COVAL = "
* T_COCOM_PRC = "

EXCEPTIONS
PRICE_NOT_FOUND = 1 ILLEGAL_POLICY = 2 OBJECT_NOT_VALID = 3 UNIT_CONVERSION_ERROR = 4 CURRENCY_ERROR = 5 ILLEGAL_QUANTITY = 6
.



IMPORTING Parameters details for K_QUANTITY_EVALUATE

EXT_PRICE - External Price for CO Valuation Functions

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

FRZ_PRICE - CO Valuation Module: Additional Parameters for ML Prices

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

S_CURR -

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

R_CURR -

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

WSDAT - Date and Time, Current (Application Server) Date

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

ONLY_VARIABLE -

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

COMPARE_TO_PLAN -

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

READ_COMPONENTS -

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

EXPORTING Parameters details for K_QUANTITY_EVALUATE

COMPONENT_VALUES_INCOMPLETE -

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

COSTCOMPONENT_STRUCTURE -

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

VALDATE - Valuation Date

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

EXCHG_RATE - Exchange Rate Type

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

CHANGING Parameters details for K_QUANTITY_EVALUATE

PD_COVAL -

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

T_COCOM_PRC -

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

EXCEPTIONS details

PRICE_NOT_FOUND -

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

ILLEGAL_POLICY -

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

OBJECT_NOT_VALID -

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

UNIT_CONVERSION_ERROR -

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

CURRENCY_ERROR -

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

ILLEGAL_QUANTITY -

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

Copy and paste ABAP code example for K_QUANTITY_EVALUATE 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_pd_coval  TYPE COVALUATION, "   
lv_ext_price  TYPE COEXPRICE, "   
lv_price_not_found  TYPE COEXPRICE, "   
lv_component_values_incomplete  TYPE C1, "   
lv_frz_price  TYPE COFRZPRICE, "   
lv_t_cocom_prc  TYPE COCOMPRC_TAB, "   
lv_illegal_policy  TYPE COCOMPRC_TAB, "   
lv_costcomponent_structure  TYPE CK_ELESMHK, "   
lv_s_curr  TYPE OWAER, "   
lv_valdate  TYPE SYDATUM, "   
lv_object_not_valid  TYPE SYDATUM, "   
lv_r_curr  TYPE OWAER, "   
lv_exchg_rate  TYPE KURST, "   
lv_unit_conversion_error  TYPE KURST, "   
lv_wsdat  TYPE SYDATUM, "   
lv_currency_error  TYPE SYDATUM, "   
lv_only_variable  TYPE C1, "   
lv_illegal_quantity  TYPE C1, "   
lv_compare_to_plan  TYPE C1, "   
lv_read_components  TYPE C1. "   

  CALL FUNCTION 'K_QUANTITY_EVALUATE'  "
    EXPORTING
         EXT_PRICE = lv_ext_price
         FRZ_PRICE = lv_frz_price
         S_CURR = lv_s_curr
         R_CURR = lv_r_curr
         WSDAT = lv_wsdat
         ONLY_VARIABLE = lv_only_variable
         COMPARE_TO_PLAN = lv_compare_to_plan
         READ_COMPONENTS = lv_read_components
    IMPORTING
         COMPONENT_VALUES_INCOMPLETE = lv_component_values_incomplete
         COSTCOMPONENT_STRUCTURE = lv_costcomponent_structure
         VALDATE = lv_valdate
         EXCHG_RATE = lv_exchg_rate
    CHANGING
         PD_COVAL = lv_pd_coval
         T_COCOM_PRC = lv_t_cocom_prc
    EXCEPTIONS
        PRICE_NOT_FOUND = 1
        ILLEGAL_POLICY = 2
        OBJECT_NOT_VALID = 3
        UNIT_CONVERSION_ERROR = 4
        CURRENCY_ERROR = 5
        ILLEGAL_QUANTITY = 6
. " K_QUANTITY_EVALUATE




ABAP code using 7.40 inline data declarations to call FM K_QUANTITY_EVALUATE

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.

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


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!