Hi Experts I have used the following code which gives error in the line If con.logon(0, False) True Then. whats the reason, can anyone explain and correct me. Regards Rajaram Private Sub Command1_Click() Set bapictrl = CreateObject("SAP.BAPI.1") Set con = bapictrl.Connection con.Client = "391" con.User = "sap01" con.password = "victory" con.Language = "EN" If con.logon(0, False) True Then MsgBox "No connection to R/3!" Exit Sub 'End program Else MsgBox "connection to R/3 Successful!" End If End Sub Private Sub Command2_Click() Dim x As String Set Obj = bapictrl.GetSAPObject("ZEMPLOYEE") Set Header = bapictrl.DimAs(Obj, "ZBAPIEMP", "EMPDB") Set sreturn = bapictrl.DimAs(Obj, "ZBAPIEMP", "Return") Header.Value("code") = TextBox1.Text Header.Value("name") = TextBox2.Text Header.Value("salary") = TextBox3.Text Obj.zbapiemp EMPDB:=Header, RETURN:=sreturn x = sreturn.Value("message") If x = "" Then MsgBox "Created Successfully........" Else MsgBox x End If End Sub Private Sub Command3_Click() End End Sub
Go Through the Follwing Code:
INCLUDE BAPI OBJECT FROM REFRENCES FIRST.
Dim functionCtrl As Object
Dim sapConnection As Object
Dim theFunc As Object
Private Sub Command1_Click()
Set functionCtrl = CreateObject("SAP.Functions")
Set sapConnection = functionCtrl.Connection
sapConnection.Client = "500"
sapConnection.user = "USERNAME"
sapConnection.password = "PASSWORD"
sapConnection.Language = "EN"
If sapConnection.logon(0, False) True Then
MsgBox "No connection to R/3 System"
Exit Sub 'End program
Set theFunc = functionCtrl.Add("BAPI_PO_CREATE")
Dim poheader As Object
Dim poitems As Object
Dim poitemschedule As Object
Dim retMess As Object
Dim returnFunc As Boolean
Dim startzeil As Integer
Dim endcol As Integer
Dim the_name As String
Set poheader = theFunc.exports.Item("PO_HEADER")
Set poitems = theFunc.tables.Item("PO_ITEMS")
Set poitemschedule = theFunc.tables.Item("PO_ITEM_SCHEDULES")
poheader.Value("VENDOR") = Text1.Text
poheader.Value("PURCH_ORG") = Text2.Text
poheader.Value("PUR_GROUP") = Text3.Text
poheader.Value("DOC_TYPE") = Text4.Text
poitems.Value(1, "PUR_MAT") = Text5.Text
poitems.Value(1, "PLANT") = Text6.Text
poitems.Value(1, "NET_PRICE") = Text7.Text
poitemschedule.Value(1, "DELIV_DATE") = Text8.Text
poitemschedule.Value(1, "QUANTITY") = Text9.Text
returnFunc = theFunc.call
PoNumber = theFunc.imports("PURCHASEORDER")
Set retMess = theFunc.tables.Item("RETURN")
If retMess Is Nothing Then
MsgBox retMess.Value(1, "MESSAGE")
MsgBox "Purchase Order No : " & PoNumber & "Created"
Hope it will solve your problem.
hi, I´ve a problem with ichat on my imac with 10.5.5. there is a communication error when video chat shoud start. my wife´s macbook with 10.5.5 an nearly the same software and configuration have no problems. her´s working fine with other people and I
I keep getting RFC Connection error installing the database instance. The following are the pertinent logs: INFO 2007-05-09 20:10:04 Working directory changed to C:\Program Files\sapinst_instdir\NW04\SYSTEM\ABAP\MSS\UC\DB. INFO 2007-05-09 20:10:04 O
Flash cS 5.5 / Win 7. Inserting video into movieclip both with 'import video' wizard and via component. FLV that plays fine on a number of different servers. On opening (after gathering metadata) the message 'The video player is in the connection err
This has probably been asked elsewhere so sorry in advance if it has!! Since leaving the house this morning (I use wifi at home) I've had "no network connection" even though I have full 3G signal! I've tried the hard reset & reset from the s
Hi, I deployed RPD to obiee 11g server and when I run a report it is giving database connectivity error. In 10g we just specify OLAP_DSN, OLAP_USER and same in connection pool with database password. I did the same in 11g as well but it's not working
I have been using Nokia mobiles for the last 10 years, usually with Orange, but now switched to O2. 1. Had the phone a week and when in conversation with someone the call just drops - done this a few times. The signal is still on maximum. Anyone had
Hi! I have the following error for the RFC connection: The RFC connection is setup as follows. /H/10.101.7.1/S/3299/H/10.151.6.194 10.101.7.1 = IP of our SAP Router 10.151.6.194 = IP of customer system The RFC connection is established: SAP Router (i
Hi, While using Crystal Reports in trying to build a report on the SAP Query in SAP/BW System using the MDX driver, I am able to get the structure of the query fields into the report but on the other hand while trying to refresh the report for data I
Okay, so I am currently running OS X Mountain Lion on a brand new Macbook Pro 15 inch (early 2013). I haven't had any problems so far. However, today I tried buying a $10 app in the app store, and when I put in my login credentials to validate the pu
Hello, I'm trying to scan a document to send to my email and I get the Server Connection Error message. I've tried several possible solutions that I saw online but nothing has worked. I've also added the Scan to Email app and it gives me the same m
Hi, Currently I am trying to connect to an Oracle 11g database via JDBC. However, everytime I run the code I get the following error: java.sql.SQLException: Closed Connection at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:
The main purpose is to handle the Network Connection Error, when there is a Network Connection Error or pc loss the connection (remove the ETH cable), and it work in IE but not with firefox. When there isn't connection during play of sound1, Flash ca
Ok the issue is that i tried to access my external harddrive over AFP with OS X LION and got a error message like this one above. I couldn't login with a registered user . We had the same problem in a earlier update but somehow got around it follwing
I've seen a couple of mentions of this issue on the forum but don't think I've seen a fix for it yet. I've just upgraded to an N70 (Vodafone Pay monthly through CPW) and have on several occasions now found that my phone appears to have dropped off th
Yesterday, after 2 months of normal usage, my E61i, settled on "dual mode", stopped to work. On the screen it appears instead of "3G" the symbol of an antenna (GSM connection) without the name of the operator. If I try to make a call i
Hi there, I updated my phone from the version 4.x firmware to the latest version of it which is v5.04.07. After updating my phone, i hoped that it would be problem free but it is not. After the update, the phone has got two new random problems which
I am trying to setup the eprint service to work on my printer. When I try to enable web-service on my printer, it returns an error message saying, there is no internet connection. I have updated the firmware as specified thru eprnt support, and stil
System Center 2012 DPM trying to connect to a SQL instance on a different server using Windows Authentication. Getting the unable to connect error "Unable to cnnect to xxx.domain.com (ID: 948) Verify that the DPM service is running on this computer&q
I do not get any audio with my iPhone 4 using the MLB.com at Bat 11 app. Whenever I go to the audio all I get is a connection error. I have sent emails to MLB.com at Bat 11 4 times not and have not had a responce. Is there something I can do to remed