SAP Function Modules

SMAP_OBJECT_MAINTAIN SAP Function module - Maintain Object Attributes







SMAP_OBJECT_MAINTAIN 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 SMAP_OBJECT_MAINTAIN into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM SMAP_OBJECT_MAINTAIN - SMAP OBJECT MAINTAIN





CALL FUNCTION 'SMAP_OBJECT_MAINTAIN' "Maintain Object Attributes
  EXPORTING
    i_object_type =             " smapobject-type  Object Type
*   i_object_id =               " smapobject-id  Object key
*   i_devclass =                " smapobject-devclass  Development Class
*   i_language = SY-LANGU       " sy-langu      Language
*   i_mode = 'SHOW'             " rpygsgf-mode
*   i_initial_screen = SPACE    " ufflag
*   i_screen = SPACE            " ufflag
*   i_popup = SPACE             " ufflag
*   i_starting_at_x = 2         " i
*   i_starting_at_y = 2         " i
*   i_active_tab =              " cxtab_tabstrip-activetab
*   i_msg_send = '0'            " c
*   i_cico_dialog = 'X'         " ufflag
*   i_cico_reqno =              " rpygsgf-cico_reqno  Transfer Order Number
*   _deletion_check = 'X'       " ufflag        (internal)
*   _maintain_structure = 'X'   " ufflag
  IMPORTING
    e_object_data =             " smapobject    Solution Map: Object - General Attributes
    e_cico_reqno =              " rpygsgf-cico_reqno
    e_exit =                    " ufflag
    e_cancelled =               " ufflag
* TABLES
*   t_fieldcat =                "
*   t_fcode_excl =              "
* CHANGING
*   r_object =                  "               Structure overview
  EXCEPTIONS
    ERROR_OCCURRED = 1          "               Errors occurred
    .  "  SMAP_OBJECT_MAINTAIN

ABAP code example for Function Module SMAP_OBJECT_MAINTAIN





The ABAP code below is a full code listing to execute function module SMAP_OBJECT_MAINTAIN 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_e_object_data  TYPE SMAPOBJECT ,
ld_e_cico_reqno  TYPE RPYGSGF-CICO_REQNO ,
ld_e_exit  TYPE UFFLAG ,
ld_e_cancelled  TYPE UFFLAG ,
it_t_fieldcat  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_t_fieldcat  LIKE LINE OF it_t_fieldcat ,
it_t_fcode_excl  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_t_fcode_excl  LIKE LINE OF it_t_fcode_excl .

DATA(ld_r_object) = 'some text here'.

DATA(ld_i_object_type) = some text here

DATA(ld_i_object_id) = some text here

DATA(ld_i_devclass) = some text here
DATA(ld_i_language) = 'Check type of data required'.

DATA(ld_i_mode) = some text here
DATA(ld_i_initial_screen) = 'Check type of data required'.
DATA(ld_i_screen) = 'Check type of data required'.
DATA(ld_i_popup) = 'Check type of data required'.
DATA(ld_i_starting_at_x) = 'Check type of data required'.
DATA(ld_i_starting_at_y) = 'Check type of data required'.

DATA(ld_i_active_tab) = some text here
DATA(ld_i_msg_send) = 'Check type of data required'.
DATA(ld_i_cico_dialog) = 'Check type of data required'.

DATA(ld_i_cico_reqno) = some text here
DATA(ld__deletion_check) = 'Check type of data required'.
DATA(ld__maintain_structure) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_fieldcat to it_t_fieldcat.

"populate fields of struture and append to itab
append wa_t_fcode_excl to it_t_fcode_excl. . CALL FUNCTION 'SMAP_OBJECT_MAINTAIN' EXPORTING i_object_type = ld_i_object_type * i_object_id = ld_i_object_id * i_devclass = ld_i_devclass * i_language = ld_i_language * i_mode = ld_i_mode * i_initial_screen = ld_i_initial_screen * i_screen = ld_i_screen * i_popup = ld_i_popup * i_starting_at_x = ld_i_starting_at_x * i_starting_at_y = ld_i_starting_at_y * i_active_tab = ld_i_active_tab * i_msg_send = ld_i_msg_send * i_cico_dialog = ld_i_cico_dialog * i_cico_reqno = ld_i_cico_reqno * _deletion_check = ld__deletion_check * _maintain_structure = ld__maintain_structure IMPORTING e_object_data = ld_e_object_data e_cico_reqno = ld_e_cico_reqno e_exit = ld_e_exit e_cancelled = ld_e_cancelled * TABLES * t_fieldcat = it_t_fieldcat * t_fcode_excl = it_t_fcode_excl * CHANGING * r_object = ld_r_object EXCEPTIONS ERROR_OCCURRED = 1 . " SMAP_OBJECT_MAINTAIN
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_r_object  TYPE STRING ,
ld_e_object_data  TYPE SMAPOBJECT ,
ld_i_object_type  TYPE SMAPOBJECT-TYPE ,
it_t_fieldcat  TYPE STANDARD TABLE OF STRING ,
wa_t_fieldcat  LIKE LINE OF it_t_fieldcat,
ld_e_cico_reqno  TYPE RPYGSGF-CICO_REQNO ,
ld_i_object_id  TYPE SMAPOBJECT-ID ,
it_t_fcode_excl  TYPE STANDARD TABLE OF STRING ,
wa_t_fcode_excl  LIKE LINE OF it_t_fcode_excl,
ld_e_exit  TYPE UFFLAG ,
ld_i_devclass  TYPE SMAPOBJECT-DEVCLASS ,
ld_e_cancelled  TYPE UFFLAG ,
ld_i_language  TYPE SY-LANGU ,
ld_i_mode  TYPE RPYGSGF-MODE ,
ld_i_initial_screen  TYPE UFFLAG ,
ld_i_screen  TYPE UFFLAG ,
ld_i_popup  TYPE UFFLAG ,
ld_i_starting_at_x  TYPE I ,
ld_i_starting_at_y  TYPE I ,
ld_i_active_tab  TYPE CXTAB_TABSTRIP-ACTIVETAB ,
ld_i_msg_send  TYPE C ,
ld_i_cico_dialog  TYPE UFFLAG ,
ld_i_cico_reqno  TYPE RPYGSGF-CICO_REQNO ,
ld__deletion_check  TYPE UFFLAG ,
ld__maintain_structure  TYPE UFFLAG .

ld_r_object = 'some text here'.

ld_i_object_type = some text here

"populate fields of struture and append to itab
append wa_t_fieldcat to it_t_fieldcat.

ld_i_object_id = some text here

"populate fields of struture and append to itab
append wa_t_fcode_excl to it_t_fcode_excl.

ld_i_devclass = some text here
ld_i_language = 'Check type of data required'.

ld_i_mode = some text here
ld_i_initial_screen = 'Check type of data required'.
ld_i_screen = 'Check type of data required'.
ld_i_popup = 'Check type of data required'.
ld_i_starting_at_x = 'Check type of data required'.
ld_i_starting_at_y = 'Check type of data required'.

ld_i_active_tab = some text here
ld_i_msg_send = 'Check type of data required'.
ld_i_cico_dialog = 'Check type of data required'.

ld_i_cico_reqno = some text here
ld__deletion_check = 'Check type of data required'.
ld__maintain_structure = '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 SMAP_OBJECT_MAINTAIN or its description.