Functionality This function module enables you to delete all locks set by the APImodules. You call this module after processing of the affected objectsis completed or a COMMIT WORK has been issued. Example Changing the name of a personal distribution list and then deleting theset locks. For reading and changing the distribution list, functionmodules SO_DLI_READ_API1 and SO_DLI_UPDATE_API1 are used. REPORT RSSONAME. PARAMETERS: OLD_NAME LIKE SODLICHGI1-OBJ_NAME. PARAMETERS: NEW_NAME LIKE SODLICHGI1-OBJ_NAME. DATA: RESULT LIKE SONV-RCODE. PERFORM CHANGE_DLI_NAME USING OLD_NAME NEW_NAME RCODE. IF RCODE = 0. COMMIT WORK. ELSE. ROLLBACK WORK. ENDIF. CALL FUNCTION 'SO_OFFICE_DEQUEUE_API1'. FORM CHANGE_DLI_NAME USING VALUE(OLD_NAME) VALUE(NEW_NAME) RCODE. DATA: TAB_ENTRIES LIKE SODLIENTI1 OCCURS 100 WITH HEADER LINE. DATA: DLI_CHNG LIKE SODLICHGI1. DATA: DLI_DATA LIKE SODLIDATI1. RCODE = 0. CALL FUNCTION 'SO_DLI_READ_API1' EXPORTING DLI_NAME = OLD_NAME IMPORTING DLI_DATA = DLI_DATA TABLES DLI_ENTRIES = TAB_ENTRIES EXCEPTIONS OTHERS = 1. IF SY-SUBRC <> 0. RCODE = SY-SUBRC. WRITE: / 'Error while reading distribution list', OLD_NAME, '!'. EXIT. ENDIF. MOVE-CORRESPONDING DLI_DATA TO DLI_CHNG. DLI_CHNG-OBJ_NAME = NEW_NAME. CALL FUNCTION 'SO_DLI_UPDATE_API1' EXPORTING DLI_ID = DLI_DATA-OBJECT_ID DLI_UPDATE_DATA = DLI_CHNG TABLES DLI_ENTRIES = TAB_ENTRIES EXCEPTIONS OTHERS = 1. IF SY-SUBRC <> 0. RCODE = SY-SUBRC. WRITE: / 'Error while changing distribution list', OLD_NAME, '!'. EXIT. ENDIF. ENDFORM. Further information For more information about calling function modules SO_DLI_READ_API1 andSO_DLI_UPDATE_API1, see the documentation of the corresponding functionmodules. |