Skip to Content

FILE_ID is not updating in FM - BAPI_DOCUMENT_GETDETAIL2

Hi,

My requirement is to fetch the DMS pdf attached file.

I have attached pdf document in CV01N and stored it through vault. But, when I use BAPI_DOCUMENT_GETDETAIL2 function module to fetch the attached file details in DOCUMENTFILES table, DOCUMENTFILES-FILE_ID field is not getting updated.

CALL FUNCTION 'BAPI_DOCUMENT_GETDETAIL2'
EXPORTING
documenttype = 'ZCS'
documentnumber = 'DATASHEET5'
documentpart = '000'
documentversion = '00'
getcomponents = 'X'
getactivefiles = 'X'
getdocdescriptions = 'X'
getdocfiles = 'X'
IMPORTING
documentdata = documentdata
return = return
TABLES
documentdescriptions = documentdescriptions
documentfiles = documentfiles
characteristicvalues = characteristicvalues
classallocations = classallocations.

Please suggest.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 28, 2018 at 06:51 PM

    DOCUMENTFILES is an internal table, not a structure. Use DOCUMENTFILES[ 1 ]-FILE_ID, not DOCUMENTFILES-FILE_ID.

    PS: header lines are obsolete.

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 11 at 02:35 PM

    Hi,

    I had a similar Problem. The FM did not return the description of the document and did not return the fileID's.

    In my case it was an authorization Problem. I'd say your case sounds very similar.. Try out with a fully-authorized user and look if it works

    Add comment
    10|10000 characters needed characters exceeded