SAP SWO_DIALOG_OBJTYPE_EDIT Function Module for Display/change object type
SWO_DIALOG_OBJTYPE_EDIT is a standard swo dialog objtype edit SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Display/change object type 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 dialog objtype edit FM, simply by entering the name SWO_DIALOG_OBJTYPE_EDIT into the relevant SAP transaction such as SE37 or SE38.
Function Group: SWOS
Program Name: SAPLSWOS
Main Program: SAPLSWOS
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function SWO_DIALOG_OBJTYPE_EDIT 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_DIALOG_OBJTYPE_EDIT'"Display/change object type.
EXPORTING
* DISPLAY = ' ' "Editing mode
* FORCE_DISPLAY = ' ' "Switch to change mode not permitted
* OBJTYPE = "Object type (if ' ' then create)
* USE_OBJECTNAMES = ' ' "Display object name instead of ID
* VERB = ' ' "
* PARAMETER = ' ' "
* SHOW_BASEDATA = ' ' "
* SHOW_PROGRAM = ' ' "
* PROGRAM_LINE = 0 "Program Line
IMPORTING
FUNCEXIT = "Function code exit
EXCEPTIONS
OBJTYPE_NOT_FOUND = 1 PERMISSION_FAILURE = 2 CANCELLED = 3 GROUPS_NOT_SUPPORTED = 4
IMPORTING Parameters details for SWO_DIALOG_OBJTYPE_EDIT
DISPLAY - Editing mode
Data type: SWOTEDITOR-DISPLAYDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FORCE_DISPLAY - Switch to change mode not permitted
Data type: SWOTEDITOR-DISPLAYDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
OBJTYPE - Object type (if SPACE then create)
Data type: SWOTBASDAT-OBJTYPEOptional: Yes
Call by Reference: No ( called with pass by value option)
USE_OBJECTNAMES - Display object name instead of ID
Data type: SWOTEDITOR-USEOBJNAMEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
VERB -
Data type: SWO_VERBDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PARAMETER -
Data type: SWO_PARAMDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SHOW_BASEDATA -
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SHOW_PROGRAM -
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PROGRAM_LINE - Program Line
Data type: IOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for SWO_DIALOG_OBJTYPE_EDIT
FUNCEXIT - Function code exit
Data type: SWOTEDITOR-FUNCEXITOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
OBJTYPE_NOT_FOUND - Object type is not defined
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PERMISSION_FAILURE - No authorization for editing
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CANCELLED - Action canceled
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
GROUPS_NOT_SUPPORTED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for SWO_DIALOG_OBJTYPE_EDIT 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_display | TYPE SWOTEDITOR-DISPLAY, " SPACE | |||
| lv_funcexit | TYPE SWOTEDITOR-FUNCEXIT, " | |||
| lv_objtype_not_found | TYPE SWOTEDITOR, " | |||
| lv_force_display | TYPE SWOTEDITOR-DISPLAY, " SPACE | |||
| lv_permission_failure | TYPE SWOTEDITOR, " | |||
| lv_objtype | TYPE SWOTBASDAT-OBJTYPE, " | |||
| lv_cancelled | TYPE SWOTBASDAT, " | |||
| lv_use_objectnames | TYPE SWOTEDITOR-USEOBJNAME, " SPACE | |||
| lv_groups_not_supported | TYPE SWOTEDITOR, " | |||
| lv_verb | TYPE SWO_VERB, " SPACE | |||
| lv_parameter | TYPE SWO_PARAM, " SPACE | |||
| lv_show_basedata | TYPE CHAR1, " SPACE | |||
| lv_show_program | TYPE CHAR1, " SPACE | |||
| lv_program_line | TYPE I. " 0 |
|   CALL FUNCTION 'SWO_DIALOG_OBJTYPE_EDIT' "Display/change object type |
| EXPORTING | ||
| DISPLAY | = lv_display | |
| FORCE_DISPLAY | = lv_force_display | |
| OBJTYPE | = lv_objtype | |
| USE_OBJECTNAMES | = lv_use_objectnames | |
| VERB | = lv_verb | |
| PARAMETER | = lv_parameter | |
| SHOW_BASEDATA | = lv_show_basedata | |
| SHOW_PROGRAM | = lv_show_program | |
| PROGRAM_LINE | = lv_program_line | |
| IMPORTING | ||
| FUNCEXIT | = lv_funcexit | |
| EXCEPTIONS | ||
| OBJTYPE_NOT_FOUND = 1 | ||
| PERMISSION_FAILURE = 2 | ||
| CANCELLED = 3 | ||
| GROUPS_NOT_SUPPORTED = 4 | ||
| . " SWO_DIALOG_OBJTYPE_EDIT | ||
ABAP code using 7.40 inline data declarations to call FM SWO_DIALOG_OBJTYPE_EDIT
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 DISPLAY FROM SWOTEDITOR INTO @DATA(ld_display). | ||||
| DATA(ld_display) | = ' '. | |||
| "SELECT single FUNCEXIT FROM SWOTEDITOR INTO @DATA(ld_funcexit). | ||||
| "SELECT single DISPLAY FROM SWOTEDITOR INTO @DATA(ld_force_display). | ||||
| DATA(ld_force_display) | = ' '. | |||
| "SELECT single OBJTYPE FROM SWOTBASDAT INTO @DATA(ld_objtype). | ||||
| "SELECT single USEOBJNAME FROM SWOTEDITOR INTO @DATA(ld_use_objectnames). | ||||
| DATA(ld_use_objectnames) | = ' '. | |||
| DATA(ld_verb) | = ' '. | |||
| DATA(ld_parameter) | = ' '. | |||
| DATA(ld_show_basedata) | = ' '. | |||
| DATA(ld_show_program) | = ' '. | |||
Search for further information about these or an SAP related objects