Functionality This function module allows documents to be resubmitted. An appropriatefolder entry is created in the folder for resubmissions. The originalfolder entry is deleted if it was located in the inbox. At the time ofthe resubmission, the folder entry is placed in the inbox of the user. 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 for which a resubmission is to be created. TheID is the connection between the document and the folder in which it islocated. RESUBMISSION_DATE Date on which the resubmission is to take place. If the date is earlierthan or the same as the current date, the resubmission takes placeimmediately. Exceptions DOCUMENT_NOT_EXIST The specified folder entry or one of the objects connected to the ID(folder, document, or forwarder) does not exist. An incorrect ID wasprobably passed or one of the components involved has been deleted. OPERATION_NO_AUTHORIZATION A resubmission could not be created for the folder entry. This may bebecause the folder entry is located in another user's private area. Itis also not possible to create resubmissions for documents in theshared folders. PARAMETER_ERROR An invalid combination of parameter values was passed to the functionmodule. Folders and distribution lists cannot be resubmitted. X_ERROR An internal error or a database inconsistency occurred. ENQUEUE_ERROR The folder entry or the folder in which it is located could not belocked. It is probably being processed by another user. Example A resubmission is created for the first document in the inbox of theactive user for the coming week. To determine the ID of the inbox, thefunction module SO_USER_READ_API1 is used, and the function moduleSO_FOLDER_READ_API1 to read the contents of the inbox. DATA: FOL_CONT LIKE SOFOLENTI1 OCCURS 20 WITH HEADER LINE. DATA: USER_DATA LIKE SOUDATAI1. DATA: RESUB_DATE LIKE SY-DATUM. 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 = 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. RESUB_DATE = SY-DATUM + 7. CALL FUNCTION 'SO_DOCUMENT_RESUBMIT_API1' EXPORTING DOCUMENT_ID = FOL_CONT-DOC_ID RESUBMISSION_DATE = RESUB_DATE EXCEPTIONS OTHERS = 1. IF SY-SUBRC <> 0. WRITE: / 'A resubmission for', FOL_CONT-OBJ_DESCR, 'could not be created !'. ELSE. WRITE: / 'The resubmission for', FOL_CONT-OBJ_DESCR, 'was created !'. ENDIF. Further information Information on calling the function module SO_USER_READ_API1 andSO_FOLDER_READ_API1 can be found in the documentation of the respectivefunction modules. |