SAP SCWB_COMPARE_OBJECTS Function Module for
SCWB_COMPARE_OBJECTS is a standard scwb compare objects SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 scwb compare objects FM, simply by entering the name SCWB_COMPARE_OBJECTS into the relevant SAP transaction such as SE37 or SE38.
Function Group: SCWL
Program Name: SAPLSCWL
Main Program: SAPLSCWL
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function SCWB_COMPARE_OBJECTS 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 'SCWB_COMPARE_OBJECTS'".
EXPORTING
IV_OBJTYPE_1 = "
* IV_SRCCLIENT_2 = '000' "R/3 System, Client Number from Logon
* IS_CORR_INST = "
* IV_OBJTYPE_2 = ' ' "
IV_OBJNAME_1 = "
* IV_OBJNAME_2 = ' ' "
IV_VERSNO_1 = "
IV_VERSNO_2 = "
* IV_SRCSYSTEM_1 = ' ' "
* IV_SRCCLIENT_1 = '000' "R/3 System, Client Number from Logon
* IV_SRCSYSTEM_2 = ' ' "
EXCEPTIONS
ILLEGAL_OBJTYPE = 1 RFC_ERROR = 2 CORR_INST_NOT_FOUND = 3 OBJECT_NOT_FOUND = 4
IMPORTING Parameters details for SCWB_COMPARE_OBJECTS
IV_OBJTYPE_1 -
Data type: E071-OBJECTOptional: No
Call by Reference: Yes
IV_SRCCLIENT_2 - R/3 System, Client Number from Logon
Data type: SY-MANDTDefault: '000'
Optional: Yes
Call by Reference: Yes
IS_CORR_INST -
Data type: SCWB_DELIVOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_OBJTYPE_2 -
Data type: E071-OBJECTDefault: SPACE
Optional: Yes
Call by Reference: Yes
IV_OBJNAME_1 -
Data type: E071-OBJ_NAMEOptional: No
Call by Reference: Yes
IV_OBJNAME_2 -
Data type: E071-OBJ_NAMEDefault: SPACE
Optional: Yes
Call by Reference: Yes
IV_VERSNO_1 -
Data type: VRSD-VERSNOOptional: No
Call by Reference: Yes
IV_VERSNO_2 -
Data type: VRSD-VERSNOOptional: No
Call by Reference: Yes
IV_SRCSYSTEM_1 -
Data type: E070-TARSYSTEMDefault: SPACE
Optional: Yes
Call by Reference: Yes
IV_SRCCLIENT_1 - R/3 System, Client Number from Logon
Data type: SY-MANDTDefault: '000'
Optional: Yes
Call by Reference: Yes
IV_SRCSYSTEM_2 -
Data type: E070-TARSYSTEMDefault: SPACE
Optional: Yes
Call by Reference: Yes
EXCEPTIONS details
ILLEGAL_OBJTYPE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
RFC_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CORR_INST_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OBJECT_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for SCWB_COMPARE_OBJECTS 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_objtype_1 | TYPE E071-OBJECT, " | |||
| lv_illegal_objtype | TYPE E071, " | |||
| lv_iv_srcclient_2 | TYPE SY-MANDT, " '000' | |||
| lv_is_corr_inst | TYPE SCWB_DELIV, " | |||
| lv_rfc_error | TYPE SCWB_DELIV, " | |||
| lv_iv_objtype_2 | TYPE E071-OBJECT, " SPACE | |||
| lv_iv_objname_1 | TYPE E071-OBJ_NAME, " | |||
| lv_corr_inst_not_found | TYPE E071, " | |||
| lv_iv_objname_2 | TYPE E071-OBJ_NAME, " SPACE | |||
| lv_object_not_found | TYPE E071, " | |||
| lv_iv_versno_1 | TYPE VRSD-VERSNO, " | |||
| lv_iv_versno_2 | TYPE VRSD-VERSNO, " | |||
| lv_iv_srcsystem_1 | TYPE E070-TARSYSTEM, " SPACE | |||
| lv_iv_srcclient_1 | TYPE SY-MANDT, " '000' | |||
| lv_iv_srcsystem_2 | TYPE E070-TARSYSTEM. " SPACE |
|   CALL FUNCTION 'SCWB_COMPARE_OBJECTS' " |
| EXPORTING | ||
| IV_OBJTYPE_1 | = lv_iv_objtype_1 | |
| IV_SRCCLIENT_2 | = lv_iv_srcclient_2 | |
| IS_CORR_INST | = lv_is_corr_inst | |
| IV_OBJTYPE_2 | = lv_iv_objtype_2 | |
| IV_OBJNAME_1 | = lv_iv_objname_1 | |
| IV_OBJNAME_2 | = lv_iv_objname_2 | |
| IV_VERSNO_1 | = lv_iv_versno_1 | |
| IV_VERSNO_2 | = lv_iv_versno_2 | |
| IV_SRCSYSTEM_1 | = lv_iv_srcsystem_1 | |
| IV_SRCCLIENT_1 | = lv_iv_srcclient_1 | |
| IV_SRCSYSTEM_2 | = lv_iv_srcsystem_2 | |
| EXCEPTIONS | ||
| ILLEGAL_OBJTYPE = 1 | ||
| RFC_ERROR = 2 | ||
| CORR_INST_NOT_FOUND = 3 | ||
| OBJECT_NOT_FOUND = 4 | ||
| . " SCWB_COMPARE_OBJECTS | ||
ABAP code using 7.40 inline data declarations to call FM SCWB_COMPARE_OBJECTS
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 OBJECT FROM E071 INTO @DATA(ld_iv_objtype_1). | ||||
| "SELECT single MANDT FROM SY INTO @DATA(ld_iv_srcclient_2). | ||||
| DATA(ld_iv_srcclient_2) | = '000'. | |||
| "SELECT single OBJECT FROM E071 INTO @DATA(ld_iv_objtype_2). | ||||
| DATA(ld_iv_objtype_2) | = ' '. | |||
| "SELECT single OBJ_NAME FROM E071 INTO @DATA(ld_iv_objname_1). | ||||
| "SELECT single OBJ_NAME FROM E071 INTO @DATA(ld_iv_objname_2). | ||||
| DATA(ld_iv_objname_2) | = ' '. | |||
| "SELECT single VERSNO FROM VRSD INTO @DATA(ld_iv_versno_1). | ||||
| "SELECT single VERSNO FROM VRSD INTO @DATA(ld_iv_versno_2). | ||||
| "SELECT single TARSYSTEM FROM E070 INTO @DATA(ld_iv_srcsystem_1). | ||||
| DATA(ld_iv_srcsystem_1) | = ' '. | |||
| "SELECT single MANDT FROM SY INTO @DATA(ld_iv_srcclient_1). | ||||
| DATA(ld_iv_srcclient_1) | = '000'. | |||
| "SELECT single TARSYSTEM FROM E070 INTO @DATA(ld_iv_srcsystem_2). | ||||
| DATA(ld_iv_srcsystem_2) | = ' '. | |||
Search for further information about these or an SAP related objects