COMPARE_WITH SAP Method Comparison of the Results
Below is documentation, parameters and attributes of ABAP Method COMPARE_WITH within SAP class CL_ABAP_COMPILER_ROOT. 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_COMPILER_ROOT into the relevant SAP transactions such as SE24 or SE80, and then selecting the method you are interested in.
Method Type - Instance
This is an Instance Method so needs to be instantiated first before you can access any of the methods. I.e. you need to create a local variable of TYPE ref to the class.The following technical details of method COMPARE_WITH can also be found below:
- Importing parameters
- Exporting parameters
- Changing parameters
- Returning parameters
- Exceptions
- Coding Examples
Parameters of Method COMPARE_WITH
.| Name | Type | Data Type | Description | Default Value |
| P_COMP | Importing | TYPE REF TO CL_ABAP_COMPILER_ROOT | Abstract Superclass for ABAP Compilation | |
| P_TAG | Importing | TYPE C | ||
| P_WITH_USAGE | Importing | TYPE SYCHAR01 | CHAR01 Data Element for SYST | |
| P_WITH_WARNINGS | Importing | TYPE SYCHAR01 | Comparison of Warnings | |
| P_IGNORE_OFFS | Importing | TYPE SYCHAR01 | CHAR01 data element for SYST | |
| P_IGNORE_WORD | Importing | TYPE SYCHAR01 | CHAR01 data element for SYST | |
| P_CODE | Exporting | TYPE SYCHAR10 | CHAR10 for SYST | |
| P_DIFF | Exporting | TYPE SYCHAR01 | ||
| P_FATAL | Exporting | TYPE SYCHAR01 | CHAR01 Data Element for SYST | |
| P_MESSAGE | Exporting | TYPE STRING | ||
| P_MESSAGE_S | Exporting | TYPE STRING | ||
| P_CODE | Exporting | TYPE SCI_ERRC | CHAR10 for SYST |
Exceptions of Method COMPARE_WITH
This method does not have any exceptionsExample ABAP coding
DATA: lo_class TYPE REF TO CL_ABAP_COMPILER_ROOT.
DATA: lv_P_CODE TYPE SYCHAR10,
lv_P_COMP TYPE CL_ABAP_COMPILER_ROOT,
lv_P_DIFF TYPE SYCHAR01,
lv_P_FATAL TYPE SYCHAR01,
lv_P_MESSAGE TYPE STRING,
lv_P_MESSAGE_S TYPE STRING,
lv_P_TAG TYPE C,
lv_P_WITH_USAGE TYPE SYCHAR01,
lv_P_WITH_WARNINGS TYPE SYCHAR01,
lv_P_CODE TYPE SCI_ERRC,
lv_P_IGNORE_OFFS TYPE SYCHAR01,
lv_P_IGNORE_WORD TYPE SYCHAR01,
lv_other TYPE c.
CALL METHOD lo_class=>COMPARE_WITH(
EXPORTING
P_COMP = lv_P_COMP
P_TAG = lv_P_TAG
P_WITH_USAGE = lv_P_WITH_USAGE
P_WITH_WARNINGS = lv_P_WITH_WARNINGS
P_IGNORE_OFFS = lv_P_IGNORE_OFFS
P_IGNORE_WORD = lv_P_IGNORE_WORD
IMPORTING
P_CODE = lv_P_CODE
P_DIFF = lv_P_DIFF
P_FATAL = lv_P_FATAL
P_MESSAGE = lv_P_MESSAGE
P_MESSAGE_S = lv_P_MESSAGE_S
P_CODE = lv_P_CODE ).
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