SAP CNV_MBT_RULE_CODE_SYNTAX_CHECK Function Module for Check syntax of the rule coding
CNV_MBT_RULE_CODE_SYNTAX_CHECK is a standard cnv mbt rule code syntax check SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Check syntax of the rule coding 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 cnv mbt rule code syntax check FM, simply by entering the name CNV_MBT_RULE_CODE_SYNTAX_CHECK into the relevant SAP transaction such as SE37 or SE38.
Function Group: CNV_MBT_RULES_DEF_46
Program Name: SAPLCNV_MBT_RULES_DEF_46
Main Program: SAPLCNV_MBT_RULES_DEF_46
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CNV_MBT_RULE_CODE_SYNTAX_CHECK 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 'CNV_MBT_RULE_CODE_SYNTAX_CHECK'"Check syntax of the rule coding.
EXPORTING
IV_RULENAME = "Rule Name
IV_INCLUDE_NAME = "MBT PCL: Name of Include
IV_RULETYPE = "Event-Related or Field-Related Rule
IMPORTING
EV_ERROR_INCLUDE = "ABAP program, current main program
EV_ERROR_LINE = "Internal Table, Current Row Index
EV_ERROR_MESSAGE = "
EV_ERROR_OFFSET = "Internal Table, Current Row Index
EV_ERROR_SUBRC = "Return value, return value after ABAP statements
EV_WORD = "
TABLES
XT_RULE_CODING = "ABAP_SOURCE
XT_CNVMBTRULEPARS = "conversion rules parameter structure and types
IMPORTING Parameters details for CNV_MBT_RULE_CODE_SYNTAX_CHECK
IV_RULENAME - Rule Name
Data type: CNVMBTRULES-RULENAMEOptional: No
Call by Reference: No ( called with pass by value option)
IV_INCLUDE_NAME - MBT PCL: Name of Include
Data type: CNV_MBT_INCLUDEOptional: No
Call by Reference: No ( called with pass by value option)
IV_RULETYPE - Event-Related or Field-Related Rule
Data type: CNVMBTRULES-RULETYPEOptional: No
Call by Reference: Yes
EXPORTING Parameters details for CNV_MBT_RULE_CODE_SYNTAX_CHECK
EV_ERROR_INCLUDE - ABAP program, current main program
Data type: SY-REPIDOptional: No
Call by Reference: Yes
EV_ERROR_LINE - Internal Table, Current Row Index
Data type: SY-TABIXOptional: No
Call by Reference: Yes
EV_ERROR_MESSAGE -
Data type:Optional: No
Call by Reference: Yes
EV_ERROR_OFFSET - Internal Table, Current Row Index
Data type: SY-TABIXOptional: No
Call by Reference: Yes
EV_ERROR_SUBRC - Return value, return value after ABAP statements
Data type: SY-SUBRCOptional: No
Call by Reference: Yes
EV_WORD -
Data type:Optional: No
Call by Reference: Yes
TABLES Parameters details for CNV_MBT_RULE_CODE_SYNTAX_CHECK
XT_RULE_CODING - ABAP_SOURCE
Data type: ABAPSOURCEOptional: No
Call by Reference: Yes
XT_CNVMBTRULEPARS - conversion rules parameter structure and types
Data type: CNVMBTRULEPARSOptional: No
Call by Reference: Yes
Copy and paste ABAP code example for CNV_MBT_RULE_CODE_SYNTAX_CHECK 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_iv_rulename | TYPE CNVMBTRULES-RULENAME, " | |||
| lt_xt_rule_coding | TYPE STANDARD TABLE OF ABAPSOURCE, " | |||
| lv_ev_error_include | TYPE SY-REPID, " | |||
| lv_ev_error_line | TYPE SY-TABIX, " | |||
| lv_iv_include_name | TYPE CNV_MBT_INCLUDE, " | |||
| lt_xt_cnvmbtrulepars | TYPE STANDARD TABLE OF CNVMBTRULEPARS, " | |||
| lv_iv_ruletype | TYPE CNVMBTRULES-RULETYPE, " | |||
| lv_ev_error_message | TYPE CNVMBTRULES, " | |||
| lv_ev_error_offset | TYPE SY-TABIX, " | |||
| lv_ev_error_subrc | TYPE SY-SUBRC, " | |||
| lv_ev_word | TYPE SY. " |
|   CALL FUNCTION 'CNV_MBT_RULE_CODE_SYNTAX_CHECK' "Check syntax of the rule coding |
| EXPORTING | ||
| IV_RULENAME | = lv_iv_rulename | |
| IV_INCLUDE_NAME | = lv_iv_include_name | |
| IV_RULETYPE | = lv_iv_ruletype | |
| IMPORTING | ||
| EV_ERROR_INCLUDE | = lv_ev_error_include | |
| EV_ERROR_LINE | = lv_ev_error_line | |
| EV_ERROR_MESSAGE | = lv_ev_error_message | |
| EV_ERROR_OFFSET | = lv_ev_error_offset | |
| EV_ERROR_SUBRC | = lv_ev_error_subrc | |
| EV_WORD | = lv_ev_word | |
| TABLES | ||
| XT_RULE_CODING | = lt_xt_rule_coding | |
| XT_CNVMBTRULEPARS | = lt_xt_cnvmbtrulepars | |
| . " CNV_MBT_RULE_CODE_SYNTAX_CHECK | ||
ABAP code using 7.40 inline data declarations to call FM CNV_MBT_RULE_CODE_SYNTAX_CHECK
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 RULENAME FROM CNVMBTRULES INTO @DATA(ld_iv_rulename). | ||||
| "SELECT single REPID FROM SY INTO @DATA(ld_ev_error_include). | ||||
| "SELECT single TABIX FROM SY INTO @DATA(ld_ev_error_line). | ||||
| "SELECT single RULETYPE FROM CNVMBTRULES INTO @DATA(ld_iv_ruletype). | ||||
| "SELECT single TABIX FROM SY INTO @DATA(ld_ev_error_offset). | ||||
| "SELECT single SUBRC FROM SY INTO @DATA(ld_ev_error_subrc). | ||||
Search for further information about these or an SAP related objects