Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

DMS Document read Problem

former_member207480
Participant
0 Likes
2,338

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

4 REPLIES 4
Read only

Former Member
0 Likes
1,528

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

Read only

shadab_maldar
Active Participant
0 Likes
1,528

Hi Amol,

Try with this BAPI,    'BAPI_DOCUMENT_CHECKOUTVIEW2'

Regards,

Shadab Maldar.

Read only

Former Member
0 Likes
1,528

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

Read only

0 Likes
1,528

Hi Amol,

If you want the Object Links of a DMS document you have to use the function module

: 'BAPI_DOCUMENT_CHECKOUTVIEW2'

Regards,

Swaroop