cancel
Showing results for 
Search instead for 
Did you mean: 

Where are the documents stored

joerg_arndt
Participant
0 Kudos

Hi Friends,

when I run report DMS_KPRO_READ no files are found.

But when I look in document Info record I have a file attached.

Where can I find this file.

I have tried several FM's and Bapi but I was not able to retrieve the file content.

When I use SCMS_DOC_READ the field STOR_CAT has to be provided, but in DIR it is SAP-System.

How can I figure out where the document is stored or is stored al all.

Any help would be very apreciated.

Thanks and regards Joerg

Accepted Solutions (1)

Accepted Solutions (1)

christoph_hopf
Advisor
Advisor
0 Kudos

Hi,

if the report DMS_KPRO_READ doesn't find a file or return any data for a document info record this means the file is not maybe not stored in the content server but maybe in some other storage type like archive, vault or SAP-SYSTEM.

You can check this by going to transaction DC10 and viewing the details for the used document type. Here you will find a flag 'use KPRO' which has to be set if you want to store files in the content server.

What storage category do you see in transaction CV03N and is the lock icon closed?

Best regards,

Christoph

joerg_arndt
Participant
0 Kudos

Hi Christoph,

found out in DC10 it is not using kpro, is it better to use?

The storage category is sap-system (but this is not recognised in any way by FM or bapi) and the lock icon is closed or not, both the same.

I will try to using the kpro wether it brings better results.

Thanks and rg. joerg

christoph_hopf
Advisor
Advisor
0 Kudos

Hi Jörg,

generally I would recommend you to use the KPRO storage logic because it offer several advantages regarding storage and administration.

In case you are storing files in SAP-SYSTEM category at the moment, the file should be stored in table DRAO currently. You can do selects on this table in SE16. Please note that in this scenario the file is split up into packages of 2550 Bytes. So there might be several table entries for one original file if the file size is bigger.

Best regards,

Christoph

joerg_arndt
Participant
0 Kudos

Thanks Christoph,

thats great. I was searching for the table that keeps the doc data 'drao', now I know it.

Rg. Joerg

Answers (1)

Answers (1)

former_member585060
Active Contributor
0 Kudos

Hi,

    What exactly is your requirment?

Do you want to know the Content server where the attached documents for a DIR are stored? or you want to download the attachments attached to a DIR?

Do check the Content server details, you check in transaction 'OACT',  for DMS(Just see the entries in Display mode as the transaction will open in Change mode).

If you want to download a attachment from a DIR, You have to use the Bapis in sequence.

1) First use BAPI_DOCUMENT_GETDETAIL2, to get the document details, use the table DOCUMENTFILES details to select the file to be downloaded.

2) If you want to download only selected file read the file from the table DOCUMENTFILES got from above bapi, if you want to download all the files, just loop the above table and pass it bapi BAPI_DOCUMENT_CHECKOUTVIEW2.

Sample code


  CALL FUNCTION 'BAPI_DOCUMENT_CHECKOUTVIEW2'
    EXPORTING
      documenttype              = v_dokar
      documentnumber            = v_doknr
      documentpart              = v_doktl
      documentversion           = v_dokvr
      documentfile              = p_ls_file              " Pass the values of DOCUMENTFILES entry to this
*   GETSTRUCTURE              = '1'
*   GETCOMPONENTS             = 'X'
      originalpath              = 'C:\Test\'
*   HOSTNAME                  = ' '
*   GETHEADER                 = 'X'
*   DOCBOMCHANGENUMBER        =
*   DOCBOMVALIDFROM           =
*   DOCBOMREVISIONLEVEL       =
*   PF_HTTP_DEST              = ' '
*   PF_FTP_DEST               = ' '
   IMPORTING
     return                    = ls_return
* TABLES
*   DOCUMENTSTRUCTURE         =
*   DOCUMENTFILES             =
*   COMPONENTS                = .
            .

The selected document will be downloaded to the C:\Test\Folder with the file name.

Note :- If DOCUMENTFILE-DELETEVALUE is set to 'X' then it will delete the original file attached to the Document, so make sure of that. if we pass the value returned from the BAPI_DOCUMENT_GETDETAIL2, then it will not have that issue.

Thanks & Regards

Bala Krishna

joerg_arndt
Participant
0 Kudos

Hi Bala,

I tried the procedure above but no success. I could not retrieve the content.

But could get the content with bapi or FM ....checkoutdialog or similar.

Thanks and Rg. Joerg