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