SAP ECM_EVALUATION Function Module for Validity Evaluation for Object
ECM_EVALUATION is a standard ecm evaluation SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Validity Evaluation for Object 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 ecm evaluation FM, simply by entering the name ECM_EVALUATION into the relevant SAP transaction such as SE37 or SE38.
Function Group: ECMEVAL
Program Name: SAPLECMEVAL
Main Program:
Appliation area:
Release date: 01-Aug-2003
Mode(Normal, Remote etc): Normal Function Module
Update:

Function ECM_EVALUATION 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 'ECM_EVALUATION'"Validity Evaluation for Object.
EXPORTING
IT_OBJECTS = "GUIDs of Objects for Evaluation
* I_CHECK_HIERARCHY = 'X' "Predecessor States for Hit(s) Only
* IT_VALIDITY = "Validity for Evaluation
* I_PROCESSOR = "Validity: Evaluation Instance
* I_STATE = "Engineering Change Order
* I_STATE_GUID = "Engineering Change Order GUID
* I_TIME_STAMP = "Time Stamp for Historical Evaluation
* I_CHECK_AUTHORITY = 'X' "Check Authorization for Context
* I_CHECK_PREDECESSORS = 'X' "Check Validity for Predecessors Too
* I_GET_PREDECESSORS = 'X' "Determine Predecessor States
IMPORTING
ET_RESULT = "Result of Validity Evaluation
ET_RESULT_INTERVAL = "Critical Time Interval
ET_LOCAL_VALIDITY = "Local Validities for Object
EXCEPTIONS
INSTANCE_NOT_VALID = 1 WRONG_INPUT = 2 NO_AUTHORITY = 3 WRONG_ECM_TYPE = 4 NO_CHANGE_GRAPH = 5
IMPORTING Parameters details for ECM_EVALUATION
IT_OBJECTS - GUIDs of Objects for Evaluation
Data type: TT_ECMOBJGUIDOptional: No
Call by Reference: No ( called with pass by value option)
I_CHECK_HIERARCHY - Predecessor States for Hit(s) Only
Data type: FLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IT_VALIDITY - Validity for Evaluation
Data type: TT_ECM_VAL_EXTOptional: Yes
Call by Reference: No ( called with pass by value option)
I_PROCESSOR - Validity: Evaluation Instance
Data type: CL_ECM_PROCESSOROptional: Yes
Call by Reference: No ( called with pass by value option)
I_STATE - Engineering Change Order
Data type: ECMORDOptional: Yes
Call by Reference: No ( called with pass by value option)
I_STATE_GUID - Engineering Change Order GUID
Data type: ECMORDGUIDOptional: Yes
Call by Reference: No ( called with pass by value option)
I_TIME_STAMP - Time Stamp for Historical Evaluation
Data type: ECMTIMEFOptional: Yes
Call by Reference: No ( called with pass by value option)
I_CHECK_AUTHORITY - Check Authorization for Context
Data type: FLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_CHECK_PREDECESSORS - Check Validity for Predecessors Too
Data type: FLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_GET_PREDECESSORS - Determine Predecessor States
Data type: FLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for ECM_EVALUATION
ET_RESULT - Result of Validity Evaluation
Data type: TT_ECMEVAL_RESULTOptional: No
Call by Reference: No ( called with pass by value option)
ET_RESULT_INTERVAL - Critical Time Interval
Data type: TT_ECMOBJDATEINTOptional: No
Call by Reference: No ( called with pass by value option)
ET_LOCAL_VALIDITY - Local Validities for Object
Data type: TT_ECMEVAL_LOCVALOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
INSTANCE_NOT_VALID - Imported Processor Instance Is Not Valid
Data type:Optional: No
Call by Reference: Yes
WRONG_INPUT - Evaluation Criteria or Objects Are Missing
Data type:Optional: No
Call by Reference: Yes
NO_AUTHORITY - Authorization for Context Is Missing
Data type:Optional: No
Call by Reference: Yes
WRONG_ECM_TYPE - Old Engineering Change Management Is Active in the System
Data type:Optional: No
Call by Reference: Yes
NO_CHANGE_GRAPH - None of the Objects Are Subject to Engineering Change Management
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for ECM_EVALUATION 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_et_result | TYPE TT_ECMEVAL_RESULT, " | |||
| lv_it_objects | TYPE TT_ECMOBJGUID, " | |||
| lv_instance_not_valid | TYPE TT_ECMOBJGUID, " | |||
| lv_i_check_hierarchy | TYPE FLAG, " 'X' | |||
| lv_it_validity | TYPE TT_ECM_VAL_EXT, " | |||
| lv_wrong_input | TYPE TT_ECM_VAL_EXT, " | |||
| lv_et_result_interval | TYPE TT_ECMOBJDATEINT, " | |||
| lv_i_processor | TYPE CL_ECM_PROCESSOR, " | |||
| lv_no_authority | TYPE CL_ECM_PROCESSOR, " | |||
| lv_et_local_validity | TYPE TT_ECMEVAL_LOCVAL, " | |||
| lv_i_state | TYPE ECMORD, " | |||
| lv_wrong_ecm_type | TYPE ECMORD, " | |||
| lv_i_state_guid | TYPE ECMORDGUID, " | |||
| lv_no_change_graph | TYPE ECMORDGUID, " | |||
| lv_i_time_stamp | TYPE ECMTIMEF, " | |||
| lv_i_check_authority | TYPE FLAG, " 'X' | |||
| lv_i_check_predecessors | TYPE FLAG, " 'X' | |||
| lv_i_get_predecessors | TYPE FLAG. " 'X' |
|   CALL FUNCTION 'ECM_EVALUATION' "Validity Evaluation for Object |
| EXPORTING | ||
| IT_OBJECTS | = lv_it_objects | |
| I_CHECK_HIERARCHY | = lv_i_check_hierarchy | |
| IT_VALIDITY | = lv_it_validity | |
| I_PROCESSOR | = lv_i_processor | |
| I_STATE | = lv_i_state | |
| I_STATE_GUID | = lv_i_state_guid | |
| I_TIME_STAMP | = lv_i_time_stamp | |
| I_CHECK_AUTHORITY | = lv_i_check_authority | |
| I_CHECK_PREDECESSORS | = lv_i_check_predecessors | |
| I_GET_PREDECESSORS | = lv_i_get_predecessors | |
| IMPORTING | ||
| ET_RESULT | = lv_et_result | |
| ET_RESULT_INTERVAL | = lv_et_result_interval | |
| ET_LOCAL_VALIDITY | = lv_et_local_validity | |
| EXCEPTIONS | ||
| INSTANCE_NOT_VALID = 1 | ||
| WRONG_INPUT = 2 | ||
| NO_AUTHORITY = 3 | ||
| WRONG_ECM_TYPE = 4 | ||
| NO_CHANGE_GRAPH = 5 | ||
| . " ECM_EVALUATION | ||
ABAP code using 7.40 inline data declarations to call FM ECM_EVALUATION
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_i_check_hierarchy) | = 'X'. | |||
| DATA(ld_i_check_authority) | = 'X'. | |||
| DATA(ld_i_check_predecessors) | = 'X'. | |||
| DATA(ld_i_get_predecessors) | = 'X'. | |||
Search for further information about these or an SAP related objects