‎2008 Mar 20 9:56 AM
hi
i want to connect vb system and sap system.can any1 help me?
‎2008 Mar 20 10:02 AM
Hi,
You can access function modules of SAP from VB application by using RFC, BAPI and Webservices in SAP. So based on your requirement, check out relevant function modules in SAP and call them from VB.
Reward points if helpful.
Regards,
CS.
‎2008 Mar 20 10:11 AM
Hi
Using BAPIS u statrt communicating with vb or java --etc.
For example,
U want tot connect vb .U need to use the component
SAP.BAPI.1 Component.
U design a form in vb,
Declarations:
Public obj As Object
Public boOrder As Object
Public oHeader As Object
Public oHeaderde As Object
Public oHeaderup As Object
Public oHeaderin As Object
Public conn As Object
Public ovalues As Object
Public oReturn As Object
Public x As String
In form load event:
Private Sub Form_Load()
On Error GoTo err1
Form_Timer
Set obj = CreateObject("SAP.BAPI.1")
Set conn = obj.connection
conn.logon
Set boOrder = obj.GetSAPObject("ZBAPISTUD(bapiname)")
Set oHeader = obj.dimas(boOrder, "ZbapiSearch(bapi method name)", "STUD") 'searching the record
Set oHeaderde = obj.dimas(boOrder, "DeleteStud", "STUD") 'deleting the record
Set oHeaderup = obj.dimas(boOrder, "ZbapiUpdate", "STUD") 'updating the record
Set oHeaderin = obj.dimas(boOrder, "CREATESTUD", "STUD") 'inserting the record
Exit Sub
err1:
MsgBox Err.Description
DoCmd.Close
End Sub
Every bapi is must a remote enabled fm. Every bapi method linked with a rfc fm.
If it is helpful rewards points
Regards
Pratap.M