‎2015 May 06 7:12 AM
Hi,
I have used the following function module to get the dms attachment data.
BAPI_DOCUMENT_GETDETAIL2
But, the FM is not reading the file data into DOCUMENTFILES.
Please suggest the same.
Regards
Amol Khochare
‎2015 May 06 8:17 AM
Hi,
I think this is depending on the document type. Table DOCUMENTFILES is empty for some document types and filled for other ones in our systems, when I call the fm in SE37 test mode.
Maybe this depends on field FILELEN in table TDWA (or another field of this table). In my case I get no data in DOCUMENTFILES, if the document type has a ZERO in DWA-FILELEN.
Regards,
Klaus
‎2015 May 06 9:01 AM
Hi Amol,
Try with this BAPI, 'BAPI_DOCUMENT_CHECKOUTVIEW2'
Regards,
Shadab Maldar.
‎2015 May 06 9:22 AM
Check that you are passing the right document data to the bapi when you are calling it
documenttype
documentnumber
documentpart
documentversion
If one of them is wrong you could be trying to find a non existing document, also check that you are exporting all the needed get attributes (for example getobjectlinks if you want to get the object links of the dms document). Those are the things that come to mind without seeing the code you are working with. If those were not the problem you can try posting the code you are calling the bapi with so i can be more specific with the answer.
CALL FUNCTION 'BAPI_DOCUMENT_GETDETAIL2'
EXPORTING
documenttype = lf_doctype
documentnumber = lf_docnumber
documentpart = lf_docpart
documentversion = lf_docversion
getobjectlinks = 'X'
getstatuslog = 'X'
getlongtexts = 'X'
getactivefiles = 'X'
getclassification = 'X'
IMPORTING
documentdata = ls_document
return = ls_return
TABLES
documentfiles = lt_files
characteristicvalues = lt_char.
** Did error occur ??
IF ls_return-type CA 'EA'.
MESSAGE ID '26' TYPE 'I' NUMBER '000'
WITH ls_return-message.
ENDIF.
This is how it should look, i added some gets to the call that i'm not using just as an example. Hope it helps.
Regards,
Noa
‎2015 May 06 11:29 AM
Hi Amol,
If you want the Object Links of a DMS document you have to use the function module
: 'BAPI_DOCUMENT_CHECKOUTVIEW2'
Regards,
Swaroop