SAP SO_FOLDER_LIST_READ Function Module for SAPoffice: Read folders









SO_FOLDER_LIST_READ is a standard so folder list read 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: Read folders 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 folder list read FM, simply by entering the name SO_FOLDER_LIST_READ into the relevant SAP transaction such as SE37 or SE38.

Function Group: SOC3
Program Name: SAPLSOC3
Main Program: SAPLSOC3
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function SO_FOLDER_LIST_READ 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_FOLDER_LIST_READ'"SAPoffice: Read folders
EXPORTING
* EXCLUDE_REGIONS = ' ' "Exclusion of regions in selection
* FOLDER_ACCESS = '1' "Access authorization
* FOLDER_SELECTIONS = ' ' "Entry of selections
* OWNER = ' ' "Owner
* REGION = 'Q' "Part of folders (private / shared)
* SOURCE_FOLDER_ID = ' ' "Root folder ID
* PARENT_ID = ' ' "
* CURRENT_FOL_ID = ' ' "

IMPORTING
TABLE_EMPTY = "Table empty = ON, table not empty = OFF
TABLE_HIER = "Selections as hierarchy
TABLE_100_ROWS = "

TABLES
FOLDER_LIST = "Table with all folder hits

EXCEPTIONS
COMPONENT_NOT_AVAILABLE = 1 OPERATION_NO_AUTHORIZATION = 2 OWNER_NOT_EXIST = 3 PARAMETER_ERROR = 4 X_ERROR = 5
.



IMPORTING Parameters details for SO_FOLDER_LIST_READ

EXCLUDE_REGIONS - Exclusion of regions in selection

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

FOLDER_ACCESS - Access authorization

Data type: SOFA-USRACC
Default: '1'
Optional: Yes
Call by Reference: No ( called with pass by value option)

FOLDER_SELECTIONS - Entry of selections

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

OWNER - Owner

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

REGION - Part of folders (private / shared)

Data type: SOFD-FOLRG
Default: 'Q'
Optional: Yes
Call by Reference: No ( called with pass by value option)

SOURCE_FOLDER_ID - Root folder ID

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

PARENT_ID -

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

CURRENT_FOL_ID -

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

EXPORTING Parameters details for SO_FOLDER_LIST_READ

TABLE_EMPTY - Table empty = ON, table not empty = OFF

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

TABLE_HIER - Selections as hierarchy

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

TABLE_100_ROWS -

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

TABLES Parameters details for SO_FOLDER_LIST_READ

FOLDER_LIST - Table with all folder hits

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

EXCEPTIONS details

COMPONENT_NOT_AVAILABLE - SAPoffice component not available

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

OPERATION_NO_AUTHORIZATION - No authorization for access

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

OWNER_NOT_EXIST - Owner does not exist

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

PARAMETER_ERROR - Combination of parameter values not allowed

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

X_ERROR - Other error

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

Copy and paste ABAP code example for SO_FOLDER_LIST_READ 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_folder_list  TYPE STANDARD TABLE OF SOXLI, "   
lv_table_empty  TYPE SONV-FLAG, "   
lv_exclude_regions  TYPE SOXRG, "   SPACE
lv_component_not_available  TYPE SOXRG, "   
lv_table_hier  TYPE SONV-FLAG, "   
lv_folder_access  TYPE SOFA-USRACC, "   '1'
lv_operation_no_authorization  TYPE SOFA, "   
lv_table_100_rows  TYPE SONV-FLAG, "   
lv_owner_not_exist  TYPE SONV, "   
lv_folder_selections  TYPE SOFDS, "   SPACE
lv_owner  TYPE SOUD-USRNAM, "   SPACE
lv_parameter_error  TYPE SOUD, "   
lv_region  TYPE SOFD-FOLRG, "   'Q'
lv_x_error  TYPE SOFD, "   
lv_source_folder_id  TYPE SOFDK, "   SPACE
lv_parent_id  TYPE SOFDK, "   SPACE
lv_current_fol_id  TYPE SOFDK. "   SPACE

  CALL FUNCTION 'SO_FOLDER_LIST_READ'  "SAPoffice: Read folders
    EXPORTING
         EXCLUDE_REGIONS = lv_exclude_regions
         FOLDER_ACCESS = lv_folder_access
         FOLDER_SELECTIONS = lv_folder_selections
         OWNER = lv_owner
         REGION = lv_region
         SOURCE_FOLDER_ID = lv_source_folder_id
         PARENT_ID = lv_parent_id
         CURRENT_FOL_ID = lv_current_fol_id
    IMPORTING
         TABLE_EMPTY = lv_table_empty
         TABLE_HIER = lv_table_hier
         TABLE_100_ROWS = lv_table_100_rows
    TABLES
         FOLDER_LIST = lt_folder_list
    EXCEPTIONS
        COMPONENT_NOT_AVAILABLE = 1
        OPERATION_NO_AUTHORIZATION = 2
        OWNER_NOT_EXIST = 3
        PARAMETER_ERROR = 4
        X_ERROR = 5
. " SO_FOLDER_LIST_READ




ABAP code using 7.40 inline data declarations to call FM SO_FOLDER_LIST_READ

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.

 
"SELECT single FLAG FROM SONV INTO @DATA(ld_table_empty).
 
DATA(ld_exclude_regions) = ' '.
 
 
"SELECT single FLAG FROM SONV INTO @DATA(ld_table_hier).
 
"SELECT single USRACC FROM SOFA INTO @DATA(ld_folder_access).
DATA(ld_folder_access) = '1'.
 
 
"SELECT single FLAG FROM SONV INTO @DATA(ld_table_100_rows).
 
 
DATA(ld_folder_selections) = ' '.
 
"SELECT single USRNAM FROM SOUD INTO @DATA(ld_owner).
DATA(ld_owner) = ' '.
 
 
"SELECT single FOLRG FROM SOFD INTO @DATA(ld_region).
DATA(ld_region) = 'Q'.
 
 
DATA(ld_source_folder_id) = ' '.
 
DATA(ld_parent_id) = ' '.
 
DATA(ld_current_fol_id) = ' '.
 


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!