最新评论
雨天晴 2012-06-04 16:31
Sorry 請問一下,我目前碰到的系統是64bit的,這個是32bit,我可以到哪裡找64 bit的版本呢?謝謝您的協助。還有您SAP相關文章讓我獲益良多,感激。
梦心 2012-06-04 08:46
@Allen_Chen
或者,你可以把RfcDestinationManager.UnregisterDestinationConfiguration(ID); 放在IDestinationConfiguration ID = new MyBackendConfig(); 的前面!!!!
try!
劲草 2012-05-30 15:11
很好,请教下这个兄弟,这种加载图片的方法加载GIF 图片不能动画效果,比如QQ 表情 笑脸表情,加载进来就变成静态的了,怎样才能实现加载GIF 表情也能动起来呢
suyu1983_8 2012-05-29 16:03
请问博主,系统会弹出IE浏览器浏览WSDL,需要提供账密,这一步我老是做不成功,是怎么回事那?弹出:http://omtestdb:8001/sap/bc/srt/rfc/sap/ZWEB_ZFPDMS?sap-client=200&wsdl=1.1,无法访问,谢谢,期待你的回复
Allen_Chen 2012-05-29 15:36
楼主,如果需要操作SAP里面的数据多次,那应该怎么做呢?
比如说,我把很多的数据查出来显示在DataGrid上面,现在我选中的数据进行删除,那么第二次执行的时候就会报错了。
是不是需要重新再写一个NCO的方法出来,我另外写了一个方法,提示:destination configuration already initialized。
使用反注册貌似也不行,好像是第一次用完了之后没有关掉一些东西。
public void DeleteByUserID()
{
IDestinationConfiguration ID = new MyBackendConfig();
RfcDestinationManager.RegisterDestinationConfiguration(ID);
RfcDestination prd = RfcDestinationManager.GetDestination("AAA");
DeleteByUserID(prd);
RfcDestinationManager.UnregisterDestinationConfiguration(ID);
}
Allen_Chen 2012-05-24 12:00
[quote]梦心:
@Allen_Chen
一看就是服务器不存在。。IP地址有误[/quote]
楼主您好,这个IP地址就是我们SAP的服务器地址啊,我通过这个IP地址可以连接上SAP,但是 RfcRepository repo = prd.Repository;这一句话就会提示下面的异常:Destination 192.168.0.21 was removed. Check the destination configuration.
——————————————————————————————下面这段代码就是可以连上SAP的,但是我按照您的方法却提示了上面那个错误,麻烦帮手分析一下啊,谢谢:
[code=csharp]
private void button3_Click(object sender, EventArgs e)
{
//实例化一个SAPControl类的实例。
SAPLogonCtrl.SAPLogonControlClass Login = new SAPLogonCtrl.SAPLogonControlClass();
//指定连接SAP的各项参数。
Login.User = this.txtUser.Text.Trim();
Login.Password = this.txtUserPwd.Text.Trim();
Login.Client = this.txtClient.Text.Trim();
Login.Language = this.txtLanguage.Text.Trim().ToUpper();
Login.ApplicationServer = "192.168.0.21";
Login.SystemNumber = Convert.ToInt32(this.txtSystemNumber.Text.Trim());
//New一个连接对象去连接SAP
SAPLogonCtrl.Connection Conn = (SAPLogonCtrl.Connection)Login.NewConnection();
//调用Login方法检测是否可以正确登录。
if (Conn.Logon(null, true))
{
MessageBox.Show("连接SAP成功", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
Conn.Logoff();
}
else
{
MessageBox.Show("连接SAP失败", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
[/code]
厚道~厚道 2012-05-23 11:45
解决了~
使用vs2010 我们创建一个项目,添加对上面四个dll文件的引用,实际上只有三个是可以引用成功的,libicudecnumber.dll的引用会失败,注意在这里,你看上去是引用成功的,其实你后面的程序是不能运行的。这个需要你在程序属性中做一些小修改才可以:修改“项目属性”-“应用程序”-“目标框架” ,由“.NET Framework 4 Client Profile”修改为“.NET Framework 4”,最后引用 .NET 4.0 的 System.Web.dll 。只有这样sapnco.dll才可以被正常引用;否则就会提示:“SAP.Middleware.Connector.RfcConfigParameters”的类型初始值设定项引发异常。
厚道~厚道 2012-05-23 10:52
哥哥们, 小弟研究C#不深
VS2010 新建个WIN FORM
引用
using SAP.Middleware.Connector;
Public void nco()
{
IDestinationConfiguration ID = new MyBackendConfig();
}
提示 type or namespace could not be found(are you missing a using )
该怎么解决呢...上面已经引用了 sap.middle那个
Allen_Chen 2012-05-22 17:18
楼主您好,
RfcRepository repo = prd.Repository;
执行这一句话的时候提示以下错误,
Destination 192.168.0.21 was removed. Check the destination configuration.
能否帮手分析一下,感谢!
Allen_Chen 2012-05-22 15:48
哪位朋友能告知一下 if ("PRD_000".Equals(destinationName))这里面的“PRD_000”指的到底是什么?
Allen_Chen 2012-05-20 08:08
if ("PRD_000".Equals(destinationName))
楼主,请问 一下这个"PRD_000"指的是什么?