SAP K_QUANTITY_EVAL_WITH_RECEIVER Function Module for









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

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



Function K_QUANTITY_EVAL_WITH_RECEIVER 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_EVAL_WITH_RECEIVER'"
EXPORTING
* EXT_PRICE = "External Price for CO Valuation Functions
* S_CURR = "
* R_CURR = "
* WSDAT = "Date and Time, Current (Application Server) Date
* KURST = "Exchange Rate Type
RECEIVER = "
* PLAN_ALLOCATION = "
* READ_COMPONENTS = "
* CHECK_STOCK_RELEVANCE = 'X' "

IMPORTING
COMPONENT_VALUES_INCOMPLETE = "
COSTCOMPONENT_STRUCTURE = "
VKSTA = "
VALDATE = "Value Date for Currency Translation
EXCHG_RATE = "Exchange Rate Type

CHANGING
CO_VALUATION = "
* T_COCOM_PRC = "

EXCEPTIONS
PRICE_NOT_FOUND = 1 SENDER_NOT_VALID = 2 RECEIVER_NOT_VALID = 3 UNIT_CONVERSION_ERROR = 4 CURRENCY_ERROR = 5 ILLEGAL_QUANTITY = 6 STOCK_RELEVANCE_CHECK = 7
.




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_SAPLKCOC_001 User Exit to determine the allocation price.

IMPORTING Parameters details for K_QUANTITY_EVAL_WITH_RECEIVER

EXT_PRICE - External Price for CO Valuation Functions

Data type: COEXPRICE
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)

KURST - Exchange Rate Type

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

RECEIVER -

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

PLAN_ALLOCATION -

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)

CHECK_STOCK_RELEVANCE -

Data type: C1
Default: 'X'
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for K_QUANTITY_EVAL_WITH_RECEIVER

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)

VKSTA -

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

VALDATE - Value Date for Currency Translation

Data type: WSDAT
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_EVAL_WITH_RECEIVER

CO_VALUATION -

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)

SENDER_NOT_VALID -

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

RECEIVER_NOT_VALID -

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

UNIT_CONVERSION_ERROR - Error During Qty Conversion

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

CURRENCY_ERROR - Error during currency translation

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)

STOCK_RELEVANCE_CHECK -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for K_QUANTITY_EVAL_WITH_RECEIVER 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_ext_price  TYPE COEXPRICE, "   
lv_co_valuation  TYPE COVALUATION, "   
lv_price_not_found  TYPE COVALUATION, "   
lv_component_values_incomplete  TYPE C1, "   
lv_s_curr  TYPE OWAER, "   
lv_t_cocom_prc  TYPE COCOMPRC_TAB, "   
lv_sender_not_valid  TYPE COCOMPRC_TAB, "   
lv_costcomponent_structure  TYPE CK_ELESMHK, "   
lv_vksta  TYPE VKSTA, "   
lv_r_curr  TYPE OWAER, "   
lv_receiver_not_valid  TYPE OWAER, "   
lv_wsdat  TYPE SYDATUM, "   
lv_valdate  TYPE WSDAT, "   
lv_unit_conversion_error  TYPE WSDAT, "   
lv_kurst  TYPE KURST, "   
lv_exchg_rate  TYPE KURST, "   
lv_currency_error  TYPE KURST, "   
lv_receiver  TYPE J_OBJNR, "   
lv_illegal_quantity  TYPE J_OBJNR, "   
lv_plan_allocation  TYPE C1, "   
lv_stock_relevance_check  TYPE C1, "   
lv_read_components  TYPE C1, "   
lv_check_stock_relevance  TYPE C1. "   'X'

  CALL FUNCTION 'K_QUANTITY_EVAL_WITH_RECEIVER'  "
    EXPORTING
         EXT_PRICE = lv_ext_price
         S_CURR = lv_s_curr
         R_CURR = lv_r_curr
         WSDAT = lv_wsdat
         KURST = lv_kurst
         RECEIVER = lv_receiver
         PLAN_ALLOCATION = lv_plan_allocation
         READ_COMPONENTS = lv_read_components
         CHECK_STOCK_RELEVANCE = lv_check_stock_relevance
    IMPORTING
         COMPONENT_VALUES_INCOMPLETE = lv_component_values_incomplete
         COSTCOMPONENT_STRUCTURE = lv_costcomponent_structure
         VKSTA = lv_vksta
         VALDATE = lv_valdate
         EXCHG_RATE = lv_exchg_rate
    CHANGING
         CO_VALUATION = lv_co_valuation
         T_COCOM_PRC = lv_t_cocom_prc
    EXCEPTIONS
        PRICE_NOT_FOUND = 1
        SENDER_NOT_VALID = 2
        RECEIVER_NOT_VALID = 3
        UNIT_CONVERSION_ERROR = 4
        CURRENCY_ERROR = 5
        ILLEGAL_QUANTITY = 6
        STOCK_RELEVANCE_CHECK = 7
. " K_QUANTITY_EVAL_WITH_RECEIVER




ABAP code using 7.40 inline data declarations to call FM K_QUANTITY_EVAL_WITH_RECEIVER

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.

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
DATA(ld_check_stock_relevance) = 'X'.
 


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!