SAP Function SO_USER_READ_API1 - SAPoffice: View SAPoffice user data using RFC

Parameter Reference Type Length Default Optional Text
PREPARE_FOR_FOLDER_ACCESS SONV-FLAG C 1 SPACE X Flag: Daily initialization of user
USER SOUDNAMEI1 u 77 SPACE X Structure with name or ID of user

Parameter Reference Type Length Text
USER_DATA SOUDATAI1 u 468 User data

Exception Text
PARAMETER_ERROR Invalid combination of parameter values
USER_NOT_EXIST Specified ID or user name does not exist
X_ERROR Internal error or database inconsistency

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

  • various administration information (e.g. user name, creator, date of
  • last access, address number)
    • Office authorizations of the user

    • entries on an automatic reply

    • the IDs of the individual root folders of the user

    • When the function module is called, it is also possible to specifywhether the Office of the respective user should be initialized for theday. If so, the trash is emptied and the relevant resubmissions placedin the inbox.

      Import parameters
      PREPARE_FOR_FOLDER_ACCESS
      Default = SPACE.
      If this flag is set ('X'), initialization is carried out as well asreading the user data.
      USER
      Default = SPACE.
      This structure can be provided with an entry identifying the user to beread. Only one of the fields USERID, SAPNAME and OFFICENAME can befilled. If a value is not entered, data of the active user is read.

      • USERID

      • SAPoffice ID of the user.
        • SAPNAME

        • SAP name of the user. The SAP name is used when logging onto thesystem.
          • OFFICENAME

          • SAPoffice name of the user. The SAPoffice name is unique client-wide.
            • FULLNAME

            • This field is not used.
              • DELETED

              • This field is not used.

                Export parameters
                USER_DATA
                This structure contains all read data of a user.

                • USERID

                • SAPoffice ID of the user.
                  • SAPNAME

                  • SAP name of the user. The SAP name is used when logging onto thesystem.
                    • OFFICENAME

                    • SAPoffice name of the user. The SAPoffice name is unique client-wide.
                      • FULLNAME

                      • Full name of the user from the address management.
                        • DELETED

                        • If this flag is set ('X'), it is a deleted user.
                          • CREATOR_ID

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

                            • SAPoffice name of the creator of the user. The SAPoffice name is uniqueclient-wide.
                              • CREAT_FNAM

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

                                • Date user was created.
                                  • CREAT_TIME

                                  • Time user was created.
                                    • CHANGER_ID

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

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

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

                                          • Date of last change.
                                            • CHANG_TIME

                                            • Time of last change.
                                              • LOADAT

                                              • Date of last access of user to SAPoffice.
                                                • VLADAT

                                                • Date of penultimate access of user to SAPoffice.
                                                  • LASDAT

                                                  • Date of last access by a substitute of the user to SAPoffice.
                                                    • ADDRESS_NO

                                                    • Address number of the user in the address management.
                                                      • AREPOBJECT

                                                      • Object ID of the automatic reply. If an automatic reply has not beendefined, this field is initial.
                                                        • AREPABDAT

                                                        • Start date of the automatic reply. If an automatic reply has not beendefined, this field is initial.
                                                          • AREPAEDAT

                                                          • End date of the automatic reply. If an automatic reply has not beendefined, this field is initial.
                                                            • OBJECT_TYP

                                                            • Preset document type when creating a document.
                                                              • OUTBOX_FLG

                                                              • Default setting for the checkbox "Copy document to outbox" used on thescreen.
                                                                • SECU_INFO

                                                                • If this flag is set ('X'), a confirmation prompt is displayed whendocuments are deleted.
                                                                  • VIEW

                                                                  • This field is not used.
                                                                    • RSWORKDAY

                                                                    • If this flag is set ('X'), documents are only resubmitted on workdays.
                                                                      • RSFACID

                                                                      • ID of the factory calendar used for the resubmission.
                                                                        • CR_CL_FOL

                                                                        • If this flag is set ('X'), the user is authorized to create clientfolders.
                                                                          • CR_GRP_FOL

                                                                          • If this flag is set ('X'), the user is authorized to create groupfolders.
                                                                            • REC_MAX

                                                                            • Maximum number of internal recipients per send operation.
                                                                              • EXT_TELE

                                                                              • If this flag is set ('X'), the user is authorized to send faxes.
                                                                                • EXT_SMTP

                                                                                • If this flag is set ('X'), the user is authorized to send documents viaInternet.
                                                                                  • EXT_X400

                                                                                  • If this flag is set ('X'), the user is authorized to send documents viaX.400.
                                                                                    • EXT_SAP

                                                                                    • If this flag is set ('X'), the user is authorized to send documents toanother SAP System.
                                                                                      • INBOXFOL

                                                                                      • Object ID of the folder for the inbox.
                                                                                        • OUTBOXFOL

                                                                                        • Object ID of the folder for the outbox.
                                                                                          • WASTEFOL

                                                                                          • Object ID of the folder for the trash.
                                                                                            • PRIVATFOL

                                                                                            • Object ID of the root folder of the private folders.
                                                                                              • RESUBFOL

                                                                                              • Object ID of the folder for documents to be resubmitted.
                                                                                                • DARKFOL

                                                                                                • Object ID of the dark folder. It cannot be displayed by the user and isused to store the automatic reply, for example.
                                                                                                  • SHAREDFOL

                                                                                                  • Object ID of the root folder of the shared folders.

                                                                                                    Exceptions
                                                                                                    USER_NOT_EXIST
                                                                                                    The specified user does not exist. An incorrect value was probablyentered in the structure which was passed.
                                                                                                    PARAMETER_ERROR
                                                                                                    An invalid combination of parameter values was passed to the functionmodule.
                                                                                                    X_ERROR
                                                                                                    An internal error or database inconsistency occurred.

                                                                                                    Example
                                                                                                    Reading the data of a specified user without daily initialization ofOffice. If successful, the date of the last access is output.
                                                                                                    PARAMETERS: SAPNAME LIKE SY-UNAME.
                                                                                                    DATA: USER LIKE SOUDNAMEI1.
                                                                                                    DATA: USER_DATA LIKE SOUDATAI1.
                                                                                                    USER-SAPNAME = SAPNAME.
                                                                                                    CALL FUNCTION 'SO_USER_READ_API1'
                                                                                                    EXPORTING
                                                                                                    USER = USER
                                                                                                    IMPORTING
                                                                                                    USER_DATA = USER_DATA
                                                                                                    EXCEPTIONS
                                                                                                    USER_NOT_EXIST = 1
                                                                                                    OTHERS = 99.
                                                                                                    CASE SY-SUBRC.
                                                                                                    WHEN 0.
                                                                                                    WRITE: / 'The user', SAPNAME, 'was last in Office on',
                                                                                                    USER_DATA-LOADAT, '!'.
                                                                                                    WHEN 1.
                                                                                                    WRITE: / 'The user', SAPNAME, 'does not exist !'.
                                                                                                    WHEN OTHERS.
                                                                                                    WRITE: / 'Unknown error occurred !'.
                                                                                                    ENDCASE.