SAP SWB_EXPR_CHECK_TYPE_OP_TYPE Function Module for
SWB_EXPR_CHECK_TYPE_OP_TYPE is a standard swb expr check type op type 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 swb expr check type op type FM, simply by entering the name SWB_EXPR_CHECK_TYPE_OP_TYPE into the relevant SAP transaction such as SE37 or SE38.
Function Group: SWB2
Program Name: SAPLSWB2
Main Program: SAPLSWB2
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function SWB_EXPR_CHECK_TYPE_OP_TYPE 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 'SWB_EXPR_CHECK_TYPE_OP_TYPE'".
EXPORTING
* RESULT_ELEMENT = ' ' "
* EXPR1_IS_TABLE = "
* EXPR1_IS_OBJECT = ' ' "
* EXPR1_OBJ_TYPE = "1st expression: Object type (if 'o')
* EXPR1_LENGTH = "1st expression: Length in bytes
* EXPR1_IS_INITIAL = "
* EXPR1_IS_NIL = "
OPERATOR = "Operator
* EXPR2 = ' ' "
* EXPR2_VALUE = ' ' "2nd expression: Value (C255)
EXPR2_TYPE = "2nd expression: Type: C,I,.. like ABAP; o=obj, B=Bool
* RESULT_IS_TABLE = ' ' "
* EXPR2_IS_TABLE = "
* EXPR2_IS_OBJECT = ' ' "
* EXPR2_OBJ_TYPE = "2nd expression: Object type (if 'o')
* EXPR2_LENGTH = "2nd expression: Length in bytes
* EXPR2_IS_INITIAL = "
* EXPR2_IS_NIL = "
* RESULT_TYPE = ' ' "Result type (only for 3-character operations)
* RESULT_IS_OBJECT = ' ' "
* RESULT_OBJ_TYPE = "
* RESULT_LENGTH = "
* EXPR1 = ' ' "
* EXPR1_VALUE = ' ' "1st expression: Value (C255)
EXPR1_TYPE = "1st expression: Type: C,I,... like ABAP; o=obj, B=Bool
IMPORTING
RESULT_TYPE = "Result type (only for 3-character operations)
RESULT_IS_TABLE = "
RESULT_LENGTH = "
ERRORCOUNT = "Number of errors found
WORST_MSGTYPE = "
TABLES
EXPRESSION_ERRORS = "Error information: Table of message parameters
IMPORTING Parameters details for SWB_EXPR_CHECK_TYPE_OP_TYPE
RESULT_ELEMENT -
Data type: SWCONT-ELEMENTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPR1_IS_TABLE -
Data type: SWCONTDEF-TABELEMOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPR1_IS_OBJECT -
Data type: SWA_EXPRES-IS_OBJECTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPR1_OBJ_TYPE - 1st expression: Object type (if 'o')
Data type: SWCONTDEF-REFOBJTYPEOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPR1_LENGTH - 1st expression: Length in bytes
Data type: SWCONT-ELEMLENGTHOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPR1_IS_INITIAL -
Data type: SWA_EXPRES-IS_NILOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPR1_IS_NIL -
Data type: SWA_EXPRES-IS_NILOptional: Yes
Call by Reference: No ( called with pass by value option)
OPERATOR - Operator
Data type: SWD_SDYNP-COND_OPERAOptional: No
Call by Reference: No ( called with pass by value option)
EXPR2 -
Data type: SWAEXPDEF-EXPRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPR2_VALUE - 2nd expression: Value (C255)
Data type: SWCONT-VALUEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPR2_TYPE - 2nd expression: Type: C,I,.. like ABAP; o=obj, B=Bool
Data type: SWCONT-TYPEOptional: No
Call by Reference: No ( called with pass by value option)
RESULT_IS_TABLE -
Data type: SWCONTDEF-TABELEMDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPR2_IS_TABLE -
Data type: SWCONTDEF-TABELEMOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPR2_IS_OBJECT -
Data type: SWA_EXPRES-IS_OBJECTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPR2_OBJ_TYPE - 2nd expression: Object type (if 'o')
Data type: SWCONTDEF-REFOBJTYPEOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPR2_LENGTH - 2nd expression: Length in bytes
Data type: SWCONT-ELEMLENGTHOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPR2_IS_INITIAL -
Data type: SWA_EXPRES-IS_NILOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPR2_IS_NIL -
Data type: SWA_EXPRES-IS_NILOptional: Yes
Call by Reference: No ( called with pass by value option)
RESULT_TYPE - Result type (only for 3-character operations)
Data type: SWCONT-TYPEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
RESULT_IS_OBJECT -
Data type: SWA_EXPRES-IS_OBJECTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
RESULT_OBJ_TYPE -
Data type: SWOTOBJID-OBJTYPEOptional: Yes
Call by Reference: No ( called with pass by value option)
RESULT_LENGTH -
Data type: SWCONT-ELEMLENGTHOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPR1 -
Data type: SWAEXPDEF-EXPRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPR1_VALUE - 1st expression: Value (C255)
Data type: SWCONT-VALUEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPR1_TYPE - 1st expression: Type: C,I,... like ABAP; o=obj, B=Bool
Data type: SWCONT-TYPEOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for SWB_EXPR_CHECK_TYPE_OP_TYPE
RESULT_TYPE - Result type (only for 3-character operations)
Data type: SWCONT-TYPEOptional: No
Call by Reference: No ( called with pass by value option)
RESULT_IS_TABLE -
Data type: SWCONTDEF-TABELEMOptional: No
Call by Reference: No ( called with pass by value option)
RESULT_LENGTH -
Data type: SWCONT-ELEMLENGTHOptional: No
Call by Reference: No ( called with pass by value option)
ERRORCOUNT - Number of errors found
Data type: SWAEXPEDIT-ERRORCOUNTOptional: No
Call by Reference: No ( called with pass by value option)
WORST_MSGTYPE -
Data type: SY-MSGTYOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for SWB_EXPR_CHECK_TYPE_OP_TYPE
EXPRESSION_ERRORS - Error information: Table of message parameters
Data type: SWAEXERROROptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for SWB_EXPR_CHECK_TYPE_OP_TYPE 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_result_type | TYPE SWCONT-TYPE, " | |||
| lv_result_element | TYPE SWCONT-ELEMENT, " SPACE | |||
| lt_expression_errors | TYPE STANDARD TABLE OF SWAEXERROR, " | |||
| lv_expr1_is_table | TYPE SWCONTDEF-TABELEM, " | |||
| lv_expr1_is_object | TYPE SWA_EXPRES-IS_OBJECT, " SPACE | |||
| lv_expr1_obj_type | TYPE SWCONTDEF-REFOBJTYPE, " | |||
| lv_expr1_length | TYPE SWCONT-ELEMLENGTH, " | |||
| lv_expr1_is_initial | TYPE SWA_EXPRES-IS_NIL, " | |||
| lv_expr1_is_nil | TYPE SWA_EXPRES-IS_NIL, " | |||
| lv_operator | TYPE SWD_SDYNP-COND_OPERA, " | |||
| lv_expr2 | TYPE SWAEXPDEF-EXPR, " SPACE | |||
| lv_expr2_value | TYPE SWCONT-VALUE, " SPACE | |||
| lv_expr2_type | TYPE SWCONT-TYPE, " | |||
| lv_result_is_table | TYPE SWCONTDEF-TABELEM, " | |||
| lv_result_is_table | TYPE SWCONTDEF-TABELEM, " SPACE | |||
| lv_expr2_is_table | TYPE SWCONTDEF-TABELEM, " | |||
| lv_expr2_is_object | TYPE SWA_EXPRES-IS_OBJECT, " SPACE | |||
| lv_expr2_obj_type | TYPE SWCONTDEF-REFOBJTYPE, " | |||
| lv_expr2_length | TYPE SWCONT-ELEMLENGTH, " | |||
| lv_expr2_is_initial | TYPE SWA_EXPRES-IS_NIL, " | |||
| lv_expr2_is_nil | TYPE SWA_EXPRES-IS_NIL, " | |||
| lv_result_type | TYPE SWCONT-TYPE, " SPACE | |||
| lv_result_length | TYPE SWCONT-ELEMLENGTH, " | |||
| lv_errorcount | TYPE SWAEXPEDIT-ERRORCOUNT, " | |||
| lv_result_is_object | TYPE SWA_EXPRES-IS_OBJECT, " SPACE | |||
| lv_worst_msgtype | TYPE SY-MSGTY, " | |||
| lv_result_obj_type | TYPE SWOTOBJID-OBJTYPE, " | |||
| lv_result_length | TYPE SWCONT-ELEMLENGTH, " | |||
| lv_expr1 | TYPE SWAEXPDEF-EXPR, " SPACE | |||
| lv_expr1_value | TYPE SWCONT-VALUE, " SPACE | |||
| lv_expr1_type | TYPE SWCONT-TYPE. " |
|   CALL FUNCTION 'SWB_EXPR_CHECK_TYPE_OP_TYPE' " |
| EXPORTING | ||
| RESULT_ELEMENT | = lv_result_element | |
| EXPR1_IS_TABLE | = lv_expr1_is_table | |
| EXPR1_IS_OBJECT | = lv_expr1_is_object | |
| EXPR1_OBJ_TYPE | = lv_expr1_obj_type | |
| EXPR1_LENGTH | = lv_expr1_length | |
| EXPR1_IS_INITIAL | = lv_expr1_is_initial | |
| EXPR1_IS_NIL | = lv_expr1_is_nil | |
| OPERATOR | = lv_operator | |
| EXPR2 | = lv_expr2 | |
| EXPR2_VALUE | = lv_expr2_value | |
| EXPR2_TYPE | = lv_expr2_type | |
| RESULT_IS_TABLE | = lv_result_is_table | |
| EXPR2_IS_TABLE | = lv_expr2_is_table | |
| EXPR2_IS_OBJECT | = lv_expr2_is_object | |
| EXPR2_OBJ_TYPE | = lv_expr2_obj_type | |
| EXPR2_LENGTH | = lv_expr2_length | |
| EXPR2_IS_INITIAL | = lv_expr2_is_initial | |
| EXPR2_IS_NIL | = lv_expr2_is_nil | |
| RESULT_TYPE | = lv_result_type | |
| RESULT_IS_OBJECT | = lv_result_is_object | |
| RESULT_OBJ_TYPE | = lv_result_obj_type | |
| RESULT_LENGTH | = lv_result_length | |
| EXPR1 | = lv_expr1 | |
| EXPR1_VALUE | = lv_expr1_value | |
| EXPR1_TYPE | = lv_expr1_type | |
| IMPORTING | ||
| RESULT_TYPE | = lv_result_type | |
| RESULT_IS_TABLE | = lv_result_is_table | |
| RESULT_LENGTH | = lv_result_length | |
| ERRORCOUNT | = lv_errorcount | |
| WORST_MSGTYPE | = lv_worst_msgtype | |
| TABLES | ||
| EXPRESSION_ERRORS | = lt_expression_errors | |
| . " SWB_EXPR_CHECK_TYPE_OP_TYPE | ||
ABAP code using 7.40 inline data declarations to call FM SWB_EXPR_CHECK_TYPE_OP_TYPE
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 TYPE FROM SWCONT INTO @DATA(ld_result_type). | ||||
| "SELECT single ELEMENT FROM SWCONT INTO @DATA(ld_result_element). | ||||
| DATA(ld_result_element) | = ' '. | |||
| "SELECT single TABELEM FROM SWCONTDEF INTO @DATA(ld_expr1_is_table). | ||||
| "SELECT single IS_OBJECT FROM SWA_EXPRES INTO @DATA(ld_expr1_is_object). | ||||
| DATA(ld_expr1_is_object) | = ' '. | |||
| "SELECT single REFOBJTYPE FROM SWCONTDEF INTO @DATA(ld_expr1_obj_type). | ||||
| "SELECT single ELEMLENGTH FROM SWCONT INTO @DATA(ld_expr1_length). | ||||
| "SELECT single IS_NIL FROM SWA_EXPRES INTO @DATA(ld_expr1_is_initial). | ||||
| "SELECT single IS_NIL FROM SWA_EXPRES INTO @DATA(ld_expr1_is_nil). | ||||
| "SELECT single COND_OPERA FROM SWD_SDYNP INTO @DATA(ld_operator). | ||||
| "SELECT single EXPR FROM SWAEXPDEF INTO @DATA(ld_expr2). | ||||
| DATA(ld_expr2) | = ' '. | |||
| "SELECT single VALUE FROM SWCONT INTO @DATA(ld_expr2_value). | ||||
| DATA(ld_expr2_value) | = ' '. | |||
| "SELECT single TYPE FROM SWCONT INTO @DATA(ld_expr2_type). | ||||
| "SELECT single TABELEM FROM SWCONTDEF INTO @DATA(ld_result_is_table). | ||||
| "SELECT single TABELEM FROM SWCONTDEF INTO @DATA(ld_result_is_table). | ||||
| DATA(ld_result_is_table) | = ' '. | |||
| "SELECT single TABELEM FROM SWCONTDEF INTO @DATA(ld_expr2_is_table). | ||||
| "SELECT single IS_OBJECT FROM SWA_EXPRES INTO @DATA(ld_expr2_is_object). | ||||
| DATA(ld_expr2_is_object) | = ' '. | |||
| "SELECT single REFOBJTYPE FROM SWCONTDEF INTO @DATA(ld_expr2_obj_type). | ||||
| "SELECT single ELEMLENGTH FROM SWCONT INTO @DATA(ld_expr2_length). | ||||
| "SELECT single IS_NIL FROM SWA_EXPRES INTO @DATA(ld_expr2_is_initial). | ||||
| "SELECT single IS_NIL FROM SWA_EXPRES INTO @DATA(ld_expr2_is_nil). | ||||
| "SELECT single TYPE FROM SWCONT INTO @DATA(ld_result_type). | ||||
| DATA(ld_result_type) | = ' '. | |||
| "SELECT single ELEMLENGTH FROM SWCONT INTO @DATA(ld_result_length). | ||||
| "SELECT single ERRORCOUNT FROM SWAEXPEDIT INTO @DATA(ld_errorcount). | ||||
| "SELECT single IS_OBJECT FROM SWA_EXPRES INTO @DATA(ld_result_is_object). | ||||
| DATA(ld_result_is_object) | = ' '. | |||
| "SELECT single MSGTY FROM SY INTO @DATA(ld_worst_msgtype). | ||||
| "SELECT single OBJTYPE FROM SWOTOBJID INTO @DATA(ld_result_obj_type). | ||||
| "SELECT single ELEMLENGTH FROM SWCONT INTO @DATA(ld_result_length). | ||||
| "SELECT single EXPR FROM SWAEXPDEF INTO @DATA(ld_expr1). | ||||
| DATA(ld_expr1) | = ' '. | |||
| "SELECT single VALUE FROM SWCONT INTO @DATA(ld_expr1_value). | ||||
| DATA(ld_expr1_value) | = ' '. | |||
| "SELECT single TYPE FROM SWCONT INTO @DATA(ld_expr1_type). | ||||
Search for further information about these or an SAP related objects