cancel
Showing results for 
Search instead for 
Did you mean: 

DMS - need to check out originals using BSP

Former Member
0 Kudos

Hi,

I am trying to check out DMS originals through a BSP application. For this purpose, I use the function module '‘BAPI_DOCUMENT_CHECKOUTVIEW2’'. When this FM is used in a SAP GUI report program, the originals are checked out into the TEMP directory. But when the same FM is used in a BSP application, the FM fails with the exception 'Document Program not started via RFC. No return possible'.

Alternatively, I tried using the method 'checkoutview' (in the class 'cl_incl_doc_files'). The method executes without any error, but it does not check out the originals. The original is not available in the 'TEMP' directory. Will this method check out originals to the 'TEMP' directory?? If so, is there any specific thing that needs to be set? Have anyone tried using this?

My requirement is that the originals need to be downloaded to the local machine.

Any help is highly appreciated.

Regards,

Vidhya.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Use following function module parameters

PF_HTTP_DEST = 'SAPHTTPA'

PF_FTP_DEST = 'SAPFTPA'

Former Member
0 Kudos

Dear Pranav,

Thanks for your immediate response. But, the method 'cl_incl_doc_files->checkoutview' already calls the function module 'CVAPI_DOC_CHECKOUTVIEW' by using the same parameters.

pf_ftp_dest = 'SAPFTPA'

pf_http_dest = 'SAPHTTPA'

Still the originals are not checked out.

Please help.

Regards,

Vidhya.

Former Member
0 Kudos

Check that RFC destinations are specified properly in your system.

Go to SM59 -> TCP/IP connections -> SAPHTTPA

On the first Tab Page (Technical Settings), make sure that radio button 'Start on Application Server' is selected for Activation Type and Test Connection is successful.

Do the same for SAPFTPA.

Thanks,

Pranav

Former Member
0 Kudos

Dear Pranav,

I checked these settings. They are already maintained in SM59. Still it is not working out. I tested the connection also and it is fine. What else could be the reason??

I am also trying an alternate method. I am first downloading the contents of the file (in binary format) into an internal table using the function module 'SDOK_PHIO_LOAD_CONTENT'. Then, by calling the function module 'GUI_DOWNLOAD', I try to download it as a PDF file. Again, when I try this in a report program, it is successful .When the function 'GUI_DOWNLOAD' (or the method 'cl_gui_frontend_services=>gui_download') is called from a BSP application, it throws the exception 'CONTROL_FLUSH_ERROR'. Is it because through BSP application we cannot download to the local machine?? Is there any other way to achieve this?? I tried all possible ways. In no method, I get full solution.

This is urgent. Highly appreciate your help.

Regards,

Vidhya.