Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Communication error when calling web service for checkin and checkout files

Hello,

I am trying to checkout and also to checkin files within the DMS via web service. The files are stored in the VAULT (=TRESOR) without the data server parth and DVA computer.

For checkout:

    • Original zum Ändern auschecken

CALL FUNCTION 'BAPI_DOCUMENT_CHECKOUTMODIFY2'

EXPORTING

documenttype = pi_documenttype

documentnumber = pi_documentnumber

documentpart = pi_documentpart

documentversion = pi_documentversion

documentfile = lf_documentfiles

pf_http_dest = ''

pf_ftp_dest = ''

  • statusextern = lf_status

IMPORTING

return = lf_return

checkedoutfile = ls_checkedoutfile.

and for checkin:

    • Dokument einchecken

CALL FUNCTION 'BAPI_DOCUMENT_CHECKIN2'

EXPORTING

documenttype = pi_documenttype

documentnumber = pi_documentnumber

documentpart = pi_documentpart

documentversion = pi_documentversion

hostname = ''

statusintern = ''

  • statusextern = lf_status

statuslog = ''

IMPORTING

return = lf_return

TABLES

documentfiles = lt_files.

But it is not working cause I always get a 'communication error' from the function CV120_FTP_START_REG_SERVER when calling one of these BAPIs via web service:

IF pf_check_gui = 'X'.

CLEAR: gf_gui_exist,

gf_gui_checked.

CALL FUNCTION 'RFC_PING'

DESTINATION 'SAPGUI'

EXCEPTIONS: communication_failure = 1 MESSAGE lf_msg_text

system_failure = 2 MESSAGE lf_msg_text.

IF sy-subrc = 0.

gf_gui_exist = 'X'.

ELSE.

CLEAR gf_gui_exist.

ENDIF.

gf_gui_checked = 'X'.

ENDIF.

Afterwards the following function is called where I got the error 'Program no longer started via RFC. No return possible.':

  • ----------------------------------------------------------------------

    • -> Vault with DVA -> ** Start FTP on the client

  • ----------------------------------------------------------------------

CALL FUNCTION 'SYSTEM_START_REG_SERVER'

EXPORTING: progname = 'sapftp'

startmode = '' " X

exclusiv = 'Y'

waittime = 500

startcomp = 'C' " G=gui, C=RFC

startpara = ' '

IMPORTING: err_code = lf_errno

err_mess = lf_error_msg

destination = pfx_destination.

Regards

Jens

Former Member
Not what you were looking for? View more on this topic or Ask a question