SAP SWO_QUERY_OBJTYPES Function Module for Request object types
SWO_QUERY_OBJTYPES is a standard swo query objtypes SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Request object types processing and below is the pattern details for this FM, 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 swo query objtypes FM, simply by entering the name SWO_QUERY_OBJTYPES into the relevant SAP transaction such as SE37 or SE38.
Function Group: SWOR
Program Name: SAPLSWOR
Main Program: SAPLSWOR
Appliation area: S
Release date: 30-Apr-1997
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function SWO_QUERY_OBJTYPES 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 'SWO_QUERY_OBJTYPES'"Request object types.
EXPORTING
* OBJTYPE = ' ' "
* WITH_IMPLEMENTED = 'X' "Detail selection for released object types
* WITH_OBSOLETE = ' ' "Selection: Obsolete object types
* WITH_DELEGATED_OBJTYPES = 'X' "
* OBJNAME = ' ' "
* CHANGE_USER = ' ' "
* LANGUAGE = SY-LANGU "
* OBJTYPECLASS_SAP = ' ' "Selection: Object types
* OBJTYPECLASS_IF = ' ' "Selection: Interfaces
* INTERFACE = ' ' "Object types which support interface
* TEXTPATTERN = ' ' "Text selection
* RELEASED = '*' "Selection according to release status
TABLES
OBJTYPES = "No.of hits
IMPORTING Parameters details for SWO_QUERY_OBJTYPES
OBJTYPE -
Data type: SWOTDFIND-OBJTYPEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_IMPLEMENTED - Detail selection for released object types
Data type: SY-INPUTDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_OBSOLETE - Selection: Obsolete object types
Data type: SY-INPUTDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_DELEGATED_OBJTYPES -
Data type: SY-INPUTDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
OBJNAME -
Data type: SWOTDFIND-OBJNAMEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CHANGE_USER -
Data type: SWOTDFIND-CHAN_USERDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
LANGUAGE -
Data type: SY-LANGUDefault: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)
OBJTYPECLASS_SAP - Selection: Object types
Data type: SWOTDFIND-OCLAS_WFLDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
OBJTYPECLASS_IF - Selection: Interfaces
Data type: SWOTDFIND-OCLAS_IFDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
INTERFACE - Object types which support interface
Data type: SWOTDFIND-INTERFACEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TEXTPATTERN - Text selection
Data type: SWOTDFIND-TXTPATTERNDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
RELEASED - Selection according to release status
Data type: SWOTDFIND-RELEASEDDefault: '*'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for SWO_QUERY_OBJTYPES
OBJTYPES - No.of hits
Data type: SWOTFINDOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for SWO_QUERY_OBJTYPES 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_objtype | TYPE SWOTDFIND-OBJTYPE, " SPACE | |||
| lt_objtypes | TYPE STANDARD TABLE OF SWOTFIND, " | |||
| lv_with_implemented | TYPE SY-INPUT, " 'X' | |||
| lv_with_obsolete | TYPE SY-INPUT, " ' ' | |||
| lv_with_delegated_objtypes | TYPE SY-INPUT, " 'X' | |||
| lv_objname | TYPE SWOTDFIND-OBJNAME, " SPACE | |||
| lv_change_user | TYPE SWOTDFIND-CHAN_USER, " SPACE | |||
| lv_language | TYPE SY-LANGU, " SY-LANGU | |||
| lv_objtypeclass_sap | TYPE SWOTDFIND-OCLAS_WFL, " SPACE | |||
| lv_objtypeclass_if | TYPE SWOTDFIND-OCLAS_IF, " SPACE | |||
| lv_interface | TYPE SWOTDFIND-INTERFACE, " SPACE | |||
| lv_textpattern | TYPE SWOTDFIND-TXTPATTERN, " SPACE | |||
| lv_released | TYPE SWOTDFIND-RELEASED. " '*' |
|   CALL FUNCTION 'SWO_QUERY_OBJTYPES' "Request object types |
| EXPORTING | ||
| OBJTYPE | = lv_objtype | |
| WITH_IMPLEMENTED | = lv_with_implemented | |
| WITH_OBSOLETE | = lv_with_obsolete | |
| WITH_DELEGATED_OBJTYPES | = lv_with_delegated_objtypes | |
| OBJNAME | = lv_objname | |
| CHANGE_USER | = lv_change_user | |
| LANGUAGE | = lv_language | |
| OBJTYPECLASS_SAP | = lv_objtypeclass_sap | |
| OBJTYPECLASS_IF | = lv_objtypeclass_if | |
| INTERFACE | = lv_interface | |
| TEXTPATTERN | = lv_textpattern | |
| RELEASED | = lv_released | |
| TABLES | ||
| OBJTYPES | = lt_objtypes | |
| . " SWO_QUERY_OBJTYPES | ||
ABAP code using 7.40 inline data declarations to call FM SWO_QUERY_OBJTYPES
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 OBJTYPE FROM SWOTDFIND INTO @DATA(ld_objtype). | ||||
| DATA(ld_objtype) | = ' '. | |||
| "SELECT single INPUT FROM SY INTO @DATA(ld_with_implemented). | ||||
| DATA(ld_with_implemented) | = 'X'. | |||
| "SELECT single INPUT FROM SY INTO @DATA(ld_with_obsolete). | ||||
| DATA(ld_with_obsolete) | = ' '. | |||
| "SELECT single INPUT FROM SY INTO @DATA(ld_with_delegated_objtypes). | ||||
| DATA(ld_with_delegated_objtypes) | = 'X'. | |||
| "SELECT single OBJNAME FROM SWOTDFIND INTO @DATA(ld_objname). | ||||
| DATA(ld_objname) | = ' '. | |||
| "SELECT single CHAN_USER FROM SWOTDFIND INTO @DATA(ld_change_user). | ||||
| DATA(ld_change_user) | = ' '. | |||
| "SELECT single LANGU FROM SY INTO @DATA(ld_language). | ||||
| DATA(ld_language) | = SY-LANGU. | |||
| "SELECT single OCLAS_WFL FROM SWOTDFIND INTO @DATA(ld_objtypeclass_sap). | ||||
| DATA(ld_objtypeclass_sap) | = ' '. | |||
| "SELECT single OCLAS_IF FROM SWOTDFIND INTO @DATA(ld_objtypeclass_if). | ||||
| DATA(ld_objtypeclass_if) | = ' '. | |||
| "SELECT single INTERFACE FROM SWOTDFIND INTO @DATA(ld_interface). | ||||
| DATA(ld_interface) | = ' '. | |||
| "SELECT single TXTPATTERN FROM SWOTDFIND INTO @DATA(ld_textpattern). | ||||
| DATA(ld_textpattern) | = ' '. | |||
| "SELECT single RELEASED FROM SWOTDFIND INTO @DATA(ld_released). | ||||
| DATA(ld_released) | = '*'. | |||
Search for further information about these or an SAP related objects