The Scan to SAP solution can be. Note that files named Scanfile1.pdf should be changes to your DMS/GOS. For uploading, choose Upload File and use the standard.
As we can upload images in SAP using transaction SE78 or SO10 we can also upload files in SAP as Excel Files, Doc Files or PDF. In this Blog Post I will show you how to upload files into SAP System and how to use them in Custom programs. Uploading files into SAP are used as templates for XLS files as example if you are developing a mass upload program.

In general you need to provide to the user a template xls file to fill and upload to the system.In place of saving a template file in the server folder you can just create a button in the selection-screen and when the user click on the button he will get the Excel file. The transactions used to create document, change document and display document are CV01N, CV02N and CV03N. Create Document In Order to Upload a document go to Transaction CV01N. Click Enter and Save your document.
Change Document To Change the document you need to use transaction CV02N Display Document To display the document you can use transaction CV03N How to use Documents in Custom Programs I created a custom program to create, update and read documents. Selection-Screen Source Code REPORT ZRIMABASSI MESSAGE-ID ZF.- Data Declaration TABLES: DRAW.
DATA: BEGIN OF ITAB OCCURS 0, WERKS LIKE MARC-WERKS, MATNR LIKE MARC-MATNR, VKTRW LIKE MARC-VKTRW, END OF ITAB. DATA: WDOCUMENTNUMBER LIKE BAPIDOCAUX-DOCNUMBER, WDOCUMENTNUMBERIN LIKE BAPIDOCAUX-DOCNUMBER, WDOCUMENTTYPE LIKE BAPIDOCAUX-DOCTYPE, WDOCUMENTPART LIKE BAPIDOCAUX-DOCPART, WDOCUMENTVERSION LIKE BAPIDOCAUX-DOCVERSION, WRETURN LIKE BAPIRET2, WDOCUMENTDATA LIKE BAPIDOCDRAW2, WDOCUMENTDATAX LIKE BAPIDOCDRAWX2. DATA: WAREFDOCUMENTTYPE LIKE BAPIDOCAUX-DOCTYPE, WAREFDOCUMENTNUMBER LIKE BAPIDOCAUX-DOCNUMBER, WAREFDOCUMENTPART LIKE BAPIDOCAUX-DOCPART, WAREFDOCUMENTVERSION LIKE BAPIDOCAUX-DOCVERSION, WANEWDOCUMENTVERSION LIKE BAPIDOCAUX-DOCVERSION, WADOCVERSION LIKE BAPIDOCAUX-DOCVERSION. DATA: TOBJECTLINKS LIKE BAPIDOCDRAD OCCURS 0 WITH HEADER LINE, TDOCUMENTDESCR LIKE BAPIDOCDRAT OCCURS 0 WITH HEADER LINE, TLONGTEXTS LIKE BAPIDOCTEXT OCCURS 0 WITH HEADER LINE, TSTATUSLOG LIKE BAPIDOCDRAP OCCURS 0 WITH HEADER LINE, TCOMPONENTS LIKE BAPIDOCCOMP OCCURS 0 WITH HEADER LINE, TCLASSALLOC LIKE BAPICLASSALLOCATION OCCURS 0 WITH HEADER LINE, TDOCUMENTFILES LIKE BAPIDOCFILES2 OCCURS 0 WITH HEADER LINE, TDOCUMENTSTRUCT LIKE BAPIDOCSTRUCTURE OCCURS 0 WITH HEADER LINE, TCHARVALUES LIKE BAPICHARACTERISTICVALUES OCCURS 0 WITH HEADER LINE. DATA: VFILE TYPE STRING.- Selection-screen SELECTION-SCREEN: BEGIN OF BLOCK A1 WITH FRAME TITLE TEXT-001. PARAMETERS: PDOKNR LIKE DRAW-DOKNR, PDOKAR LIKE DRAW-DOKAR, PDOKTL LIKE DRAW-DOKTL, PDOKVR LIKE DRAW-DOKVR.
PARAMETERS: RCRE RADIOBUTTON GROUP G1 USER-COMMAND AC DEFAULT 'X', RMOD RADIOBUTTON GROUP G1, RDIS RADIOBUTTON GROUP G1. SELECTION-SCREEN: END OF BLOCK A1. SELECTION-SCREEN: BEGIN OF BLOCK A2 WITH FRAME TITLE TEXT-002. PARAMETERS: PFILE TYPE STRING. SELECTION-SCREEN: END OF BLOCK A2.- AT SELECTION-SCREEN ON VALUE-REQUEST AT SELECTION-SCREEN ON VALUE-REQUEST FOR PFILE. PERFORM FILEF4 CHANGING PFILE.- Start-of-selection START-OF-SELECTION.- Create a Document IF RCRE IS NOT INITIAL.
PERFORM CREATEDOCUMENT.- Change Document IF RMOD IS NOT INITIAL. PERFORM CHANGEDOCUMENT.- Read Document and download them into a folder IF RDIS IS NOT INITIAL. PERFORM DISPLAYDOCUMENT. PERFORM DOWNLOADDOCUMENT.&-.& Form CREATEDOCUMENT.&-. text.-.
p1 text. DIRECTORYBROWSE EXPORTING WINDOWTITLE = LVTITLE INITIALFOLDER = LVPATH CHANGING SELECTEDFOLDER = LVPATH EXCEPTIONS CNTLERROR = 1 ERRORNOGUI = 2 NOTSUPPORTEDBYGUI = 3 OTHERS = 4. IF SY-SUBRC 0. MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. PFILE = LVPATH.
' FILEF4.&-.& Form CHANGEDOCUMENT.&-. text.-. p1 text.

p1 text. p1 text. 0. ' DOWNLOADDOCUMENT.