您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 信息化管理 > 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============
本文标题:sap开发者指导之十四
链接地址:https://www.777doc.com/doc-15221 .html