Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Urgent Regarding DMS

Hi experts,

I am new to DMS and I want to create a Web Dynpro application for uploading/downloading GIF files into DMS. Is their any standard FM to upload/download documents to DMS. Please give some detailed steps in it.

With Regards,

R K

Please Help...

Former Member
Former Member replied

Sample program

*************************************

**define required variables

*************************************

    • document key

DATA: lf_doctype LIKE bapi_doc_draw-documenttype,

lf_docnumber LIKE bapi_doc_draw-documentnumber,

lf_docpart LIKE bapi_doc_draw-documentpart,

lf_docversion LIKE bapi_doc_draw-documentversion,

lf_pathname LIKE bapi_doc_draw-docfile1.

DATA: ls_return LIKE bapiret2.

**.... checked out originals

DATA: lt_files LIKE bapi_doc_files2 OCCURS 0 WITH HEADER LINE.

DATA: ls_documentfile LIKE bapi_doc_files2.

********************************************

    • allocate document data

******************************************

lf_docnumber = 'DOCUMENTNUMBER'.

lf_doctype = 'DRW'.

lf_docversion = '00'.

lf_docpart = '000'.

    • define path where to store the original

lf_pathname = 'F:\Test\'.

*clear internal table

REFRESH lt_files.

CLEAR lt_files.

**********************************

**call BAPI

**********************************

CALL FUNCTION 'BAPI_DOCUMENT_CHECKOUTVIEW2'

EXPORTING: documenttype = lf_doctype

documentnumber = lf_docnumber

documentpart = lf_docpart

documentversion = lf_docversion

documentfile = ls_documentfile

getstructure = '0'

originalpath = lf_pathname

hostname = ' '

IMPORTING: return = ls_return

TABLES: documentfiles = lt_files.

    • errors occured?

IF ls_return-type CA 'EA'.

ROLLBACK WORK.

MESSAGE ID '26' TYPE 'I' NUMBER '000'

WITH ls_return-message.

ELSE.

COMMIT WORK.

ENDIF.

let me know if this helped

ciao

Aravinda

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question