SAP Function SO_DLI_READ_API1 - SAPoffice: View distribution list using RFC

Parameter Reference Type Length Default Optional Text
DLI_ID SOOBJINFI1-OBJECT_ID C 17 SPACE X ID of distribution list to be viewed
DLI_NAME SOOBJINFI1-OBJ_NAME C 12 SPACE X Unique name of distribution list to be viewed
SHARED_DLI SONV-FLAG C 1 SPACE X Flag: Shared distribution list

Parameter Reference Type Length Text
DLI_DATA SODLIDATI1 u 395 Complete attributes of viewed DLI

Parameter Reference Length Optional Text
DLI_ENTRIES SODLIENTI1 1280 X Entries in distribution list

Exception Text
DLI_NOT_EXIST Specified distribution list does not exist
OPERATION_NO_AUTHORIZATION No authorization to view distribution list
PARAMETER_ERROR Invalid combination of parameter values
X_ERROR Internal error or database inconsistency

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

  • the attributes of the distribution list (e.g. name, description,
  • creator, date created, sensitivity, etc.)
    • the entries in the distribution list
    • Import parameters
      DLI_NAME
      Default = ' '
      Name of the distribution list. The name is unique for the sharedfolders or for each set of private folders. If both the name and ID ofthe distribution list are passed, the name is used for determination.
      DLI_ID
      Default = ' '
      Object ID of the distribution list. If both the name and ID of thedistribution list are passed, the name is used for determination.
      SHARED_DLI
      Default = ' '
      If this flag is set ('X'), the distribution list to be read is a shareddistribution list, otherwise it is assumed that it is a privatedistribution list.

      Export parameters
      DLI_DATA
      This structure contains the attributes of the distribution list read.

      • OBJECT_ID

      • Object ID of the distribution list.
        • OBJ_TYPE

        • Type of document ('DLI').
          • OBJ_NAME

          • Name of distribution list.
            • OBJ_DESCR

            • Title (short description) of the distribution list.
              • OBJ_LANGU

              • Language of distribution list.
                • OBJ_SORT

                • Sort field of the distribution list. This term can be searched for inthe attribute search.
                  • CREATOR_ID

                  • SAPoffice ID of the creator of the distribution list.
                    • CREAT_NAME

                    • SAPoffice name of the creator of the distribution list. The SAPofficename is unique client-wide.
                      • CREAT_FNAM

                      • Full name of the creator of the distribution list from the addressmanagement.
                        • CREAT_DATE

                        • Date distribution list was created.
                          • CREAT_TIME

                          • Time distribution list was created.
                            • CHANGER_ID

                            • SAPoffice ID of person who last changed the distribution list.
                              • CHANG_NAME

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

                                • Full name of the person who last changed the distribution list from theaddress management.
                                  • CHANG_DATE

                                  • Date of last change.
                                    • CHANG_TIME

                                    • Time of last change.
                                      • OWNER_ID

                                      • SAPoffice ID of the owner of the distribution list.
                                        • OWNER_NAM

                                        • SAPoffice name of the owner of the distribution list. The SAPofficename is unique client-wide.
                                          • OWNER_FNAM

                                          • Full name of the owner of the distribution list from the addressmanagement.
                                            • LAST_ACCES

                                            • Date distribution list was created/changed. Contains the latest of thetwo values.
                                              • OBJ_EXPDAT

                                              • This field is not used.
                                                • SENSITIVTY

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

                                                  • This field is not used.
                                                    • NO_CHANGE

                                                    • This field is not used.
                                                      • PROC_TYPE

                                                      • This field is not used.
                                                        • PROC_NAME

                                                        • This field is not used.
                                                          • PROC_SYST

                                                          • This field is not used.
                                                            • PROC_CLIENT

                                                            • This field is not used.
                                                              • SKIP_SCREEN

                                                              • This field is not used.
                                                                • TO_DO_OUT

                                                                • This field is not used.
                                                                  • FREE_DEL

                                                                  • This field is not used.
                                                                    • SUBSCRIPT

                                                                    • If this flag is set ('X'), the distribution list is a subscriptionlist. Since only shared distribution lists can be subscription lists,the flag SHARED_DLI is also set.
                                                                      • SIZE

                                                                      • Contains the number of entries in the distribution list.
                                                                        • SHARED_DLI

                                                                        • If this flag is set ('X'), the distribution list is a shareddistribution list.
                                                                          • PRIORITY

                                                                          • This field is not used.
                                                                            • EXPIRY_DAT

                                                                            • This field is not used.

                                                                              Table parameters
                                                                              DLI_ENTRIES
                                                                              This table contains the entries in the distribution list.

                                                                              • MEMBER_NAM

                                                                              • Unique name of the entry. Depending on the entry type, it may be theSAPoffice name of a user, the name of a private or shared distributionlist, or the name of the ID of an external address.
                                                                                • MEMBER_ID

                                                                                • ID of the entry.
                                                                                  • MEMBER_TYP

                                                                                  • Type of entry.
                                                                                    The following values are possible:
                                                                                    ' ' : Internal user
                                                                                    'P' : Private distribution list
                                                                                    'C' : Shared distribution list
                                                                                    'A' : External address
                                                                                    'U' : Internet address
                                                                                    'X' : X.400 address
                                                                                    'F' : Fax number
                                                                                    'R' : Remote SAP name
                                                                                    • FULL_NAME

                                                                                    • Descriptive name of the entry. If the entry is an internal user, therelevant name from the address management is used here. In the case ofexternal addresses, an exact description of the address is inserted.
                                                                                      • MEMBER_ADR

                                                                                      • If the entry is an external address, it is specified fully in thisfield.
                                                                                        The following address types are possible:
                                                                                        a fax number in the form of the structure SADRFD
                                                                                        an Internet address in the form of the structure SADRUD
                                                                                        an SAP remote address in the form of the structure SADR7D
                                                                                        an X.400 address in the form of the structure SADR8D
                                                                                        The meaning of the value entered here can be derived from the fieldMEMBER_TYP.

                                                                                        Exceptions
                                                                                        DLI_NOT_EXIST
                                                                                        The distribution list specified does not exist. An incorrect ID or namewas probably passed or the relevant distribution list deleted.
                                                                                        OPERATION_NO_AUTHORIZATION
                                                                                        The active user does not have authorization to read the requesteddistribution list. This may be because it is another user's privatedistribution list or because it is a distribution list in a sharedgroup folder for which the active user does not have an accessauthorization. Only the SAPoffice administrator can access distributionlists in the shared trash.
                                                                                        PARAMETER_ERROR
                                                                                        An invalid combination of parameter values was passed to the functionmodule. Probably neither the name nor the ID of the distribution listto be read was specified.
                                                                                        X_ERROR
                                                                                        An internal error or a database inconsistency occurred.

                                                                                        Example
                                                                                        Reading a subscription list and evaluating the entries contained in it.
                                                                                        DATA: TAB_ENTRIES LIKE SODLIENTI1 OCCURS 10 WITH HEADER LINE.
                                                                                        DATA: DLI_DATA LIKE SODLIDATI1.
                                                                                        DATA: DLI_NAME LIKE SOOBJINFI1-OBJ_NAME.
                                                                                        DLI_NAME = 'LECTURE 042'.
                                                                                        CALL FUNCTION 'SO_DLI_READ_API1'
                                                                                        EXPORTING
                                                                                        DLI_NAME = DLI_NAME
                                                                                        SHARED_DLI = 'X'
                                                                                        IMPORTING
                                                                                        DLI_DATA = DLI_DATA
                                                                                        TABLES
                                                                                        DLI_ENTRIES = TAB_ENTRIES
                                                                                        EXCEPTIONS
                                                                                        DLI_NOT_EXIST = 1
                                                                                        OPERATION_NO_AUTHORIZATION = 2.
                                                                                        CASE SY-SUBRC.
                                                                                        WHEN 1.
                                                                                        WRITE: / 'Subscription list', DLI_NAME, 'does not exist !'.
                                                                                        EXIT.
                                                                                        WHEN 2.
                                                                                        WRITE: / 'No authorization to read the subscription list',
                                                                                        DLI_NAME, '!'.
                                                                                        EXIT.
                                                                                        ENDCASE.
                                                                                        WRITE: / 'For the lecture "Growth of White Cabbage"',
                                                                                        DLI_DATA-SIZE, 'people',
                                                                                        'have subscribed up till now.'.
                                                                                        LOOP AT TAB_ENTRIES.
                                                                                        WRITE: / TAB_ENTRIES-FULL_NAME.
                                                                                        ENDLOOP.

                                                                                        Notes
                                                                                        The function modules SO_FOLDER_READ_API1 or SO_DOCUMENT_READ_API1 mustbe used to read folders or documents.