cancel
Showing results for 
Search instead for 
Did you mean: 

needs a code example for calling RFC/BAPI from vb.net

Former Member
0 Kudos

i need to call to a method in sap (in BAPI or RFC).

please give me a code example and dll's required list.

thanx , zion.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi friends, i need to call the "OrderMaintain" method in the "MaintenanceOrderBAPI" BAPI. This i need to do it in order to create an Order via VB. Could anyone of you help me in this regard. Kindly send me the WORKING sample code and the list of dll's or ocx's to be included.

Regards Kranthi.

former_member445996
Participant
0 Kudos

Dim BAPI As New SAPProxy

Dim conStr As String = "ASHOST=server_name

SYSNR=system_number CLIENT=client_id USER=loginID

PASSWD=password”

BAPI = New SAPProxy(Constr)

Dim SAPtbl As New Name_of_the_table_in_BAPI

Try

BAPI.BAPI_NAME(Parameter1, Parameter2,….) --> This is how you would call the BAPI

Catch ex As Exception

MsgBox(ex.Message)

End Try

Note: SAPProxy is the name of the SAPWSDL file where you drag and drop your BAPIs/FM using server explorer.

Former Member
0 Kudos

Where would you insert that code?

Former Member
0 Kudos

Let me explain further.

We have a form with many text fields.

We need to call those BAPI when we hit the submit button.

How can we do that?

Former Member
0 Kudos

Hi Amr/Developer

Put the code in the click event of the submit button.

You can also try the examples provided with the .net connector.

Please also mark the question as answered and award appropriate points if your issue is resolved.

Thanks

Gaurav