使用SAP.Net连接器3.0调用BAPI_DOCUMENT_CHECKOUTVIEW2将返回“ RFC回调服务器不可用”。 [英] Calling BAPI_DOCUMENT_CHECKOUTVIEW2 using SAP.Net Connector 3.0 returns "RFC Callback server not available"

查看:201
本文介绍了使用SAP.Net连接器3.0调用BAPI_DOCUMENT_CHECKOUTVIEW2将返回“ RFC回调服务器不可用”。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用SAP.Net Connector 3.0从SAP DMS获取文档。我需要获取文档并将其显示在ASP.Net中。

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.

我正在使用 BAPI_DOCUMENT_CHECKOUTVIEW2来调用该函数。但是,当调用invoke方法时,将引发 RFC回调服务器不可用错误。

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.

我使用的代码如下。

...
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);

预先感谢

推荐答案

我不知道该BAPI,也没有手头的系统可以检查它,但是我认为在执行过程中,BAPI会尝试返回 GUI那应该在会议的另一端。当找不到GUI时,它就会死掉。如果您具有GUI访问和调试权限(和知识:-)),则可以尝试在途中找到CALL FUNCTION ... DESTINATION BACK语句。

I don't know this BAPI and I don't have a system at hand to check it, but I'd assume that somewhere during the execution, the BAPI tries to call "back" to the GUI that's supposed to be at the other end of the session. When it can't find a GUI, it dies. IF you have GUI access and debugging permissions (and knowledge :-)), you could try to find a CALL FUNCTION ... DESTINATION BACK statement on the way.

这篇关于使用SAP.Net连接器3.0调用BAPI_DOCUMENT_CHECKOUTVIEW2将返回“ RFC回调服务器不可用”。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆