using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
//using System.Linq;
using System.Text;
using System.Windows.Forms;
using SAP.Middleware.Connector;
namespace WindowsFormsApplication7
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
//rfc配置
RfcConfigParameters argsP = new RfcConfigParameters();
argsP.Add(RfcConfigParameters.Name, "QS7");
argsP.Add(RfcConfigParameters.AppServerHost, "10.5.91.131");
argsP.Add(RfcConfigParameters.SystemNumber, "00");
// argsP.Add(RfcConfigParameters.SystemID, "QS7");
argsP.Add(RfcConfigParameters.User, "ATPSUSER");
argsP.Add(RfcConfigParameters.Password, "q123456");
argsP.Add(RfcConfigParameters.Client, "800");
argsP.Add(RfcConfigParameters.Language, "zh");
argsP.Add(RfcConfigParameters.PoolSize, "5");
argsP.Add(RfcConfigParameters.MaxPoolSize, "10");
argsP.Add(RfcConfigParameters.IdleTimeout, "60");
//获取rfc配置
RfcDestination sapConfig = RfcDestinationManager.GetDestination(argsP); //NCO3.0如果framework不是2.0此处会报错,跟系统64还32无关
RfcRepository rfcRepository = sapConfig.Repository;
//调用
IRfcFunction invoke = rfcRepository.CreateFunction("SE11_FUNC"); //调用函数名 ZRFC_MARA_INFO
invoke.Invoke(sapConfig); //执行函数
invoke.SetValue("PSPID", ""); //设置参数 项目编号
IRfcTable rfcTable = invoke.GetTable("ZIMPSTXS00330"); //获取内表
string message = rfcTable.GetValue("MESSAGE").ToString();
MessageBox.Show(message);
}
}
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有