用delphi连接SAP RFC登录函数,提示Connect to SAP gateway failed,怎么办?

APS老兵 2004-11-26 08:35:54
用delphi连接SAP RFC登录函数,提示Connect to SAP gateway failed,怎么办?
...全文
1412 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
Reaky 2005-04-09
  • 打赏
  • 举报
回复
var
SAPrfc,Connection2,funct,table_d:variant;
begin
SAPrfc := CreateOleObject('sap.functions');
Connection2 := sapRfc.Connection;
Connection2.ApplicationServer:=’10.161.1.1’;
Connection2.System := ‘00’;
Connection2.Client :=’802’;
Connection2.User := ‘test’; //User Name
Connection2.Password := ‘test’; //password
Connection2.Language := ‘en’;
if Connection2.LogOn(0,true) = true then
begin
funct := saprfc.Add('ZRFC_WLBG_0001');//Assign RFC Name
funct.exports('ZVKORG'):=’wlb0’;//input parameters
funct.exports('ZAUDAT_F'):=’04/01/2005’;//input parameters
funct.exports('ZAUDAT_T'):=’04/05/2005’;//input parameters
funct.Call; //Call RFC
Table_d:= funct.tables.item('IT_OUT');//output parameters
for i:=1 to Table_d.rows.count do
begin
memo1.lines.add(Table_d.value(i,3)); //抓取返回表中的第3个字段的值
end for
KK4 2004-12-23
  • 打赏
  • 举报
回复
具体连接SAP,调用RFC的代码贴上
山书生 2004-12-03
  • 打赏
  • 举报
回复
up。。。
……
wyy1001 2004-11-27
  • 打赏
  • 举报
回复
up!
是不是要用到SDK

2,691

社区成员

发帖
与我相关
我的任务
社区描述
企业开发 ERP/CRM
社区管理员
  • ERP/CRM社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧