SAP Function SO_DLI_UPDATE_API1 - SAPoffice: Change distribution list using RFC

Parameter Reference Type Length Default Optional Text
DLI_ID SOFOLDATI1-OBJECT_ID C 17 SPACE X ID of distribution list to be changed
DLI_NAME SOFOLDATI1-OBJ_NAME C 12 SPACE X Name of distribution list to be changed
DLI_UPDATE_DATA SODLICHGI1 u 95 New attributes of DLI to be changed

Parameter Reference Type Length Text
DLI_INFO SODLIDATI1 u 395 Complete attributes after change

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

Exception Text
DLI_NOT_EXIST Specified distribution list does not exist
ENQUEUE_ERROR Required locks could not be set
OPERATION_NO_AUTHORIZATION No authorization to change distribution list
PARAMETER_ERROR Invalid combination of parameter values
X_ERROR Internal error or database inconsistency

Functionality
This function module allows an existing distribution list to bechanged.

Import parameters
DLI_NAME
Default = ' '.
Name of the distribution list to be changed. The name is unique for theshared folders or for each set of private folders. If the name and theID of the distribution list are passed, the name is used fordetermination.
DLI_ID
Default = ' '.
Object ID of the distribution list to be changed. If the name and theID of the distribution list are passed, the name is used fordetermination.
DLI_UPDATE_DATA
This structure must contain the attributes of the distribution list tobe changed.

  • OBJ_NAME

  • Name of the distribution list. The name must be unique for the sharedfolders or the private area of each user.
    • OBJ_DESCR

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

      • Language of the distribution list.
        • OBJ_SORT

        • Sort field of the distribution list. This term can be searched for inthe attribute search.
          • 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 the 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.
                  • PRIORITY

                  • This field is not used.
                    • EXPIRY_DAT

                    • 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 must also be set.
                        • SHARED_DLI

                        • If this flag is set ('X'), the distribution list is a shareddistribution list. This flag cannot be used to convert a privatedistribution list into a shared distribution list or vice versa sinceit is used to find the distribution list which is to be changed.

                          Export parameters
                          DLI_INFO
                          This structure contains the attributes of the changed distributionlist.

                          • OBJECT_ID

                          • Object ID of the distribution list.
                            • OBJ_TYPE

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

                              • Name of the distribution list.
                                • OBJ_DESCR

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

                                  • Language of the 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 the 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 the 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 therefore 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 must contain the entries of the distribution list to becreated. If entries which already exist in the distribution list
                                                                                                  are not passed when the function module is called, they are lost.

                                                                                                  • 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.
                                                                                                        ' ' : 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 specified distribution list does not exist. An incorrect ID wasprobably passed or the relevant distribution list was deleted.
                                                                                                            OPERATION_NO_AUTHORIZATION
                                                                                                            It was not possible to change the distribution list. This may bebecause the distribution list is the private distribution list ofanother user or because it is a shared distribution list for which theactive user does not have a change authorization.
                                                                                                            PARAMETER_ERROR
                                                                                                            An invalid combination of parameter values was passed to the functionmodule. The reason for this may be that neither the name nor the ID ofthe distribution list to be changed was specified or a field of thestructure was filled incorrectly with the new attributes of thedistribution list.
                                                                                                            X_ERROR
                                                                                                            An internal error or a database inconsistency occurred.
                                                                                                            ENQUEUE_ERROR
                                                                                                            The distribution list or folder in which it is located could not belocked. It is probably being processed by another user.

                                                                                                            Example
                                                                                                            Removing certain names from a subscription list. To read thesubscription list, the function module SO_DLI_READ_API1 is used.
                                                                                                            DATA: TAB_ENTRIES LIKE SODLIENTI1 OCCURS 100 WITH HEADER LINE.
                                                                                                            DATA: DLI_CHNG LIKE SODLICHGI1.
                                                                                                            DATA: DLI_DATA LIKE SODLIDATI1.
                                                                                                            CALL FUNCTION 'SO_DLI_READ_API1'
                                                                                                            EXPORTING
                                                                                                            DLI_NAME = 'RUMOURS'
                                                                                                            SHARED_DLI = 'X'
                                                                                                            IMPORTING
                                                                                                            DLI_DATA = DLI_DATA
                                                                                                            TABLES
                                                                                                            DLI_ENTRIES = TAB_ENTRIES
                                                                                                            EXCEPTIONS
                                                                                                            OTHERS = 1.
                                                                                                            IF SY-SUBRC <> 0.
                                                                                                            WRITE: / 'Distribution list could not be read !'.
                                                                                                            EXIT.
                                                                                                            ENDIF.
                                                                                                            LOOP AT TAB_ENTRIES.
                                                                                                            IF TAB_ENTRIES-FULL_NAME = 'Gill Green'
                                                                                                            OR TAB_ENTRIES-FULL_NAME = 'Nicholas Norman'.
                                                                                                            DELETE TAB_ENTRIES.
                                                                                                            ENDIF.
                                                                                                            ENDLOOP.
                                                                                                            MOVE-CORRESPONDING DLI_DATA TO DLI_CHNG.
                                                                                                            CALL FUNCTION 'SO_DLI_UPDATE_API1'
                                                                                                            EXPORTING
                                                                                                            DLI_ID = DLI_DATA-OBJECT_ID
                                                                                                            DLI_UPDATE_DATA = DLI_CHNG
                                                                                                            TABLES
                                                                                                            DLI_ENTRIES = TAB_ENTRIES
                                                                                                            EXCEPTIONS
                                                                                                            OPERATION_NO_AUTHORIZATION = 2
                                                                                                            ENQUEUE_ERROR = 5
                                                                                                            OTHERS = 99.
                                                                                                            CASE SY-SUBRC.
                                                                                                            WHEN 0.
                                                                                                            WRITE: / 'Distribution list was changed !'.
                                                                                                            WHEN 2.
                                                                                                            WRITE: / 'No authorization to change distribution list !'.
                                                                                                            WHEN 5.
                                                                                                            WRITE: / 'Distribution list is being edited !'.
                                                                                                            WHEN OTHERS.
                                                                                                            WRITE: / 'Unknown error occurred !'.
                                                                                                            ENDCASE.

                                                                                                            Notes
                                                                                                            To change folders or documents, the function modulesSO_FOLDER_UPDATE_API1 or SO_DOCUMENT_UPDATE_API1 must be used.

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