SAP SO_OBJECT_INSERT Function Module for SAPoffice: Create an Object and Move to a Folder









SO_OBJECT_INSERT is a standard so object insert SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for SAPoffice: Create an Object and Move to a Folder 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 so object insert FM, simply by entering the name SO_OBJECT_INSERT into the relevant SAP transaction such as SE37 or SE38.

Function Group: SOA1
Program Name: SAPLSOA1
Main Program: SAPLSOA1
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function SO_OBJECT_INSERT 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 'SO_OBJECT_INSERT'"SAPoffice: Create an Object and Move to a Folder
EXPORTING
FOLDER_ID = "Folder ID
* OBJECT_FL_CHANGE = ' ' "Modifiable data for an entry in the folder
* OBJECT_HD_CHANGE = ' ' "Modifiable object definition data
OBJECT_TYPE = "Object type
* ORIGINATOR_ID = ' ' "
* OWNER = ' ' "Mailbox owner

IMPORTING
OBJECT_FL_DISPLAY = "Data (can be displayed) for an entry in the folder
OBJECT_HD_DISPLAY = "Object definition data (can be displayed)
OBJECT_ID = "Object ID

TABLES
OBJCONT = "Object contents
OBJHEAD = "Specific header of object
* OBJPARA = "Parameters for report/transaction
* OBJPARB = "Parameters for dialog/function module

EXCEPTIONS
ACTIVE_USER_NOT_EXIST = 1 PARAMETER_ERROR = 10 SUBSTITUTE_NOT_ACTIVE = 11 SUBSTITUTE_NOT_DEFINED = 12 SYSTEM_FAILURE = 13 X_ERROR = 14 COMMUNICATION_FAILURE = 2 COMPONENT_NOT_AVAILABLE = 3 DL_NAME_EXIST = 4 FOLDER_NOT_EXIST = 5 FOLDER_NO_AUTHORIZATION = 6 OBJECT_TYPE_NOT_EXIST = 7 OPERATION_NO_AUTHORIZATION = 8 OWNER_NOT_EXIST = 9
.



IMPORTING Parameters details for SO_OBJECT_INSERT

FOLDER_ID - Folder ID

Data type: SOODK
Optional: No
Call by Reference: No ( called with pass by value option)

OBJECT_FL_CHANGE - Modifiable data for an entry in the folder

Data type: SOFM1
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

OBJECT_HD_CHANGE - Modifiable object definition data

Data type: SOOD1
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

OBJECT_TYPE - Object type

Data type: SOODK-OBJTP
Optional: No
Call by Reference: No ( called with pass by value option)

ORIGINATOR_ID -

Data type: SOUDK
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

OWNER - Mailbox owner

Data type: SOUD-USRNAM
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for SO_OBJECT_INSERT

OBJECT_FL_DISPLAY - Data (can be displayed) for an entry in the folder

Data type: SOFM2
Optional: No
Call by Reference: No ( called with pass by value option)

OBJECT_HD_DISPLAY - Object definition data (can be displayed)

Data type: SOOD2
Optional: No
Call by Reference: No ( called with pass by value option)

OBJECT_ID - Object ID

Data type: SOODK
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for SO_OBJECT_INSERT

OBJCONT - Object contents

Data type: SOLI
Optional: No
Call by Reference: No ( called with pass by value option)

OBJHEAD - Specific header of object

Data type: SOLI
Optional: No
Call by Reference: No ( called with pass by value option)

OBJPARA - Parameters for report/transaction

Data type: SELC
Optional: Yes
Call by Reference: Yes

OBJPARB - Parameters for dialog/function module

Data type: SOOP1
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

ACTIVE_USER_NOT_EXIST - Active user does not exist

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

PARAMETER_ERROR - Parameter error

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

SUBSTITUTE_NOT_ACTIVE - The substitute is not activated

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

SUBSTITUTE_NOT_DEFINED - Substitute is not defined

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

SYSTEM_FAILURE -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

X_ERROR - Internal error

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

COMMUNICATION_FAILURE -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

COMPONENT_NOT_AVAILABLE - Component is not available

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

DL_NAME_EXIST -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

FOLDER_NOT_EXIST - Folder does not exist

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

FOLDER_NO_AUTHORIZATION - No authorization for selected folder

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

OBJECT_TYPE_NOT_EXIST - Object type does not exist

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

OPERATION_NO_AUTHORIZATION - No authorization for the operation selected

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

OWNER_NOT_EXIST - The owner of the mailbox does not exist

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for SO_OBJECT_INSERT 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:
lt_objcont  TYPE STANDARD TABLE OF SOLI, "   
lv_folder_id  TYPE SOODK, "   
lv_object_fl_display  TYPE SOFM2, "   
lv_active_user_not_exist  TYPE SOFM2, "   
lv_parameter_error  TYPE SOFM2, "   
lv_substitute_not_active  TYPE SOFM2, "   
lv_substitute_not_defined  TYPE SOFM2, "   
lv_system_failure  TYPE SOFM2, "   
lv_x_error  TYPE SOFM2, "   
lt_objhead  TYPE STANDARD TABLE OF SOLI, "   
lv_object_fl_change  TYPE SOFM1, "   SPACE
lv_object_hd_display  TYPE SOOD2, "   
lv_communication_failure  TYPE SOOD2, "   
lt_objpara  TYPE STANDARD TABLE OF SELC, "   
lv_object_id  TYPE SOODK, "   
lv_object_hd_change  TYPE SOOD1, "   SPACE
lv_component_not_available  TYPE SOOD1, "   
lt_objparb  TYPE STANDARD TABLE OF SOOP1, "   
lv_object_type  TYPE SOODK-OBJTP, "   
lv_dl_name_exist  TYPE SOODK, "   
lv_originator_id  TYPE SOUDK, "   SPACE
lv_folder_not_exist  TYPE SOUDK, "   
lv_owner  TYPE SOUD-USRNAM, "   SPACE
lv_folder_no_authorization  TYPE SOUD, "   
lv_object_type_not_exist  TYPE SOUD, "   
lv_operation_no_authorization  TYPE SOUD, "   
lv_owner_not_exist  TYPE SOUD. "   

  CALL FUNCTION 'SO_OBJECT_INSERT'  "SAPoffice: Create an Object and Move to a Folder
    EXPORTING
         FOLDER_ID = lv_folder_id
         OBJECT_FL_CHANGE = lv_object_fl_change
         OBJECT_HD_CHANGE = lv_object_hd_change
         OBJECT_TYPE = lv_object_type
         ORIGINATOR_ID = lv_originator_id
         OWNER = lv_owner
    IMPORTING
         OBJECT_FL_DISPLAY = lv_object_fl_display
         OBJECT_HD_DISPLAY = lv_object_hd_display
         OBJECT_ID = lv_object_id
    TABLES
         OBJCONT = lt_objcont
         OBJHEAD = lt_objhead
         OBJPARA = lt_objpara
         OBJPARB = lt_objparb
    EXCEPTIONS
        ACTIVE_USER_NOT_EXIST = 1
        PARAMETER_ERROR = 10
        SUBSTITUTE_NOT_ACTIVE = 11
        SUBSTITUTE_NOT_DEFINED = 12
        SYSTEM_FAILURE = 13
        X_ERROR = 14
        COMMUNICATION_FAILURE = 2
        COMPONENT_NOT_AVAILABLE = 3
        DL_NAME_EXIST = 4
        FOLDER_NOT_EXIST = 5
        FOLDER_NO_AUTHORIZATION = 6
        OBJECT_TYPE_NOT_EXIST = 7
        OPERATION_NO_AUTHORIZATION = 8
        OWNER_NOT_EXIST = 9
. " SO_OBJECT_INSERT




ABAP code using 7.40 inline data declarations to call FM SO_OBJECT_INSERT

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.

 
 
 
 
 
 
 
 
 
 
DATA(ld_object_fl_change) = ' '.
 
 
 
 
 
DATA(ld_object_hd_change) = ' '.
 
 
 
"SELECT single OBJTP FROM SOODK INTO @DATA(ld_object_type).
 
 
DATA(ld_originator_id) = ' '.
 
 
"SELECT single USRNAM FROM SOUD INTO @DATA(ld_owner).
DATA(ld_owner) = ' '.
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!