SAP Function Modules

SWO_DIALOG_OBJTYPE_EDIT SAP Function module - Display/change object type







SWO_DIALOG_OBJTYPE_EDIT is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name SWO_DIALOG_OBJTYPE_EDIT into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: SWOS
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM SWO_DIALOG_OBJTYPE_EDIT - SWO DIALOG OBJTYPE EDIT





CALL FUNCTION 'SWO_DIALOG_OBJTYPE_EDIT' "Display/change object type
* EXPORTING
*   display = SPACE             " swoteditor-display  Editing mode
*   force_display = SPACE       " swoteditor-display  Switch to change mode not permitted
*   objtype =                   " swotbasdat-objtype  Object type (if SPACE then create)
*   use_objectnames = SPACE     " swoteditor-useobjname  Display object name instead of ID
*   verb = SPACE                " swo_verb
*   parameter = SPACE           " swo_param
*   show_basedata = SPACE       " char1
*   show_program = SPACE        " char1
*   program_line = 0            " i             Program Line
  IMPORTING
    funcexit =                  " swoteditor-funcexit  Function code exit
  EXCEPTIONS
    OBJTYPE_NOT_FOUND = 1       "               Object type is not defined
    PERMISSION_FAILURE = 2      "               No authorization for editing
    CANCELLED = 3               "               Action canceled
    GROUPS_NOT_SUPPORTED = 4    "
    .  "  SWO_DIALOG_OBJTYPE_EDIT

ABAP code example for Function Module SWO_DIALOG_OBJTYPE_EDIT





The ABAP code below is a full code listing to execute function module SWO_DIALOG_OBJTYPE_EDIT including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_funcexit  TYPE SWOTEDITOR-FUNCEXIT .


DATA(ld_display) = some text here

DATA(ld_force_display) = some text here

DATA(ld_objtype) = some text here

DATA(ld_use_objectnames) = some text here
DATA(ld_verb) = 'Check type of data required'.
DATA(ld_parameter) = 'Check type of data required'.
DATA(ld_show_basedata) = 'Check type of data required'.
DATA(ld_show_program) = 'Check type of data required'.
DATA(ld_program_line) = 'Check type of data required'. . CALL FUNCTION 'SWO_DIALOG_OBJTYPE_EDIT' * EXPORTING * display = ld_display * force_display = ld_force_display * objtype = ld_objtype * use_objectnames = ld_use_objectnames * verb = ld_verb * parameter = ld_parameter * show_basedata = ld_show_basedata * show_program = ld_show_program * program_line = ld_program_line IMPORTING funcexit = ld_funcexit EXCEPTIONS OBJTYPE_NOT_FOUND = 1 PERMISSION_FAILURE = 2 CANCELLED = 3 GROUPS_NOT_SUPPORTED = 4 . " SWO_DIALOG_OBJTYPE_EDIT
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_funcexit  TYPE SWOTEDITOR-FUNCEXIT ,
ld_display  TYPE SWOTEDITOR-DISPLAY ,
ld_force_display  TYPE SWOTEDITOR-DISPLAY ,
ld_objtype  TYPE SWOTBASDAT-OBJTYPE ,
ld_use_objectnames  TYPE SWOTEDITOR-USEOBJNAME ,
ld_verb  TYPE SWO_VERB ,
ld_parameter  TYPE SWO_PARAM ,
ld_show_basedata  TYPE CHAR1 ,
ld_show_program  TYPE CHAR1 ,
ld_program_line  TYPE I .


ld_display = some text here

ld_force_display = some text here

ld_objtype = some text here

ld_use_objectnames = some text here
ld_verb = 'Check type of data required'.
ld_parameter = 'Check type of data required'.
ld_show_basedata = 'Check type of data required'.
ld_show_program = 'Check type of data required'.
ld_program_line = 'Check type of data required'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name SWO_DIALOG_OBJTYPE_EDIT or its description.