sap开发者指导之十四

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

SAP104AnBoShi@gmail.comBAPIBAPIBAPIsBusinessApplicationProgrammingInterfacesBAPIWindowsAPIAPIBCDelphiWindowsAPIBAPISAPbusinessobjectBAPISAPBAPIBAPIRFCBAPIC++JavaVBBAPIRFCBAPICRFCBAPIBAPIBAPI_USERBAPILockUnlockBAPI_USER_LOCKBAPI_USER_UNLOCKSAP105AnBoShi@gmail.comBAPISAPVBAKVBAPSAPSAPBAPISalesOrderCreateFromDat1BAPIBAPISAPBAPISalesOrderSalesDocumentBAPIChangeFromDataBAPIBAPI_SALESORDER_CHANGESAP106AnBoShi@gmail.comAlphabeticalBAPIBAPIVB1SAPDevelopmentToolsSAPGUISAP107AnBoShi@gmail.comOCXLogonControlWdtlog.ocxwdtlogu.ocxSAP.LogonControl.1RFCControlWdtfuncs.ocxwdtfuncu.ocxSap.FunctionsBAPIControlWdobapi.ocxwdobapiu.ocxSAP.BAPI.1OCX2BAPIDimo_BAPICtrlAsObjectSeto_BAPICtrl=CreateObject(SAP.BAPI.1)‘VBSAPBAPIControlForm3SAPSAPBAPIControlo_BAPICtrl.Connection.ApplicationServer=ServerIPo_BAPICtrl.Connection.SystemNumber=systemnumberoBAPICtrl.Connection.Client=clientoBAPICtrl.Connection.User=usernameoBAPICtrl.Connection.Language=language...oBAPICtrl.Connection.Logon(0,FALSE)LogonTrueSAPLogonControlBAPISetoLogonCtrl=CreateObject(SAP.LogonControl.1)‘oLogonCtrlLogonSAP108AnBoShi@gmail.comSetoBAPICtrl.Connection=oLogonControl.Connection4SAPoBAPICtrl.GetSAPObject(StringObjectType,VariantObjectKey1,...,VariantObjectKey10)ObjectTypeObjectKeyiSetbo_User=o_BAPICtrl.GetSAPObject(USER,“AD000”)USERUSERNAMEAD000ObjectTypeBAPIExplore5BAPIBAPIDimAsDimAsObject.DimAs(ObjectBusinessObject,StringMethod,StringParameter)USERBAPIAddFaxSetoAddFax=oBAPICtrl.DimAs(boUser,Create,AddFax)oAddFax.Rows.AddoAddFax.Value(1,COUNTRY)=CNSAP109AnBoShi@gmail.comoAddFax.Value(1,FAX)=02012345678CompanySetoCompany=oBAPICtrl.DimAs(boUser,Create,Company)boUser.Value(Company)=BP01CreateboUser.CreateAddFax:=oAddFax,…6SAPoBAPICtrl.Connection.LogoffSetsapConnection=Nothing7SetoBAPICtrl=NothingVBBAPIBAPIFormLabel1LabelUserNametxt_UserNameTextBoxcmd_connectCommandButtonConnecttoSAPcmd_disconnectCommandButtonDisconnecttoSAPcmd_LockCommandButtonLockUsercmd_UnlockCommandButtonUnlockUserSAP110AnBoShi@gmail.comDimo_BAPICtrlAsObjectPrivateSubcmd_Connect_Click()Seto_BAPICtrl=CreateObject(SAP.BAPI.1)o_BAPICtrl.Connection.ApplicationServer=192.168.0.200o_BAPICtrl.Connection.SystemNumber=00o_BAPICtrl.Connection.Client=700o_BAPICtrl.Connection.User=AD003o_BAPICtrl.Connection.Password=*****o_BAPICtrl.Connection.Language=ZHIfNoto_BAPICtrl.Connection.Logon(0,True)Then'MsgBoxNoaccesstoR/3System!,vbOKOnly+vbExclamation,AlertEndIfEndSubPrivateSubcmd_Lock_Click()Dimbo_UserAsObjectSetbo_User=o_BAPICtrl.GetSAPObject(USER,txt_UserName)bo_User.LockReturn:=lo_retFori_tmp=1Tolo_ret.rowcountMsgBoxlo_ret(i_tmp,MESSAGE)Nexti_tmpEndSubPrivateSubcmd_Unlock_Click()Dimbo_UserAsObjectSetbo_User=o_BAPICtrl.GetSAPObject(USER,txt_UserName)bo_User.UnLockReturn:=lo_retFori_tmp=1Tolo_ret.rowcountMsgBoxlo_ret(i_tmp,MESSAGE)Nexti_tmpEndSubPrivateSubcmd_disconnect_Click()o_BAPICtrl.Connection.LogoffSeto_BAPICtrl=NothingEndSubSAP111AnBoShi@gmail.comABAPBAPIABAPABAPBAPIBAPIBAPIBAPIExploerFunctionmoduleBAPI==================================================================SAP112AnBoShi@gmail.com==============================================================================20060712============

1 / 9
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功