SAP CX_RATE_EVAL Function Module for Evaluate the possible production quantity between two points in time









CX_RATE_EVAL is a standard cx rate eval SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Evaluate the possible production quantity between two points in time 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 cx rate eval FM, simply by entering the name CX_RATE_EVAL into the relevant SAP transaction such as SE37 or SE38.

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



Function CX_RATE_EVAL 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 'CX_RATE_EVAL'"Evaluate the possible production quantity between two points in time
EXPORTING
PLANT = "Production plant
MATNR = "Material number
VERID = "production version
WORKC = "Work Center ID (ARBID)
AUFTG = "Order group (planned order, production order, .)
AUFTA = "Order type (LA, ...)
VAGRP = "production scheduler group
SCHED_TYP = "Schedule type (2: fine; 5: rate)
* SHI_FLG = ' ' "shift specific rate evaluation

IMPORTING
MEINH = "unit of measure of evaluated rate

TABLES
REM_RATE_INP = "input table for time intervals for rate eval.
REM_RATE_EXP = "output table for time intervals for rate eval.

EXCEPTIONS
NO_SELENTRY = 1 NO_SCHEDULING_POSSIBLE = 2 NO_OPERATION = 3 NO_CAPACITY = 4 NO_TACT_TIME = 5 NO_LINEARITY = 6 NO_OPERATION_ON_WC = 7 CONVERTION_FAILURE = 8
.



IMPORTING Parameters details for CX_RATE_EVAL

PLANT - Production plant

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

MATNR - Material number

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

VERID - production version

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

WORKC - Work Center ID (ARBID)

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

AUFTG - Order group (planned order, production order, .)

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

AUFTA - Order type (LA, ...)

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

VAGRP - production scheduler group

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

SCHED_TYP - Schedule type (2: fine; 5: rate)

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

SHI_FLG - shift specific rate evaluation

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

EXPORTING Parameters details for CX_RATE_EVAL

MEINH - unit of measure of evaluated rate

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

TABLES Parameters details for CX_RATE_EVAL

REM_RATE_INP - input table for time intervals for rate eval.

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

REM_RATE_EXP - output table for time intervals for rate eval.

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

EXCEPTIONS details

NO_SELENTRY - no sel_id found

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

NO_SCHEDULING_POSSIBLE - scheduling is not possible

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

NO_OPERATION - no operation found

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

NO_CAPACITY - no capacity found

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

NO_TACT_TIME - tact time could not be determined

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

NO_LINEARITY - the operation time is not linear to the quantity

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

NO_OPERATION_ON_WC - there is not operation on given work center

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

CONVERTION_FAILURE - failure during unit conversion

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

Copy and paste ABAP code example for CX_RATE_EVAL 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_meinh  TYPE AFVGD-MEINH, "   
lv_plant  TYPE PLAF-PWWRK, "   
lv_no_selentry  TYPE PLAF, "   
lt_rem_rate_inp  TYPE STANDARD TABLE OF REM_RATE, "   
lv_matnr  TYPE PLAF-MATNR, "   
lt_rem_rate_exp  TYPE STANDARD TABLE OF REM_RATE, "   
lv_no_scheduling_possible  TYPE REM_RATE, "   
lv_verid  TYPE PLAF-VERID, "   
lv_no_operation  TYPE PLAF, "   
lv_workc  TYPE AFVGD-ARBID, "   
lv_no_capacity  TYPE AFVGD, "   
lv_auftg  TYPE TCX00-AUFTG, "   
lv_no_tact_time  TYPE TCX00, "   
lv_aufta  TYPE TCX00-AUFTA, "   
lv_no_linearity  TYPE TCX00, "   
lv_vagrp  TYPE TCX00-VAGRP, "   
lv_no_operation_on_wc  TYPE TCX00, "   
lv_sched_typ  TYPE KBED-TYPKZ, "   
lv_convertion_failure  TYPE KBED, "   
lv_shi_flg  TYPE C. "   SPACE

  CALL FUNCTION 'CX_RATE_EVAL'  "Evaluate the possible production quantity between two points in time
    EXPORTING
         PLANT = lv_plant
         MATNR = lv_matnr
         VERID = lv_verid
         WORKC = lv_workc
         AUFTG = lv_auftg
         AUFTA = lv_aufta
         VAGRP = lv_vagrp
         SCHED_TYP = lv_sched_typ
         SHI_FLG = lv_shi_flg
    IMPORTING
         MEINH = lv_meinh
    TABLES
         REM_RATE_INP = lt_rem_rate_inp
         REM_RATE_EXP = lt_rem_rate_exp
    EXCEPTIONS
        NO_SELENTRY = 1
        NO_SCHEDULING_POSSIBLE = 2
        NO_OPERATION = 3
        NO_CAPACITY = 4
        NO_TACT_TIME = 5
        NO_LINEARITY = 6
        NO_OPERATION_ON_WC = 7
        CONVERTION_FAILURE = 8
. " CX_RATE_EVAL




ABAP code using 7.40 inline data declarations to call FM CX_RATE_EVAL

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 MEINH FROM AFVGD INTO @DATA(ld_meinh).
 
"SELECT single PWWRK FROM PLAF INTO @DATA(ld_plant).
 
 
 
"SELECT single MATNR FROM PLAF INTO @DATA(ld_matnr).
 
 
 
"SELECT single VERID FROM PLAF INTO @DATA(ld_verid).
 
 
"SELECT single ARBID FROM AFVGD INTO @DATA(ld_workc).
 
 
"SELECT single AUFTG FROM TCX00 INTO @DATA(ld_auftg).
 
 
"SELECT single AUFTA FROM TCX00 INTO @DATA(ld_aufta).
 
 
"SELECT single VAGRP FROM TCX00 INTO @DATA(ld_vagrp).
 
 
"SELECT single TYPKZ FROM KBED INTO @DATA(ld_sched_typ).
 
 
DATA(ld_shi_flg) = ' '.
 


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!