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 Visual Studio 2003. Show all posts
Showing posts with label Visual Studio 2003. 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
Let's Talk about .. Visual Studio 2003-Create Web Application with virtual directory
P'Aoi just teached me how to create the web application with virtual directory by Visual Studio 2003. The reason why I've to use 2003 instead of 2005 is I'm gonna create web services to call RFC from SAP R/3 which needs to use SAP Connector that is suitable for dotNET 1.1.
The Instruction to Create Web Application with virtual directory
-Create folder
-Right Click at your folder
-Click Properties
-In Security tab, make sure you have the necessary permissions
-In Web Sharing tab, click Add
-Type the Alias
-In Access permissions, set Read and Directory browsing
-In Application permissions, set Scripts
-Click OK
-Enter IIS
-Right Click at Default Web Site
-New->Virtual Directory...
-Click Next
-Type Alias (as your set for your folder)
-Browse the directory (your folder of Step 1)
-Open Visual Studio 2003
-File->New->Project...
-Select Project Types: Visual Basic Projects or Visual C# Projects
-Select ASP.NET Web Application
-Type Location: http://localhost/[your alias]
-Type OK
The Instruction to Create Web Application with virtual directory
-Create folder
-Right Click at your folder
-Click Properties
-In Security tab, make sure you have the necessary permissions
-In Web Sharing tab, click Add
-Type the Alias
-In Access permissions, set Read and Directory browsing
-In Application permissions, set Scripts
-Click OK
-Enter IIS
-Right Click at Default Web Site
-New->Virtual Directory...
-Click Next
-Type Alias (as your set for your folder)
-Browse the directory (your folder of Step 1)
-Open Visual Studio 2003
-File->New->Project...
-Select Project Types: Visual Basic Projects or Visual C# Projects
-Select ASP.NET Web Application
-Type Location: http://localhost/[your alias]
-Type OK
Subscribe to:
Posts (Atom)