SAP COPI_FORMULA_VALIDATE_INPUT Function Module for NOTRANSL: Auswertung einer Validation-Condition
COPI_FORMULA_VALIDATE_INPUT is a standard copi formula validate input SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Auswertung einer Validation-Condition 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 copi formula validate input FM, simply by entering the name COPI_FORMULA_VALIDATE_INPUT into the relevant SAP transaction such as SE37 or SE38.
Function Group: COPI
Program Name: SAPLCOPI
Main Program:
Appliation area: C
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function COPI_FORMULA_VALIDATE_INPUT 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 'COPI_FORMULA_VALIDATE_INPUT'"NOTRANSL: Auswertung einer Validation-Condition.
EXPORTING
INPUT_VALUE = "Value to be checked
IMPORTING
FORMULA = "Compound formula string
E_SUBRC = "Error code (values see documentation)
RESULT = "Boolean result: 'X' = true, ' ' = false
E_MSGID = "ID of error message
E_MSGTY = "Type of error message
E_MSGNO = "Number of error message
E_MSGV1 = "Message variable 1
E_MSGV2 = " 2
E_MSGV3 = " 3
E_MSGV4 = " 4
TABLES
ICOFV = "Table with conditions
IMPORTING Parameters details for COPI_FORMULA_VALIDATE_INPUT
INPUT_VALUE - Value to be checked
Data type: COFV-ATFLVOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for COPI_FORMULA_VALIDATE_INPUT
FORMULA - Compound formula string
Data type: CLIKEOptional: No
Call by Reference: No ( called with pass by value option)
E_SUBRC - Error code (values see documentation)
Data type: SY-SUBRCOptional: No
Call by Reference: No ( called with pass by value option)
RESULT - Boolean result: 'X' = true, ' ' = false
Data type: CODEF-RESULTOptional: No
Call by Reference: No ( called with pass by value option)
E_MSGID - ID of error message
Data type: SY-MSGIDOptional: No
Call by Reference: No ( called with pass by value option)
E_MSGTY - Type of error message
Data type: SY-MSGTYOptional: No
Call by Reference: No ( called with pass by value option)
E_MSGNO - Number of error message
Data type: SY-MSGNOOptional: No
Call by Reference: No ( called with pass by value option)
E_MSGV1 - Message variable 1
Data type: SY-MSGV1Optional: No
Call by Reference: No ( called with pass by value option)
E_MSGV2 - 2
Data type: SY-MSGV2Optional: No
Call by Reference: No ( called with pass by value option)
E_MSGV3 - 3
Data type: SY-MSGV3Optional: No
Call by Reference: No ( called with pass by value option)
E_MSGV4 - 4
Data type: SY-MSGV4Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for COPI_FORMULA_VALIDATE_INPUT
ICOFV - Table with conditions
Data type: RCOFVPOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for COPI_FORMULA_VALIDATE_INPUT 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: | ||||
| lt_icofv | TYPE STANDARD TABLE OF RCOFVP, " | |||
| lv_formula | TYPE CLIKE, " | |||
| lv_input_value | TYPE COFV-ATFLV, " | |||
| lv_e_subrc | TYPE SY-SUBRC, " | |||
| lv_result | TYPE CODEF-RESULT, " | |||
| lv_e_msgid | TYPE SY-MSGID, " | |||
| lv_e_msgty | TYPE SY-MSGTY, " | |||
| lv_e_msgno | TYPE SY-MSGNO, " | |||
| lv_e_msgv1 | TYPE SY-MSGV1, " | |||
| lv_e_msgv2 | TYPE SY-MSGV2, " | |||
| lv_e_msgv3 | TYPE SY-MSGV3, " | |||
| lv_e_msgv4 | TYPE SY-MSGV4. " |
|   CALL FUNCTION 'COPI_FORMULA_VALIDATE_INPUT' "NOTRANSL: Auswertung einer Validation-Condition |
| EXPORTING | ||
| INPUT_VALUE | = lv_input_value | |
| IMPORTING | ||
| FORMULA | = lv_formula | |
| E_SUBRC | = lv_e_subrc | |
| RESULT | = lv_result | |
| E_MSGID | = lv_e_msgid | |
| E_MSGTY | = lv_e_msgty | |
| E_MSGNO | = lv_e_msgno | |
| E_MSGV1 | = lv_e_msgv1 | |
| E_MSGV2 | = lv_e_msgv2 | |
| E_MSGV3 | = lv_e_msgv3 | |
| E_MSGV4 | = lv_e_msgv4 | |
| TABLES | ||
| ICOFV | = lt_icofv | |
| . " COPI_FORMULA_VALIDATE_INPUT | ||
ABAP code using 7.40 inline data declarations to call FM COPI_FORMULA_VALIDATE_INPUT
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 ATFLV FROM COFV INTO @DATA(ld_input_value). | ||||
| "SELECT single SUBRC FROM SY INTO @DATA(ld_e_subrc). | ||||
| "SELECT single RESULT FROM CODEF INTO @DATA(ld_result). | ||||
| "SELECT single MSGID FROM SY INTO @DATA(ld_e_msgid). | ||||
| "SELECT single MSGTY FROM SY INTO @DATA(ld_e_msgty). | ||||
| "SELECT single MSGNO FROM SY INTO @DATA(ld_e_msgno). | ||||
| "SELECT single MSGV1 FROM SY INTO @DATA(ld_e_msgv1). | ||||
| "SELECT single MSGV2 FROM SY INTO @DATA(ld_e_msgv2). | ||||
| "SELECT single MSGV3 FROM SY INTO @DATA(ld_e_msgv3). | ||||
| "SELECT single MSGV4 FROM SY INTO @DATA(ld_e_msgv4). | ||||
Search for further information about these or an SAP related objects