SAP Function Modules

SO_FOLDER_UPDATE SAP Function module - Create a folder







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

Associated Function Group: SOA7
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM SO_FOLDER_UPDATE - SO FOLDER UPDATE





CALL FUNCTION 'SO_FOLDER_UPDATE' "Create a folder
  EXPORTING
    folder_id =                 " soodk         Folder for inserting new folder
    object_fl_change =          " sofm1         Folder-related folder data
    object_hd_change =          " sood1         Definition data of folder
    object_id =                 " soodk         ID that was allocated
    object_sd_change =          " sofh1         Folder-specific header
    owner =                     " soud-usrnam   Owner of folder
  IMPORTING
    object_fl_display =         " sofm2         Folder-related folder data; part which can be displayed
    object_hd_display =         " sood2         Definition data; part that can be displayed
    object_sd_display =         " sofh2         Folder-specific header data that can be displayed
  EXCEPTIONS
    ACTIVE_USER_NOT_EXIST = 1   "               Active user does not exist
    COMMUNICATION_FAILURE = 2   "
    COMPONENT_NOT_AVAILABLE = 3  "              Component not available
    FOLDER_NOT_EXIST = 4        "               Specified folder does not exist
    FOLDER_NO_AUTHORIZATION = 5  "              No authorization for folder
    OBJECT_NOT_EXIST = 6        "               Object does not exist
    OBJECT_NO_AUTHORIZATION = 7  "              No authorization for object
    OPERATION_NO_AUTHORIZATION = 8  "           No authorization for operation
    OWNER_NOT_EXIST = 9         "               Owner does not exist
    PARAMETER_ERROR = 10        "               Incorrect combination of parameters
    SUBSTITUTE_NOT_ACTIVE = 11  "               Substitute is inactive
    SUBSTITUTE_NOT_DEFINED = 12  "              Substitute is not defined
    SYSTEM_FAILURE = 13         "
    X_ERROR = 14                "               Internal error
    .  "  SO_FOLDER_UPDATE

ABAP code example for Function Module SO_FOLDER_UPDATE





The ABAP code below is a full code listing to execute function module SO_FOLDER_UPDATE 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_object_fl_display  TYPE SOFM2 ,
ld_object_hd_display  TYPE SOOD2 ,
ld_object_sd_display  TYPE SOFH2 .

DATA(ld_folder_id) = 'Check type of data required'.
DATA(ld_object_fl_change) = 'Check type of data required'.
DATA(ld_object_hd_change) = 'Check type of data required'.
DATA(ld_object_id) = 'Check type of data required'.
DATA(ld_object_sd_change) = 'Check type of data required'.

SELECT single USRNAM
FROM SOUD
INTO @DATA(ld_owner).
. CALL FUNCTION 'SO_FOLDER_UPDATE' EXPORTING folder_id = ld_folder_id object_fl_change = ld_object_fl_change object_hd_change = ld_object_hd_change object_id = ld_object_id object_sd_change = ld_object_sd_change owner = ld_owner IMPORTING object_fl_display = ld_object_fl_display object_hd_display = ld_object_hd_display object_sd_display = ld_object_sd_display EXCEPTIONS ACTIVE_USER_NOT_EXIST = 1 COMMUNICATION_FAILURE = 2 COMPONENT_NOT_AVAILABLE = 3 FOLDER_NOT_EXIST = 4 FOLDER_NO_AUTHORIZATION = 5 OBJECT_NOT_EXIST = 6 OBJECT_NO_AUTHORIZATION = 7 OPERATION_NO_AUTHORIZATION = 8 OWNER_NOT_EXIST = 9 PARAMETER_ERROR = 10 SUBSTITUTE_NOT_ACTIVE = 11 SUBSTITUTE_NOT_DEFINED = 12 SYSTEM_FAILURE = 13 X_ERROR = 14 . " SO_FOLDER_UPDATE
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 ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 8. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 9. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 10. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 11. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 12. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 13. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 14. "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_object_fl_display  TYPE SOFM2 ,
ld_folder_id  TYPE SOODK ,
ld_object_hd_display  TYPE SOOD2 ,
ld_object_fl_change  TYPE SOFM1 ,
ld_object_hd_change  TYPE SOOD1 ,
ld_object_sd_display  TYPE SOFH2 ,
ld_object_id  TYPE SOODK ,
ld_object_sd_change  TYPE SOFH1 ,
ld_owner  TYPE SOUD-USRNAM .

ld_folder_id = 'Check type of data required'.
ld_object_fl_change = 'Check type of data required'.
ld_object_hd_change = 'Check type of data required'.
ld_object_id = 'Check type of data required'.
ld_object_sd_change = 'Check type of data required'.

SELECT single USRNAM
FROM SOUD
INTO ld_owner.

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 SO_FOLDER_UPDATE or its description.