SAP Function SO_FOLDER_READ_API1 - SAPoffice: Reading the contents of a folder (external: RFC)

Parameter Reference Type Length Default Optional Text
FOLDER_ID SOOBJINFI1-OBJECT_ID C 17 ID of folder to be read

Parameter Reference Type Length Text
FOLDER_DATA SOFOLDATI1 u 361 Complete attributes of read folder

Parameter Reference Length Optional Text
FOLDER_CONTENT SOFOLENTI1 770 Contents of folder

Exception Text
FOLDER_NOT_EXIST Specified folder does not exist
OPERATION_NO_AUTHORIZATION No authorization to read folder
X_ERROR Internal error or database inconsistency

Functionality
This function module returns all information on a folder.
This includes:

  • the attributes of the folder (e.g. name, description, creator, date
  • created, owner, folder area)
    • the contents of the folder
    • Import parameters
      FOLDER_ID
      Object ID of the folder to be read.

      Export parameters
      FOLDER_DATA
      This structure contains the attributes of the read folder.

      • OBJECT_ID

      • Object ID of the folder.
        • OBJ_NAME

        • Name of the folder.
          • OBJ_DESCR

          • Title (short description) of the folder.
            • OBJ_LANGU

            • Language of the folder.
              • OBJ_SORT

              • Sort field of the folder. This term can be searched for in theattribute search.
                • CREATOR_ID

                • SAPoffice ID of the creator of the folder.
                  • CREAT_NAME

                  • SAPoffice name of the creator of the folder. The SAPoffice name isunique client-wide.
                    • CREAT_FNAM

                    • Full name of the creator of the folder from the address management.
                      • CREAT_DATE

                      • Date folder was created.
                        • CREAT_TIME

                        • Time folder was created.
                          • CHANGER_ID

                          • SAPoffice ID of the person who last changed the folder.
                            • CHANG_NAME

                            • SAPoffice name of the person who last changed the folder. The SAPofficename is unique client-wide.
                              • CHANG_FNAM

                              • Full name of the person who last changed the folder from the addressmanagement.
                                • CHANG_DATE

                                • Date of last change.
                                  • CHANG_TIME

                                  • Time of last change.
                                    • OWNER_ID

                                    • SAPoffice ID of the owner of the folder.
                                      • OWNER_NAM

                                      • SAPoffice name of the owner of the folder. The SAPoffice name is uniqueclient-wide.
                                        • OWNER_FNAM

                                        • Full name of the owner of the folder from the address management.
                                          • LAST_ACCESS

                                          • Date folder was created/changed. Contains the latest of the two values.
                                            • OBJ_EXPDAT

                                            • This field is not used.
                                              • SENSITIVTY

                                              • Sensitivity of the folder.
                                                A private folder can have the following sensitivity:
                                                'O' : standard, normal sensitivity
                                                'F' : functional, entry possible but no difference to standard
                                                'P' : confidential, not visible to substitute
                                                Only the sensitivity 'O' is allowed for shared folders.
                                                • OBJ_PRIO

                                                • This field is not used.
                                                  • NO_CHANGE

                                                  • This field is not used.
                                                    • FOLREGION

                                                    • Folder area.
                                                      The following values are possible:
                                                      'P' : private folders
                                                      'Q' : shared folders
                                                      • FOLSECTION

                                                      • Folder category.
                                                        The following values are possible:
                                                        'P' : private folder
                                                        'M' : client folder
                                                        'G' : group folder
                                                        • PARENTFOL

                                                        • Object ID of the parent folder.
                                                          • NO_ENTRIES

                                                          • Number of child folders.
                                                            • NO_DOC

                                                            • Number of documents in the folder.

                                                              Table parameters
                                                              FOLDER_CONTENT
                                                              This table contains the attributes of the documents in the folderincluding other folders and distribution lists. Each line represents anentry.

                                                              • DOC_ID

                                                              • ID of the folder entry of the document. It is the connection betweenthe document and the folder in which it is located.
                                                                • OBJECT_ID

                                                                • Object ID of the document.
                                                                  • OBJ_TYPE

                                                                  • Type of document.
                                                                    • OBJ_NAME

                                                                    • Name of document.
                                                                      • OBJ_DESCR

                                                                      • Title (short description) of the document.
                                                                        • OBJ_LANGU

                                                                        • Language of the document.
                                                                          • OBJ_SORT

                                                                          • Sort field of the document. This term can be searched for in theattribute search.
                                                                            • CREATOR_ID

                                                                            • SAPoffice ID of the creator of the document.
                                                                              • CREAT_NAME

                                                                              • SAPoffice name of the creator of the document. The SAPoffice name isunique client-wide.
                                                                                • CREAT_FNAM

                                                                                • Full name of the creator of the document from the address management.
                                                                                  • CREAT_DATE

                                                                                  • Date document was created.
                                                                                    • CREAT_TIME

                                                                                    • Time document was created.
                                                                                      • CHANGE_ID

                                                                                      • SAPoffice ID of the person who last changed the document.
                                                                                        • CHANG_NAME

                                                                                        • SAPoffice name of the person who last changed the document. TheSAPoffice name is unique client-wide.
                                                                                          • CHANG_FNAM

                                                                                          • Full name of the person who last changed the document from the addressmanagement.
                                                                                            • CHANG_DATE

                                                                                            • Date of last change.
                                                                                              • CHANG_TIME

                                                                                              • Time of last change.
                                                                                                • OWNER_ID

                                                                                                • SAPoffice ID of the owner of the document.
                                                                                                  • OWNER_NAM

                                                                                                  • SAPoffice name of the owner of the document. The SAPoffice name isunique client-wide.
                                                                                                    • OWNER_FNAM

                                                                                                    • Full name of the owner of the document from the address management.
                                                                                                      • LAST_ACCES

                                                                                                      • Date document was created/changed. Contains the latest of the twovalues.
                                                                                                        • OBJ_EXPDAT

                                                                                                        • Expiration date of the document. The document itself cannot expire,however this date is used for the expiration date of the entry (fieldEXPIRY_DAT) for each new folder entry of the document.
                                                                                                          • SENSITIVTY

                                                                                                          • Sensitivity of the document.
                                                                                                            A private document can have the following sensitivity:
                                                                                                            'O' : standard, normal sensitivity
                                                                                                            'F' : functional, can be forwarded functionally
                                                                                                            'P' : confidential, not visible to substitute
                                                                                                            Only the sensitivity 'O' is allowed for documents in the sharedfolders.
                                                                                                            • OBJ_PRIO

                                                                                                            • Recipient priority. The document itself does not have a priority,however this value is used for the recipient priority of the entry(field PRIORITY) for each new folder entry of the document.
                                                                                                              • NO_CHANGE

                                                                                                              • If this flag is set ('X'), the document can only be changed by theauthor in the case of shared folder entries. In the case of privatefolder entries, it allows the author to make changes even once thedocument has been sent.
                                                                                                                • PRIORITY

                                                                                                                • Recipient priority of the folder entry. This value represents theimportance assigned to the entry by the owner after it has beenreceived.
                                                                                                                  • HISTORY

                                                                                                                  • If this flag is set ('X'), the document has a correspondence history.
                                                                                                                    • RESUB

                                                                                                                    • If this field is initial (not equal to ' '), the folder entry is aresubmitted document.
                                                                                                                      • RESUB_DATE

                                                                                                                      • Date of the resubmission.
                                                                                                                        • SENDER_ID

                                                                                                                        • If the document was sent internally, this field contains the SAPofficeID of the sender, if it was received from an external source, theaddress ID of the sender is entered.
                                                                                                                          • SEND_NAM

                                                                                                                          • If the document was sent internally, this field contains the SAPofficename of the sender, if it was received from an external source, thename of the address ID of the sender is entered.
                                                                                                                            • SEND_FNAM

                                                                                                                            • If the document was sent internally, this field contains the full nameof the sender from the address management. An exact description of theaddress of the sender is inserted for documents received externally.
                                                                                                                              • SEND_DATE

                                                                                                                              • Date of the send operation.
                                                                                                                                • SEND_TIME

                                                                                                                                • Time of the send operation.
                                                                                                                                  • FORWARD_ID

                                                                                                                                  • SAPoffice ID of the forwarder of the document.
                                                                                                                                    • FORW_NAM

                                                                                                                                    • SAPoffice name of the forwarder of the document. The SAPoffice name isunique client-wide.
                                                                                                                                      • FORW_FNAM

                                                                                                                                      • Full name of the forwarder of the document from the address management.
                                                                                                                                        • FORW_DATE

                                                                                                                                        • Forwarding date.
                                                                                                                                          • FORW_TIME

                                                                                                                                          • Forwarding time.
                                                                                                                                            • REC_ID

                                                                                                                                            • If the document was sent internally, this field contains the SAPofficeID of the recipient, if it was sent externally, the address ID of therecipient is entered.
                                                                                                                                              • REC_NAM

                                                                                                                                              • If the document was sent internally, this field contains the SAPofficename of the recipient, if it was sent externally, the name of theaddress ID of the recipient is entered.
                                                                                                                                                • REC_FNAM

                                                                                                                                                • If the document was sent internally, this field contains the full nameof the recipient from the address management. In the case of documentssent externally, an exact description of the address of the receiver isinserted.
                                                                                                                                                  • REC_DATE

                                                                                                                                                  • Date document was received.
                                                                                                                                                    • REC_TIME

                                                                                                                                                    • Time document was received.
                                                                                                                                                      • EXPRESS

                                                                                                                                                      • If this flag is set ('X'), the document was received with the 'express'attribute.
                                                                                                                                                        • COPY

                                                                                                                                                        • If this flag is set ('X'), the document was received with the attribute'copy'.
                                                                                                                                                          • BLIND_COPY

                                                                                                                                                          • If this flag is set ('X'), the document was received with the attribute'blind copy'. As a result, it cannot be printed nor forwarded.
                                                                                                                                                            • NO_FORWARD

                                                                                                                                                            • If this flag is set ('X'), the document cannot be forwarded by therecipient.
                                                                                                                                                              • NO_PRINT

                                                                                                                                                              • If this flag is set ('X'), the document cannot be printed by therecipient.
                                                                                                                                                                • TO_ANSWER

                                                                                                                                                                • If this flag is set ('X'), the recipient must reply to the documentbefore the relevant folder entry can be removed from the inbox.
                                                                                                                                                                  • TO_DO_EXPL

                                                                                                                                                                  • If this flag is set ('X'), the recipient must take action on thedocument before the relevant folder entry can be removed from theinbox.
                                                                                                                                                                    • TO_DO_GRP

                                                                                                                                                                    • If this field has a value between '1' and '9', a user from therecipient group formed by this number must take action on the documentbefore the relevant folder entry can be removed from one of the inboxesinvolved. If the value '0' is entered, action is not required.
                                                                                                                                                                      • C_TO_DO

                                                                                                                                                                      • Number of recipients who must take action on the document.
                                                                                                                                                                        • C_IN_PROC

                                                                                                                                                                        • Number of recipients who have accessed the document for processing.
                                                                                                                                                                          • C_DONE

                                                                                                                                                                          • Number of recipients who have taken action on the document.
                                                                                                                                                                            • C_EXPRESS

                                                                                                                                                                            • Number of recipients who have received the document with the attribute'express'.
                                                                                                                                                                              • C_COPY

                                                                                                                                                                              • Number of recipients who have received the document with the attribute'copy'.
                                                                                                                                                                                • C_BLIND_CP

                                                                                                                                                                                • Number of recipients who have received the document with the attribute'blind copy'.
                                                                                                                                                                                  • C_TO_REPLY

                                                                                                                                                                                  • Number of recipients who must reply to the document.
                                                                                                                                                                                    • C_ANSWERED

                                                                                                                                                                                    • Number of recipients who have replied to the document.
                                                                                                                                                                                      • C_READ

                                                                                                                                                                                      • Number of recipients who have viewed the document.
                                                                                                                                                                                        • C_RECEIVER

                                                                                                                                                                                        • Number of persons who have received the document visibly to allrecipients. To obtain the complete number of recipients, the number ofblind copies in C_BLIND_CP must be added to this value.
                                                                                                                                                                                          • PROC_TYPE

                                                                                                                                                                                          • If this field is not initial (not ' '), the document can be processed.
                                                                                                                                                                                            The following values are possible:
                                                                                                                                                                                            'D' : dialog module
                                                                                                                                                                                            'F' : function module
                                                                                                                                                                                            'R' : report
                                                                                                                                                                                            'S' : report with value transfer to global memory
                                                                                                                                                                                            'T' : transaction
                                                                                                                                                                                            'U' : transaction with value transfer to global memory
                                                                                                                                                                                            • PROC_NAME

                                                                                                                                                                                            • Processing element. Depending on the entry in the field PROC_TYPE, thename of the dialog module, function module, report, or transaction isspecified.
                                                                                                                                                                                              • PROC_SYST

                                                                                                                                                                                              • Name of the system in which the document is to be processed. If nosystem is specified or the value '*', processing is possible in anysystem.
                                                                                                                                                                                                • PROC_CLINT

                                                                                                                                                                                                • Client in which the document is to be processed. If no client isspecified or the value '*', processing is possible in any client.
                                                                                                                                                                                                  • SKIP_SCREN

                                                                                                                                                                                                  • If this flag is set ('X'), the first screen is skipped in theprocessing.
                                                                                                                                                                                                    • TO_DO_OUT

                                                                                                                                                                                                    • If this flag is set ('X'), the document cannot be acted upon from theSAPoffice interface. Processing must be carried out outside SAPofficevia the API function module SO_DOCUMENT_SET_STATUS_API1.
                                                                                                                                                                                                      • FREE_DEL

                                                                                                                                                                                                      • If this flag is set ('X'), the document can also be deleted in otherfolders via the API.
                                                                                                                                                                                                        • READ

                                                                                                                                                                                                        • If the folder entry is a received document and this flag is set ('X'),it has already been viewed.
                                                                                                                                                                                                          • READ_DATE

                                                                                                                                                                                                          • Date whe the document was read.
                                                                                                                                                                                                            • READ_TIME

                                                                                                                                                                                                            • Time when the document was read.
                                                                                                                                                                                                              • TO_DO_STAT

                                                                                                                                                                                                              • Status of the folder entry regarding action to be taken.
                                                                                                                                                                                                                The following values are possible:
                                                                                                                                                                                                                'TAAC' : Still ToDo
                                                                                                                                                                                                                'INPR' : In process
                                                                                                                                                                                                                'ACCO' : Done
                                                                                                                                                                                                                • STILL_TODO

                                                                                                                                                                                                                • If this flag is set ('X'), the folder entry still needs to be actedupon.
                                                                                                                                                                                                                  • REPLY_SENT

                                                                                                                                                                                                                  • If this flag is set ('X'), the folder entry has already been repliedto.
                                                                                                                                                                                                                    • RESUB_READ

                                                                                                                                                                                                                    • If this flag is set ('X'), the folder entry is a viewed resubmitteddocument.
                                                                                                                                                                                                                      • EXPIRY_DAT

                                                                                                                                                                                                                      • Expiration date of the folder entry. If the expiration has been reachedor exceeded, the entry is placed in the private trash and can beretrieved from there if necessary before the trash is next emptied. Anew folder entry is initially provided with the expiration date of thedocument from the field OBJ_EXPDAT.
                                                                                                                                                                                                                        • DOC_SIZE

                                                                                                                                                                                                                        • Size of the document in bytes.

                                                                                                                                                                                                                          Exceptions
                                                                                                                                                                                                                          FOLDER_NOT_EXIST
                                                                                                                                                                                                                          The specified folder does not exist. An incorrect ID was probablytransferred or the folder involved has been deleted.
                                                                                                                                                                                                                          OPERATION_NO_AUTHORIZATION
                                                                                                                                                                                                                          The specified folder could not be read. This may be because the folderis another user's private folder or because it is a folder in theshared folders for which the active user does not have an accessauthorization. Only the SAPoffice administrator can access folders inthe shared trash.
                                                                                                                                                                                                                          X_ERROR
                                                                                                                                                                                                                          An internal error or database inconsistency occurred.

                                                                                                                                                                                                                          Example
                                                                                                                                                                                                                          Reading the inbox of the active user with subsequent listing of thedocuments it contains. To determine the ID of the inbox, the functionmodule SO_USER_READ_API1 is used.
                                                                                                                                                                                                                          DATA: FOL_CONT LIKE SOFOLENTI1 OCCURS 10 WITH HEADER LINE.
                                                                                                                                                                                                                          DATA: USER_DATA LIKE SOUDATAI1.
                                                                                                                                                                                                                          CALL FUNCTION 'SO_USER_READ_API1'
                                                                                                                                                                                                                          EXPORTING
                                                                                                                                                                                                                          PREPARE_FOR_FOLDER_ACCESS = 'X'
                                                                                                                                                                                                                          IMPORTING
                                                                                                                                                                                                                          USER_DATA = USER_DATA
                                                                                                                                                                                                                          EXCEPTIONS
                                                                                                                                                                                                                          OTHERS = 1.
                                                                                                                                                                                                                          IF SY-SUBRC <> 0.
                                                                                                                                                                                                                          WRITE: / 'Inbox could not be read !'.
                                                                                                                                                                                                                          EXIT.
                                                                                                                                                                                                                          ENDIF.
                                                                                                                                                                                                                          CALL FUNCTION 'SO_FOLDER_READ_API1'
                                                                                                                                                                                                                          EXPORTING
                                                                                                                                                                                                                          FOLDER_ID = USER_DATA-INBOXFOL
                                                                                                                                                                                                                          TABLES
                                                                                                                                                                                                                          FOLDER_CONTENT = FOL_CONT
                                                                                                                                                                                                                          EXCEPTIONS
                                                                                                                                                                                                                          FOLDER_NOT_EXIST = 1
                                                                                                                                                                                                                          OPERATION_NO_AUTHORIZATION = 2
                                                                                                                                                                                                                          OTHERS = 99.
                                                                                                                                                                                                                          CASE SY-SUBRC.
                                                                                                                                                                                                                          WHEN 0.
                                                                                                                                                                                                                          WRITE: 'The inbox contains the following documents:'.
                                                                                                                                                                                                                          LOOP AT FOL_CONT.
                                                                                                                                                                                                                          WRITE: / FOL_CONT-OBJ_NAME, FOL_CONT-OBJ_DESCR.
                                                                                                                                                                                                                          ENDLOOP.
                                                                                                                                                                                                                          WHEN 1.
                                                                                                                                                                                                                          WRITE: / 'Inbox folder of user', sy-uname,
                                                                                                                                                                                                                          'does not exist !'.
                                                                                                                                                                                                                          WHEN 2.
                                                                                                                                                                                                                          WRITE: / 'No authorization to read the inbox !'.
                                                                                                                                                                                                                          ENDCASE.

                                                                                                                                                                                                                          Notes
                                                                                                                                                                                                                          To read documents or distribution lists, the function modulesSO_DOCUMENT_READ_API1 or SO_DLI_READ_API1 must be used.
                                                                                                                                                                                                                          To obtain a folder hierarchy starting from a particular folder, thefunction module SO_FOLDER_HIERARCHY_READ_API1 is used.

                                                                                                                                                                                                                          Further information
                                                                                                                                                                                                                          Information on calling the function module SO_USER_READ_API1 can befound in the documentation of this function module.