I am trying to get a document from SAP DMS using SAP .NET Connector 3.0. I need to get the document and display in ASP.Net.
I am using BAPI_DOCUMENT_CHECKOUTVIEW2
for calling the function. But when the invoke method is called, "RFC callback server not available" error is thrown.
The code I have used is below.
...
sap.RfcRepository repo = prd.Repository;
sap.IRfcFunction testBapi = repo.CreateFunction("BAPI_DOCUMENT_CHECKOUTVIEW2");
testBapi.SetValue("DOCUMENTNUMBER", docNumber);
testBapi.SetValue("DOCUMENTPART", docPart);
testBapi.SetValue("DOCUMENTVERSION", docVersion);
testBapi.SetValue("DOCUMENTTYPE", docType);
...
the document file is created here using BAPI_DOCUMENT_GETDETAIL2
...
testBapi.SetValue("DOCUMENTFILE", struFile);
testBapi.SetValue("GETSTRUCTURE", "1");
testBapi.SetValue("GETHEADER", "X");
testBapi.SetValue("ORIGINALPATH", @"D:\");
testBapi.SetValue("PF_FTP_DEST", "SAPFTPA");
long result = RfcAllowStartProgram("sapftp; saphttp");
testBapi.Invoke(prd);
Thanks in advance
Do you have more information on which RFC server connection is failing? If you know which connection is the problem, you can ask a SAP Basis/ABAP person to log on to the SAP server & check the RFC destinations in transaction SM59.
EDIT: Also check the authorizations of the .NET user.