欢迎来到天天文库
浏览记录
ID:34104802
大小:610.00 KB
页数:8页
时间:2019-03-03
《net连结sap环境设定与实作》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、Net連結SAP環境設定與實作1.開發環境之必要條件項目開發環境需求安裝原因1MicrosoftVisualStudio.NET2003SAP.NetConnector2.0只支援2003版本2SAP.NetConnector2.0此版本只支援.Netframework1.X3JavaRuntimeEnvironment在.Net開發時讀取SAPFunction時使用4SAPLogonSAP開發元件開發環境之必要條件1.1安裝步驟1.1.1安裝SAPLogon1.1.2安裝MicrosoftVisualStudio.NET20031.1.3安裝
2、SAP.NetConnector2.0=>SAP.Net.Setup_2.0.msi1.1.4安裝JavaRuntimeEnvironment=>jdk-1_5_0-windows-i586.exe1.2安裝後應用程式畫面1.2.1SAPLogon1.2.2MicrosoftVisualStudio.NET20031.2.3SAP.NetConnector2.0=>C:ProgramFilesSAPSAP.NETConnector2.01.1.1JavaRuntimeEnvironment=>C:ProgramFilesJava2.S
3、APNetConnect原理2.1SAPNetConnect原理3.Net2003開發步驟在C:WINDOWS找到saplogon.ini,打開後把SysName和SrvPort下面的內容清空,不清空的話他會引導你去找SAP伺服器上的Messagingserver,總是告訴你無法打開或者無法找到sapmsg.ini的文件,非常麻煩。[MSSysName]Item1=[MSSrvPort]Item1=(如果機器上沒有Javaruntime environment 就會一直停留在Loading的畫面=.= )1.Net重要程式碼Form1.csp
4、rivatevoidForm1_Load(objectsender,System.EventArgse){stringxErrorInfo=null;SAPNewTableMethodmSAPNewTableMethod=newSAPNewTableMethod();this.dataGrid1.DataSource=mSAPNewTableMethod.Sd_Rfc_Customer_Get("TW20000600","",outxErrorInfo);//mSAPNewTableMethod.Rfc_Read_Table("EKKO",1,
5、1,outxErrorInfo);}SAPNewTableMethod.cs//////Sd_Rfc_Customer_Get//////查詢Kunnr編號///查詢mName名稱///DataTablepublicDataTableSd_Rfc_Customer_Get(stringmKunnr,stringmName,outstringmErrorInfo)
6、{#regionSd_Rfc_Customer_GetmErrorInfo=null;this.zGetDataTable=null;RFCCUSTTablexRFCCUSTTable=newRFCCUSTTable();try{if(this.zSAPConnectionInfo.SAPConnectionOpen(outmErrorInfo)){zProx.Connection=this.zSAPConnectionInfo.SAPConnection;zProx.Sd_Rfc_Customer_Get(mKunnr,mName,refxR
7、FCCUSTTable);this.zGetDataTable=xRFCCUSTTable.ToADODataTable();}}catch(Exceptionee){if(ee.Message.ToUpper().IndexOf("NO_RECORD_FOUND")>=0){returnnull;}else{mErrorInfo=ee.Message+ee.Source+ee.StackTrace;}}finally{xRFCCUSTTable=null;this.zSAPConnectionInfo.SAPConnectionClose(o
8、utmErrorInfo);}returnthis.zGetDataTable;#endregion}1.相關網路資源http://blog.sina
此文档下载收益归作者所有