cancel
Showing results for 
Search instead for 
Did you mean: 

Using PHIO_ID to retrieve documents (as per SOFFCONT1/BDSCONT1)

Former Member
0 Kudos

Hi all

I'm trying to find out what exactly the documents are that are stored in SOFFCONT1/BDS_CONT1 and that which we'd move using report RSIRPIRL (basically we have a Content Server but we've not been using it, and all the SAP Office / Business Documents Services attachments have been saved to the DB, so the tables are huge).

In short, I need to use the PHIO_ID reference ID (returned from these tables/the RSIRPIRL report) to 'see' or 'retrieve' these files so we can check exactly what they are (and whether it's safe for us to move with RSIRPIRL from the DB to a Content Server).

How do I get these docs??

I've stumbled across the following tables - SOFFPHF & BDS_PHF (BDSPHF*), and SOFF_PHIO & BDS_PHIO, and I can put the PHIO_ID reference ID in to see the filename and size etc but there's still not a lot of info; it would be good to be able to actually display the file/find out more info.

In searching I keep coming across DMS_KPRO_READ; but I don't think the input for that is PHIO_ID - what is it, and how do I obtain the relevant key?

Thanks

Ross

(SAP Basis/Tech Architect - not Functional)

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

The answer:

Use function module SCMS_DOC_READ_FILES.

This works, allowing you to download a file to your local hard disk, by referencing with a 'Doc number' - just use the PHIO_ID, and entering BDS_DB as the Storage Category (for docs at DB level in BDS_CONT1).

I'm able to download and open files that were saved at DB level; run report RSIRPIRL to move them to a Content Repository (and see this works as the entry disappears from table BDS_CONT1) and confirm they are still retrievable by using SCMS_DOC_READ_FILES and the new storage category.

Answers (1)

Answers (1)

SSB
Advisor
Advisor
0 Kudos

Dear

You can use FM 'SDOK_PHIOS_GET_COPY' to download contents in a local file.

Fill the COMPONENTS table with PHIO class LOIO Class and Local path.

Regards

S S B

Former Member
0 Kudos

Many thanks for that... however, no matter which PHIO_ID I try (and I've tried quite a few now) there's no file downloaded, and the BAD_OBJECTS table ends up being populated with ER number 03. Does that mean the file is missing?

Former Member
0 Kudos

I found some notes that suggest error code 3 is:

missing_directory:,,,,no target directory specified


I'd entered c:\docs\doc1.pdf which is completely valid; I've tried some other combinations and also just a directory name or just a filename - always the same result. Any ideas?

SSB
Advisor
Advisor
0 Kudos

Dear

Can you please confirm if you are passing following ?

Class = PHIO CLass

Objid  = phio Id

Directory = c:\docs\

and execute ?

Former Member
0 Kudos

The only input I am entering is in COMPONENTS and the 3 inputs are:

Class = BDS_POC1

Objid = 52EDCAB16BA908D0E10080000AE8080E

File_name = c:\docs\doc1.pdf

I have also tried file_name with:

c:\docs

c:\

c:\DOCS

doc1.pdf

c:\docs\doc1

doc1

c:/docs/doc1.pdf

etc

c:\docs exists.

I also tried the SAP default download location, no luck!

I've tried entering a non-existent objid too to check the FMis functioning correctly; it seems to be, as I then got error code 1 instead.

I've also tried this on 3 other SAP instances.

Any suggestions?

SSB
Advisor
Advisor
0 Kudos

Dear

Can you confirm This document is accessible ? You can set a BP at above mentioned FM and get the correct values and then try with same values,

Regards

S S B

Former Member
0 Kudos

Hi

I've tried with lots of documents; those present in table BDS_CONT1 and those reported by RSIRPIRL. I believe they ARE there - like I said, I deliberately entered a non-existing one to see what would happen and I got error code 1.

So I'm quite sure the document is available - it just doesn't like ANY directory/filename I put in! Are there any rules/trestrictions to the file name I choose?

What do you mean by BP - break point? I'm not an ABAPer/Functional, I'm a Basis guy so not sure how to do that...

Thanks


Ross