Functionality Downloads the document to the desktop in local files In most cases, a document consists of a single file. If there is morethan one file, you can use the function moduleSRM_DOCUMENT_GET_COMP_INFO to determine the components of the document. Example DATA: objectid TYPE bapisrmdoc-guid, documentclass TYPE bapisrmdoc-docclass, wa_file TYPE bapidocfiles, lt_file TYPE TABLE OF bapidocfiles. wa_comp TYPE bapidoccomp, lt_comp TYPE TABLE of lt_comp. ... wa_file-comp_id = 'my.txt'. wa_file-directory = 'c:\temp\'. wa_file-filename = 'my.txt'. append wa_file to lt_file. ********************************************************************** * if document has more than one file CALL FUNCTION 'SRM_DOCUMENT_GET_COMP_INFO' EXPORTING objectid = objectid documentclass = documentclass TABLES component_info = lt_comp . LOOP AT lt_comp INTO wa_comp. ,,wa_file-comp_id = wa_comp-comp_id. wa_file-directory = 'c:\temp'. wa_file-filename = wa_comp-comp_id. APPEND wa_file to lt_file. ENDLOOP. ********************************************************** CALL FUNCTION 'SRM_DOCUMENT_CHECKOUT_VIA_FILE' EXPORTING objectid = objectid documentclass = documentclass * IMPORTING * return = return TABLES file_tab = lt_file . * |