SAP Function SO_DOCUMENT_READ_API1 - SAPoffice: View object from folder using RFC

Parameter Reference Type Length Default Optional Text
DOCUMENT_ID SOFOLENTI1-DOC_ID C 46 ID of folder entry to be viewed
FILTER SOFILTERI1 u 3 'X ' X Preselection of required object data

Parameter Reference Type Length Text
DOCUMENT_DATA SOFOLENTI1 u 770 Complete attributes of folder entry

Parameter Reference Length Optional Text
ATTACHMENT_LIST SOATTLSTI1 140 X Table with attachments for document
CONTENTS_HEX SOLIX 255 X Table for Binary Content
OBJECT_CONTENT SOLISTI1 255 X Document Content
OBJECT_HEADER SOLISTI1 255 X Header data for document (spec.header)
OBJECT_PARA SOPARAI1 92 X SET/GET parameter table for processing
OBJECT_PARB SOPARBI1 285 X Values transferred for processing
RECEIVER_LIST SORECLSTI1 1470 X Table with document recipients

Exception Text
DOCUMENT_ID_NOT_EXIST Specified folder entry does not exist
OPERATION_NO_AUTHORIZATION No authorization to view folder entry
X_ERROR Internal error or database inconsistency

Functionality
This function module provides all information on a document.
This includes:

  • the attributes of the document (e.g. name, description, creator, date
  • created, priority, expiration date, etc.)
    • transmission information (e.g. sender, date sent, forwarder, date
    • received, send attributes, etc.)
      • contents of the document

      • type-specific information (e.g. for SAPscript documents the layout set
      • and style used)
        • processing information (type of processing, name of the processing
        • element, and specification of transfer parameters)
          A distinction needs to be made here between the document and its folderentries. The document itself only exists once in the database. It isused as a template for the folder entries and can be referenced usingits object ID. The document can have any number of folder entries. Theycontain the contents and attributes of the document as well as someadditional attributes referring to the folder entry. These include thesender priority and expiration date of the entry. Folder entries arethe result of resubmissions, links, sending and creating a newdocument.

          Import parameters
          DOCUMENT_ID
          ID of the folder entry of the document to be read. It is the connectionbetween the document and the folder in which it is located.
          FILTER
          This structure allows the areas of the document which are to be read tobe selected.

          • SEND_INFO

          • Default = 'X'.
            If this flag is set ('X'), the transmission information is also read.
            • NO_CONTENT

            • Default = ' '.
              If this flag is set ('X'), the contents (table OBJECT_CONTENT), thespecific header data (table OBJECT_HEADER) and the processingparameters (table OBJECT_PARA and OBJECT_PARB) of the document are alsoread.
              • REC_LIST

              • Default = ' '.
                If this flag is set ('X'), the recipient list (table RECEIVER_LIST) ofthe document is also read.

                Export parameters
                DOCUMENT_DATA
                This structure contains the attributes of the document read.

                • 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 person who last changed the document.
                                          • CHANG_NAME

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

                                            • Full name of 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 the 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, the author can make changes even after the document hasbeen sent.
                                                                  • PRIORITY

                                                                  • Recipient priority of the folder entry. This value represents theimportance assigned to the document 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 not initial (not ' '), 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 the nameof 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. In the case of documentsreceived externally, a description of the sender address is inserted.
                                                                                • 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, a description of the address of the recipient isentered.
                                                                                                    • 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 'copy'attribute.
                                                                                                            • 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 act upon the documentbefore the relevant folder entry can be removed from the inbox.
                                                                                                                      • TO_DO_GRP

                                                                                                                      • If this field contains 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, no action is 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 can be carried out inany system.
                                                                                                                                                  • PROC_CLINT

                                                                                                                                                  • Client in which the document is to be processed. If no client or thevalue '*' is specified, 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 from outsideSAPoffice via 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 read.
                                                                                                                                                            • READ_DATE

                                                                                                                                                            • Date when the document was read.
                                                                                                                                                              • READ_TIME

                                                                                                                                                              • Time when the document was read.
                                                                                                                                                                • TO_DO_STAT

                                                                                                                                                                • Status of the folder entry with regard to 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 must still be acted upon.
                                                                                                                                                                    • 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. When the expiration date has beenreached or exceeded, the entry is placed in the private trash and canbe retrieved from there if necessary before the trash is next emptied.A new folder entry is provided initially with the expiration date ofthe document from the field OBJ_EXPDAT.
                                                                                                                                                                          • DOC_SIZE

                                                                                                                                                                          • Size of the document in bytes.

                                                                                                                                                                            Table parameters
                                                                                                                                                                            OBJECT_HEADER
                                                                                                                                                                            This table contains the data dependent on the document type. Forexample, SAPscript documents have information on the layout set andstyle, Excel list viewer documents the number of lines and columns, andPC documents their original file names.

                                                                                                                                                                            • LINE

                                                                                                                                                                            • Contains the type-dependent information of the document by the line.
                                                                                                                                                                              OBJECT_CONTENT
                                                                                                                                                                              This table contains the actual contents of the document.
                                                                                                                                                                              • LINE

                                                                                                                                                                              • Contains the contents of the document by the line.
                                                                                                                                                                                OBJECT_PARA
                                                                                                                                                                                This table is only used by documents which are to be processed. Itcontains the SET/GET parameters which are passed to the processingelement.
                                                                                                                                                                                • NAME

                                                                                                                                                                                • Name of the SET/GET parameter. Only the first three characters areused.
                                                                                                                                                                                  • OPTION

                                                                                                                                                                                  • This field is not used.
                                                                                                                                                                                    • LOW

                                                                                                                                                                                    • Contains the appropriate value of the parameter in NAME.
                                                                                                                                                                                      • HIGH

                                                                                                                                                                                      • This field is not used.
                                                                                                                                                                                        OBJECT_PARB
                                                                                                                                                                                        This table is only used by documents which have been assigned aparticular processing type. Depending on this, they have a differentmeaning. If the processing element is a report or transaction withvalue transfer to the global memory, the table contents are interpretedas a set of parameters with related values and exported to the memoryID derived from the first line. If the processing element is a functionor dialog module, the table is passed to it as the table parameterMSGDIAL.
                                                                                                                                                                                        • NAME

                                                                                                                                                                                        • If the processing element is a report or transaction with valuetransfer to the global memory, the field of the first table linecontains the name of the memory ID used for the export. The fields ofthe other lines are used to contain the names of the parameters. If theprocessing element is a function or dialog module, the fields must beassigned values appropriately according to the use.
                                                                                                                                                                                          • VALUE

                                                                                                                                                                                          • If the processing element is a report or transaction with valuetransfer to the global memory, the field of the first table line mustremain blank. The fields of the other lines are used to contain thevalues for the parameters in NAME. If the processing element is afunction or dialog module, the fields must be assigned valuesappropriately according to the use.
                                                                                                                                                                                            ATTACHMENT_LIST
                                                                                                                                                                                            This table contains the essential attributes of the documentattachments. Each line stands for an attachment.
                                                                                                                                                                                            • ATTACH_ID

                                                                                                                                                                                            • ID of the document attachment. This is the connection between theattachment and the document it belongs to.
                                                                                                                                                                                              • ATTACH_TYP

                                                                                                                                                                                              • Type of attachment.
                                                                                                                                                                                                • ATT_NAME

                                                                                                                                                                                                • Name of attachment.
                                                                                                                                                                                                  • ATT_DESCR

                                                                                                                                                                                                  • Title (short description) of the attachment.
                                                                                                                                                                                                    RECEIVER_LIST
                                                                                                                                                                                                    This table contains the recipient list of the document. Each linestands for a recipient.
                                                                                                                                                                                                    • RECEIVER

                                                                                                                                                                                                    • Recipient name.
                                                                                                                                                                                                      The following entry types are possible:
                                                                                                                                                                                                      the SAP user name of the recipient
                                                                                                                                                                                                      the SAPoffice name of the recipient
                                                                                                                                                                                                      a fax number in the form of the structure SADRFD
                                                                                                                                                                                                      an Internet address in the form of the structure SADRUD
                                                                                                                                                                                                      a remote SAP name in the form of the structure SADR7D
                                                                                                                                                                                                      an X.400 address in the form of the structure SADR8D
                                                                                                                                                                                                      • ADR_TYPE

                                                                                                                                                                                                      • Type of RECEIVER entry.
                                                                                                                                                                                                        The following values are allowed:
                                                                                                                                                                                                        'B' : SAP user name
                                                                                                                                                                                                        ' ' : SAPoffice name
                                                                                                                                                                                                        'F' : Fax number
                                                                                                                                                                                                        'U' : Internet address
                                                                                                                                                                                                        'R ' : Remote SAP name
                                                                                                                                                                                                        'X' : X.400 address
                                                                                                                                                                                                        • 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, a description of the address of the recipient 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 attribute'express'.
                                                                                                                                                                                                                    • 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 act upon the documentbefore the relevant folder entry can be removed from the inbox.
                                                                                                                                                                                                                                • TO_DO_GRP

                                                                                                                                                                                                                                • If this field contains 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, no action is required.
                                                                                                                                                                                                                                  • COM_TYPE

                                                                                                                                                                                                                                  • If the document was sent externally, this field contains thecommunication method used.
                                                                                                                                                                                                                                    The following values are possible:
                                                                                                                                                                                                                                    'INT' : Send via Internet
                                                                                                                                                                                                                                    'FAX' : Send as fax
                                                                                                                                                                                                                                    'X40' : Send via X.400
                                                                                                                                                                                                                                    'RML' : Send to another SAP System
                                                                                                                                                                                                                                    • LFDNR

                                                                                                                                                                                                                                    • If the document was sent to an address number, this field contains thesequential number from the address management.
                                                                                                                                                                                                                                      • FAX

                                                                                                                                                                                                                                      • This field is not used.
                                                                                                                                                                                                                                        • COUNTRY

                                                                                                                                                                                                                                        • This field is not used.
                                                                                                                                                                                                                                          • SPOOL_ID

                                                                                                                                                                                                                                          • This field is not used.
                                                                                                                                                                                                                                            • NOTIF_DEL

                                                                                                                                                                                                                                            • If this flag is set ('X'), the sender receives a confirmation as soonas the document has been delivered to the recipient. He/she alsoreceives a message if the document could not be delivered. This flagshould only be set if the document is sent externally, since internallythe send process is carried out synchronously. However, theconfirmation is only supported by a few mail systems such as X.400 andSAP SAP.
                                                                                                                                                                                                                                              • NOTIF_READ

                                                                                                                                                                                                                                              • If this flag is set ('X'), the sender is notified as soon as therecipient has viewed the document. This flag should only be set ifdocuments are sent externally, since internally the send process iscarried out synchronously. However, the read confirmation is onlysupported by a few mail systems, such as X.400 and SAP SAP.
                                                                                                                                                                                                                                                • NOTIF_NDEL

                                                                                                                                                                                                                                                • If this flag is set ('X'), the recipient receives a message if thedocument could not be delivered to the recipient. This flag should onlybe set if documents are sent externally, since internally the sendprocess is carried out synchronously. However, the message is onlysupported by a few mail systems, such as X.400 and SAP SAP.
                                                                                                                                                                                                                                                  • SAP_BODY

                                                                                                                                                                                                                                                  • If this flag is set ('X'), the SAP-specific date was also sent in anexternal bodypart when the document was sent via X.400. However, thisshould only be done if the target system is an SAP System.
                                                                                                                                                                                                                                                    • 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.
                                                                                                                                                                                                                                                              • SEND_DATE

                                                                                                                                                                                                                                                              • Date of send operation.
                                                                                                                                                                                                                                                                • SEND_TIME

                                                                                                                                                                                                                                                                • Time of send operation.
                                                                                                                                                                                                                                                                  • READ

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

                                                                                                                                                                                                                                                                    • Date when 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 must still be acted upon.
                                                                                                                                                                                                                                                                            • REPLY_SENT

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

                                                                                                                                                                                                                                                                              • Status of the send operation. If a document is sent externally, it isspecified in this field whether it was carried out correctly or not.Some mail systems such as X.400 and SAP SAP also support receipt andread confirmations, which are managed via this field.
                                                                                                                                                                                                                                                                                The following values are possible:
                                                                                                                                                                                                                                                                                'W', 'w' : Waiting, document not yet sent
                                                                                                                                                                                                                                                                                'L' : Document sent, no confirmation requested
                                                                                                                                                                                                                                                                                'S' : Document sent, confirmation awaited
                                                                                                                                                                                                                                                                                'R', 'D' : Receipt confirmation, send operation successful
                                                                                                                                                                                                                                                                                'V', 'C' : Read confirmation, document read by recipient
                                                                                                                                                                                                                                                                                'E' : Send error, document not sent
                                                                                                                                                                                                                                                                                'F' : Send error, document not received

                                                                                                                                                                                                                                                                                Exceptions
                                                                                                                                                                                                                                                                                DOCUMENT_ID_NOT_EXIST
                                                                                                                                                                                                                                                                                The specified document does not exist. An incorrect ID was probablypassed or the document involved deleted.
                                                                                                                                                                                                                                                                                OPERATION_NO_AUTHORIZATION
                                                                                                                                                                                                                                                                                The specified document could not be read. This may be because it isanother user's private document or because it is a document in a sharedfolder for which the active user does not have an access authorization.Only the SAPoffice administrator can access documents in the sharedtrash.
                                                                                                                                                                                                                                                                                X_ERROR
                                                                                                                                                                                                                                                                                An internal error or database inconsistency occurred.

                                                                                                                                                                                                                                                                                Example
                                                                                                                                                                                                                                                                                Read the first document including the relevant transmissioninformation and recipient list from the inbox of the active user. Todetermine the ID of the inbox, the function module SO_USER_READ_API1 isused, the documents in the inbox are determined via the function moduleSO_USER_READ_API1.
                                                                                                                                                                                                                                                                                DATA: FOL_CONT LIKE SOFOLENTI1 OCCURS 20 WITH HEADER LINE.
                                                                                                                                                                                                                                                                                DATA: OBJHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
                                                                                                                                                                                                                                                                                DATA: OBJCONT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
                                                                                                                                                                                                                                                                                DATA: OBJPARA LIKE SOPARAI1 OCCURS 0 WITH HEADER LINE.
                                                                                                                                                                                                                                                                                DATA: OBJPARB LIKE SOPARBI1 OCCURS 0 WITH HEADER LINE.
                                                                                                                                                                                                                                                                                DATA: ATTLIST LIKE SOATTLSTI1 OCCURS 1 WITH HEADER LINE.
                                                                                                                                                                                                                                                                                DATA: RECLIST LIKE SORECLSTI1 OCCURS 5 WITH HEADER LINE.
                                                                                                                                                                                                                                                                                DATA: FILTER LIKE SOFILTERI1.
                                                                                                                                                                                                                                                                                DATA: DOC_DATA LIKE SOFOLENTI1.
                                                                                                                                                                                                                                                                                DATA: USER_DATA LIKE SOUDATAI1.
                                                                                                                                                                                                                                                                                DATA: ENTRIES LIKE SY-TABIX.
                                                                                                                                                                                                                                                                                CALL FUNCTION 'SO_USER_READ_API1'
                                                                                                                                                                                                                                                                                IMPORTING
                                                                                                                                                                                                                                                                                USER_DATA = USER_DATA
                                                                                                                                                                                                                                                                                EXCEPTIONS
                                                                                                                                                                                                                                                                                OTHERS = 1.
                                                                                                                                                                                                                                                                                IF SY-SUBRC <> 0.
                                                                                                                                                                                                                                                                                WRITE: / 'User data could not be read !'.
                                                                                                                                                                                                                                                                                EXIT.
                                                                                                                                                                                                                                                                                ENDIF.
                                                                                                                                                                                                                                                                                CALL FUNCTION 'SO_FOLDER_READ_API1'
                                                                                                                                                                                                                                                                                EXPORTING
                                                                                                                                                                                                                                                                                FOLDER_ID = USER_DATA-INBOXFOL
                                                                                                                                                                                                                                                                                TABLES
                                                                                                                                                                                                                                                                                FOLDER_CONTENT = FOL_CONT
                                                                                                                                                                                                                                                                                EXCEPTIONS
                                                                                                                                                                                                                                                                                OTHERS = 1.
                                                                                                                                                                                                                                                                                IF SY-SUBRC <> 0.
                                                                                                                                                                                                                                                                                WRITE: / 'Inbox could not be read !'.
                                                                                                                                                                                                                                                                                EXIT.
                                                                                                                                                                                                                                                                                ENDIF.
                                                                                                                                                                                                                                                                                READ TABLE FOL_CONT INDEX 1.
                                                                                                                                                                                                                                                                                IF SY-SUBRC <> 0.
                                                                                                                                                                                                                                                                                WRITE: / 'No documents in inbox !'.
                                                                                                                                                                                                                                                                                EXIT.
                                                                                                                                                                                                                                                                                ENDIF.
                                                                                                                                                                                                                                                                                FILTER-SEND_INFO = 'X'.
                                                                                                                                                                                                                                                                                FILTER-REC_LIST = 'X'.
                                                                                                                                                                                                                                                                                CALL FUNCTION 'SO_DOCUMENT_READ_API1'
                                                                                                                                                                                                                                                                                EXPORTING
                                                                                                                                                                                                                                                                                DOCUMENT_ID = FOL_CONT-DOC_ID
                                                                                                                                                                                                                                                                                FILTER = FILTER
                                                                                                                                                                                                                                                                                IMPORTING
                                                                                                                                                                                                                                                                                DOCUMENT_DATA = DOC_DATA
                                                                                                                                                                                                                                                                                TABLES
                                                                                                                                                                                                                                                                                OBJECT_HEADER = OBJHEAD
                                                                                                                                                                                                                                                                                OBJECT_CONTENT = OBJCONT
                                                                                                                                                                                                                                                                                OBJECT_PARA = OBJPARA
                                                                                                                                                                                                                                                                                OBJECT_PARB = OBJPARB
                                                                                                                                                                                                                                                                                ATTACHMENT_LIST = ATTLIST
                                                                                                                                                                                                                                                                                RECEIVER_LIST = RECLIST
                                                                                                                                                                                                                                                                                EXCEPTIONS
                                                                                                                                                                                                                                                                                OTHERS = 1.
                                                                                                                                                                                                                                                                                IF SY-SUBRC <> 0.
                                                                                                                                                                                                                                                                                WRITE: / 'Error reading document !'.
                                                                                                                                                                                                                                                                                EXIT.
                                                                                                                                                                                                                                                                                ENDIF.
                                                                                                                                                                                                                                                                                WRITE: / 'Document', DOC_DATA-OBJ_DESCR, ':'.
                                                                                                                                                                                                                                                                                DESCRIBE TABLE OBJHEAD LINES ENTRIES.
                                                                                                                                                                                                                                                                                WRITE: / 'Lines in OBJHEAD :', ENTRIES.
                                                                                                                                                                                                                                                                                DESCRIBE TABLE OBJCONT LINES ENTRIES.
                                                                                                                                                                                                                                                                                WRITE: / 'Lines in OBJCONT :', ENTRIES.
                                                                                                                                                                                                                                                                                DESCRIBE TABLE OBJPARA LINES ENTRIES.
                                                                                                                                                                                                                                                                                WRITE: / 'Lines in OBJPARA :', ENTRIES.
                                                                                                                                                                                                                                                                                DESCRIBE TABLE OBJPARB LINES ENTRIES.
                                                                                                                                                                                                                                                                                WRITE: / 'Lines in OBJPARB :', ENTRIES.
                                                                                                                                                                                                                                                                                DESCRIBE TABLE ATTLIST LINES ENTRIES.
                                                                                                                                                                                                                                                                                WRITE: / 'Lines in ATTLIST :', ENTRIES.
                                                                                                                                                                                                                                                                                DESCRIBE TABLE RECLIST LINES ENTRIES.
                                                                                                                                                                                                                                                                                WRITE: / 'Lines in RECLIST :', ENTRIES.

                                                                                                                                                                                                                                                                                Notes
                                                                                                                                                                                                                                                                                To read folders and distribution lists, the function modulesSO_FOLDER_READ_API1 or SO_DLI_READ_API1 must be used.
                                                                                                                                                                                                                                                                                The parameter FILTER was incorporated in the function module interfacefor performance reasons. Selecting the contents of extensive documentsand reading large recipient lists is very time-consuming, by settingthe filter according to the data required it is possible to improve theruntime considerably.

                                                                                                                                                                                                                                                                                Further information
                                                                                                                                                                                                                                                                                Information on calling the function modules SO_USER_READ_API1 andSO_FOLDER_READ_API1 can be found in the documentation of the respectivefunction modules.

927407Determining the content of GOS and SAPoffice documents