P'Aoi, expert of dotNet in IT-BOT teached me how to create SAP Web Service.
The instruction to Create SAP Web Service
-Right Click at Your Project
-Click Add
-Click Add New Item
-Select Web Service
-Type Name: [Your Web Service Name].asmx
-Click OK
-In the .vb code, import the following libraries
[VB.Net]
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.ComponentModel
Imports System.Configuration
-Set
[VB.Net]
{system.web.services.webservice(namespace:=http://localhost/[Your Project]/[Your Web Service Name])> _
{system.web.services.webservicebinding(conformsto:=wsiprofiles.basicprofile1_1)> _
{toolboxitem(false)> _
-Declare and define SAP Connection String
[VB.Net]
Dim cs As String = System.Configuration.ConfigurationSettings.AppSettings("[Your SAP Connection String]")
-Declare Get SAP Connection Function
[VB.Net]
Private Function GetSAPConnection() As SAP.Connector.Connection
Dim objDest As New SAP.Connector.Destination
objDest.AppServerHost = System.Configuration.ConfigurationSettings.AppSettings("AppServerHost")
objDest.SystemNumber = System.Configuration.ConfigurationSettings.AppSettings("SystemNumber")
objDest.Client = System.Configuration.ConfigurationSettings.AppSettings("Client")
objDest.Language = System.Configuration.ConfigurationSettings.AppSettings("Language")
objDest.Username = System.Configuration.ConfigurationSettings.AppSettings("Username")
objDest.Password = System.Configuration.ConfigurationSettings.AppSettings("Password")
Return SAP.Connector.Connection.GetConnection(objDest)
End Function
-Create Your Function accoring to your SAP RFC like the example Hello World
Showing posts with label SAP R/3. Show all posts
Showing posts with label SAP R/3. Show all posts
Friday, December 19, 2008
Thursday, December 18, 2008
Let's Talk about .. Visual Studio 2003-Add SapConnectorProxy and Add Function Filter [R/3]
Yesterday, P'Aoi teached me how to set the SAP Connector Proxy and create the Function Filter.
The instruction to add the SAP Connector Proxy
-Check out all project
-Create Folder of SapProxy (to put whatever it's automatically generated)
-Create Folder of SapClass (to put what you create yourself)
-Add New Item
-Select SapConnectionProxy (Note: you need to install SapDotNetConnector)
-Select SAPConnectorProxy
-Type name.sapwsdl
-Click OK
-Select Server Explorer
-Expand SAP
-Right click at Application Servers
-Click Add Application Server
-Type the Server Destination
-Type Username, Password, Client, and Language that are used to log on the SAP Server
-Check whether you can expand the Alphabetical and Hierarchical or not.
-If Yes, it's ok. But otherwise, set the properties with the following SPECIAL STEPS suggestions:-
SPECIAL STEPS
AppServerHost: [Your SAP Server name]
Client: [Your Client number]
DestinationType: Custom Logon Settings
Internal: SAP.Connector.Destination
AbapDebug: False
AppServerHost: [Your SAP Server name]
Client: [Your Client number]
HttpPath: /sap/bc/soap/rtc
HttpPort: 80
HttpProtocol: http
The instruction to Add Function Filter
-Right click at SAP->Application Servers->[Your SAP Server name]->Functions
-Click Add Function Filter...
-Type Name (to display in your Visual Studio)
-Type GroupFilter (which is your Function Group name you wanna filter)
-Click OK
The instruction to add the SAP Connector Proxy
-Check out all project
-Create Folder of SapProxy (to put whatever it's automatically generated)
-Create Folder of SapClass (to put what you create yourself)
-Add New Item
-Select SapConnectionProxy (Note: you need to install SapDotNetConnector)
-Select SAPConnectorProxy
-Type name.sapwsdl
-Click OK
-Select Server Explorer
-Expand SAP
-Right click at Application Servers
-Click Add Application Server
-Type the Server Destination
-Type Username, Password, Client, and Language that are used to log on the SAP Server
-Check whether you can expand the Alphabetical and Hierarchical or not.
-If Yes, it's ok. But otherwise, set the properties with the following SPECIAL STEPS suggestions:-
SPECIAL STEPS
AppServerHost: [Your SAP Server name]
Client: [Your Client number]
DestinationType: Custom Logon Settings
Internal: SAP.Connector.Destination
AbapDebug: False
AppServerHost: [Your SAP Server name]
Client: [Your Client number]
HttpPath: /sap/bc/soap/rtc
HttpPort: 80
HttpProtocol: http
The instruction to Add Function Filter
-Right click at SAP->Application Servers->[Your SAP Server name]->Functions
-Click Add Function Filter...
-Type Name (to display in your Visual Studio)
-Type GroupFilter (which is your Function Group name you wanna filter)
-Click OK
Subscribe to:
Posts (Atom)