EDIT_DISTANCE SAP Method Edit Distance
Below is documentation, parameters and attributes of ABAP Method EDIT_DISTANCE within SAP class CL_ABAP_STRING_UTILITIES. There is also a number of example ABAP code snipts to help you use the functionality of this method.
This method is available within SAP systems depending on your version and release level, you can view further information by entering the class name CL_ABAP_STRING_UTILITIES into the relevant SAP transactions such as SE24 or SE80, and then selecting the method you are interested in.
Method Type - Static
This is a Static Method so you can call it directlyThe following technical details of method EDIT_DISTANCE can also be found below:
- Importing parameters
- Exporting parameters
- Changing parameters
- Returning parameters
- Exceptions
- Coding Examples
Parameters of Method EDIT_DISTANCE
.| Name | Type | Data Type | Description | Default Value |
| COST_DEL | Importing | TYPE I | Deletion Cost | |
| COST_INS | Importing | TYPE I | Insertion Cost | |
| COST_SUB | Importing | TYPE I | Substitution Cost | |
| MAX | Importing | TYPE I | Upper Limit | |
| VAL1 | Importing | TYPE CSEQUENCE | Value 1 | |
| VAL2 | Importing | TYPE CSEQUENCE | Value 2 | |
| RESULT | Returning | TYPE I | Result |
Exceptions of Method EDIT_DISTANCE
CX_PARAMETER_INVALID_RANGE - Parameter with Invalid RangeExample ABAP coding
DATA: lv_COST_DEL TYPE I,
lv_COST_INS TYPE I,
lv_COST_SUB TYPE I,
lv_MAX TYPE I,
lv_RESULT TYPE I,
lv_VAL1 TYPE CSEQUENCE,
lv_VAL2 TYPE CSEQUENCE,
lv_other TYPE c.
CALL METHOD CL_ABAP_STRING_UTILITIES=>EDIT_DISTANCE(
EXPORTING
COST_DEL = lv_COST_DEL
COST_INS = lv_COST_INS
COST_SUB = lv_COST_SUB
MAX = lv_MAX
VAL1 = lv_VAL1
VAL2 = lv_VAL2
RECEIVING
RESULT = lv_RESULT )
"Alternate coding for Method Call with returning parameter
lv_RESULT = CL_ABAP_STRING_UTILITIES=>EDIT_DISTANCE(
EXPORTING
COST_DEL = lv_COST_DEL
COST_INS = lv_COST_INS
COST_SUB = lv_COST_SUB
MAX = lv_MAX
VAL1 = lv_VAL1
VAL2 = lv_VAL2 ).
Links to Related Class(s)
CL_ABAP_...Full list of available SAP object classes
Search for further information about these or an SAP related objects