COMPARE_RECORD SAP Method Checks if record exists and if the data matches









Below is documentation, parameters and attributes of ABAP Method COMPARE_RECORD within SAP class IF_COND_DATAOBJECT. 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 IF_COND_DATAOBJECT 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_RECORD can also be found below:

  • Importing parameters
  • Exporting parameters
  • Changing parameters
  • Returning parameters
  • Exceptions
  • Coding Examples


Parameters of Method COMPARE_RECORD

.

NameTypeData TypeDescriptionDefault Value
I_IGNORE_DYNAMICImportingTYPE
ABAP_BOOL
Ignore Dynamic Part?
I_RECORDImportingTYPE
DATA
Data Record (Complete)
E_EQUALExportingTYPE
ABAP_BOOL
Boolean Variable - Does Data Match?
E_EXISTExportingTYPE
ABAP_BOOL
Boolean Variable - Does Record Exist?



Exceptions of Method COMPARE_RECORD

CX_COND_DATAOBJECT_PROCESSING - Exception Class: Work with Data Object

Example ABAP coding


DATA: lo_class TYPE REF TO IF_COND_DATAOBJECT.
DATA: lv_E_EQUAL TYPE ABAP_BOOL,
lv_E_EXIST TYPE ABAP_BOOL,
lv_I_IGNORE_DYNAMIC TYPE ABAP_BOOL,
lv_I_RECORD TYPE DATA,
lv_other TYPE c.

CALL METHOD lo_class=>COMPARE_RECORD(
EXPORTING
I_IGNORE_DYNAMIC = lv_I_IGNORE_DYNAMIC
I_RECORD = lv_I_RECORD
IMPORTING
E_EQUAL = lv_E_EQUAL
E_EXIST = lv_E_EXIST ).

Links to Related Class(s)

IF_COND_...
Full list of available SAP object classes

Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!