SAP Function Modules

SO_WIND_FOLDERS_SELECT SAP Function module







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

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


Pattern for FM SO_WIND_FOLDERS_SELECT - SO WIND FOLDERS SELECT





CALL FUNCTION 'SO_WIND_FOLDERS_SELECT' "
* EXPORTING
*   exclude_regions = SPACE     " soxrg         Exclusion of certain folder regions
*   folder_access = '1'         " sofa-usracc   Access authorization for folders
*   full_screen = SPACE         " sonv-flag     full screen or not, will not be used
*   one_selection = 'X'         " sonv-flag     Single or multiple selection
*   owner = SPACE               " soud-usrnam   Owner
*   region = 'Q'                " sofd-folrg    Folder region for selection
*   selection = 'X'             " sonv-flag     With or without selection dialog box
*   source_folder_id = SPACE    " sofdk         Folder ID of original folder
*   folder_selections = SPACE   " sofds         Restrictions on folder selection
*   current_fol_id = SPACE      " sofdk
  IMPORTING
    f_cancelled =               " sonv-flag     Termination of function
    f_document_selection =      " sonv-flag     Document selection was executed
  TABLES
    follist =                   " soxli         Folder list
  EXCEPTIONS
    COMPONENT_NOT_AVAILABLE = 1  "              Component not available
    OPERATION_NO_AUTHORIZATION = 2  "           No authorization for operation
    OWNER_NOT_EXIST = 3         "               Owner does not exist
    PARAMETER_ERROR = 4         "               Incorrect function call
    X_ERROR = 5                 "               Abnormal termination
    .  "  SO_WIND_FOLDERS_SELECT

ABAP code example for Function Module SO_WIND_FOLDERS_SELECT





The ABAP code below is a full code listing to execute function module SO_WIND_FOLDERS_SELECT 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_f_cancelled  TYPE SONV-FLAG ,
ld_f_document_selection  TYPE SONV-FLAG ,
it_follist  TYPE STANDARD TABLE OF SOXLI,"TABLES PARAM
wa_follist  LIKE LINE OF it_follist .

DATA(ld_exclude_regions) = 'Check type of data required'.

SELECT single USRACC
FROM SOFA
INTO @DATA(ld_folder_access).


DATA(ld_full_screen) = some text here

DATA(ld_one_selection) = some text here

SELECT single USRNAM
FROM SOUD
INTO @DATA(ld_owner).


SELECT single FOLRG
FROM SOFD
INTO @DATA(ld_region).


DATA(ld_selection) = some text here
DATA(ld_source_folder_id) = 'Check type of data required'.
DATA(ld_folder_selections) = 'Check type of data required'.
DATA(ld_current_fol_id) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_follist to it_follist. . CALL FUNCTION 'SO_WIND_FOLDERS_SELECT' * EXPORTING * exclude_regions = ld_exclude_regions * folder_access = ld_folder_access * full_screen = ld_full_screen * one_selection = ld_one_selection * owner = ld_owner * region = ld_region * selection = ld_selection * source_folder_id = ld_source_folder_id * folder_selections = ld_folder_selections * current_fol_id = ld_current_fol_id IMPORTING f_cancelled = ld_f_cancelled f_document_selection = ld_f_document_selection TABLES follist = it_follist EXCEPTIONS COMPONENT_NOT_AVAILABLE = 1 OPERATION_NO_AUTHORIZATION = 2 OWNER_NOT_EXIST = 3 PARAMETER_ERROR = 4 X_ERROR = 5 . " SO_WIND_FOLDERS_SELECT
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 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_f_cancelled  TYPE SONV-FLAG ,
ld_exclude_regions  TYPE SOXRG ,
it_follist  TYPE STANDARD TABLE OF SOXLI ,
wa_follist  LIKE LINE OF it_follist,
ld_f_document_selection  TYPE SONV-FLAG ,
ld_folder_access  TYPE SOFA-USRACC ,
ld_full_screen  TYPE SONV-FLAG ,
ld_one_selection  TYPE SONV-FLAG ,
ld_owner  TYPE SOUD-USRNAM ,
ld_region  TYPE SOFD-FOLRG ,
ld_selection  TYPE SONV-FLAG ,
ld_source_folder_id  TYPE SOFDK ,
ld_folder_selections  TYPE SOFDS ,
ld_current_fol_id  TYPE SOFDK .

ld_exclude_regions = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_follist to it_follist.

SELECT single USRACC
FROM SOFA
INTO ld_folder_access.


ld_full_screen = some text here

ld_one_selection = some text here

SELECT single USRNAM
FROM SOUD
INTO ld_owner.


SELECT single FOLRG
FROM SOFD
INTO ld_region.


ld_selection = some text here
ld_source_folder_id = 'Check type of data required'.
ld_folder_selections = 'Check type of data required'.
ld_current_fol_id = '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 SO_WIND_FOLDERS_SELECT or its description.