BizTalk Adapter Pack SAP VS2k5 integration - PowerPoint PPT Presentation

1 / 56
About This Presentation
Title:

BizTalk Adapter Pack SAP VS2k5 integration

Description:

none – PowerPoint PPT presentation

Number of Views:60
Avg rating:3.0/5.0
Slides: 57
Provided by: takh
Category:

less

Transcript and Presenter's Notes

Title: BizTalk Adapter Pack SAP VS2k5 integration


1
SAP .NET application(Visual Studio 2005)
Integration
Microsoft CorporationSAP-Microsoft
Competence Center (Tokyo)
2
Landscape
Consoleapplication
Table,View
Web application
BAPIRFC
SAP R/3 SAP ERP
XML WebServices
3
BizTalk Adapter Pack (SAP) setup procedure
  • Console application development
  • Table select, .NET Data Provider for SAP
  • Console application development
  • RFC/BAPI execution, WCF LOB Adapter
  • ASP .NET Web application development
  • Table select, .NET Data Provider for SAP
  • ASP .NET Web application development
  • RFC/BAPI execution, WCF LOB Adapter
  • ASP .NET Web Service development
  • Table select, .NET Data Provider for SAP

4
Landscape
Consoleapplication
Table,View
Web application
BAPIRFC
SAP R/3 SAP ERP
XML WebServices
5
1. Console application development
  • Visual Studio 2005 New project Visual C -
    Console application
  • Solution Explorer Reference Add reference
    add Microsoft.Data.SapClient,
    Microsoft.Adapters.SAP, Microsoft.ServiceModel.
    Channels
  • Customize the SAP connection (from
    connectionStrings.Add("CLIENT800LANGENUSERSA
    PPASSWD06071992ASHOSTMSSAP01SYSNR00"))
    for your SAP system
  • Customize the SAP command (from cmd.CommandText
    "select from ENT1027 where SPRAS 'JA'")
    for your SAP system
  • Paste the code and build it
  • ( Option for trouble shooting)
  • Place the XXXXXX.exe.config file in the same
    folder as the executable, XXXXX to be named the
    same as the console application
  • In case the app is ABC.exe, name the config
    file name as ABC.exe.config
  • Execute the console app from command prompt then
    XMLTrace.xml file is generated
  • Each time the console app is executed delete the
    XMLTrace.xml

6
1. Console application development
  • using System
  • using System.Collections.Generic
  • using System.Text
  • using Microsoft.Data.SAPClient
  • using Microsoft.Adapters.SAP
  • using Microsoft.ServiceModel.Channels
  • namespace ConsoleApplication2
  • class Program
  • public class ExecTest
  • public static void Main()
  • try
  • System.Console.Write("Client"
    )
  • string strClient
    Console.ReadLine()

7
(Option) 1. Xxxxx.exe.config for the console app
  • lt?xml version"1.0" encoding"utf-8" ?gt
  • ltconfigurationgt
  • ltsystem.diagnosticsgt
  • ltsharedListenersgt
  • ltadd name"xmlFile" type"System.Diagnostics.Xm
    lWriterTraceListener" initializeData"XmlTrace.xml
    " /gt
  • lt/sharedListenersgt
  • ltsourcesgt
  • ltsource name"Microsoft.ServiceModel.Channels"
    switchValue"Verbose"gt
  • ltlistenersgt
  • ltadd name"xmlFile" /gt
  • lt/listenersgt
  • lt/sourcegt
  • ltsource name"Microsoft.Adapters.SAP"
    switchValue"Verbose"gt
  • ltlistenersgt
  • ltadd name"xmlFile" /gt
  • lt/listenersgt
  • lt/sourcegt
  • ltsource name"Microsoft.Data.SAPClient"
    switchValue"Verbose"gt
  • ltlistenersgt

8
Visual Studio
1-1. Creating a new console application project
9
Visual Studio
1-2. Adding references
10
Visual Studio
1-3. Coding
Paste the attached code.
11
Visual Studio
1-4. Building/deploying the code
12
Visual Studio
1-5. Executing the console application
13
BizTalk Adapter Pack (SAP) setup procedure
  • Console application development
  • Table select, .NET Data Provider for SAP
  • Console application development
  • RFC/BAPI execution, WCF LOB Adapter
  • ASP .NET Web application development
  • Table select, .NET Data Provider for SAP
  • ASP .NET Web application development
  • RFC/BAPI execution, WCF LOB Adapter
  • ASP .NET Web Service development
  • Table select, .NET Data Provider for SAP

14
Landscape
Consoleapplication
Table,View
Web application
BAPIRFC
SAP R/3 SAP ERP
XML WebServices
15
2. Console application development
  • using System
  • using System.Collections.Generic
  • using System.Text
  • using System.ServiceModel
  • using Microsoft.ServiceModel.Channels
  • using Microsoft.Adapters.SAP
  • namespace SapRfcClientSM
  • class Program
  • static void Main(string args)
  • try
  • // Create client from
    configuration
  • using (RfcClient rfcClient new
    RfcClient("SAPBinding_Rfc"))
  • rfcClient.ClientCredentials.Us
    erName.UserName "SAP"

16
Visual Studio
2-1. Creating a new console application project
17
Visual Studio
2-2. Adding references
18
Visual Studio
2-3. Adding Adapter Service Reference
19
Visual Studio
2-3. Adding Adapter Service Reference
20
Visual Studio
2-4. Coding
Paste the attached code.
21
Visual Studio
2-5. Building/deploying the code
22
Visual Studio
2-6. Executing the console application
23
BizTalk Adapter Pack (SAP) setup procedure
  • Console application development
  • Table select, .NET Data Provider for SAP
  • Console application development
  • RFC/BAPI execution, WCF LOB Adapter
  • ASP .NET Web application development
  • Table select, .NET Data Provider for SAP
  • ASP .NET Web application development
  • RFC/BAPI execution, WCF LOB Adapter
  • ASP .NET Web Service development
  • Table select, .NET Data Provider for SAP

24
Landscape
Consoleapplication
Table,View
Web application
BAPIRFC
SAP R/3 SAP ERP
XML WebServices
25
Visual Studio
3-1. Creating a new ASP .NET Web application
project
26
Visual Studio
3-2. Designing the user interface
27
Visual Studio
3-3. Adding references
28
3. ASP .NET Web application development (1)
  • using Microsoft.Data.SAPClient
  • using Microsoft.Adapters.SAP
  • using Microsoft.ServiceModel.Channels
  • using System.Collections.Generic

29
Visual Studio
3-5. Coding
Paste the attached code.
30
3. ASP .NET Web application development (2)
  • protected void Button1_Click(object sender,
    EventArgs e)
  • Listltstringgt connectionStrings new
    Listltstringgt()
  • connectionStrings.Add("CLIENT800LANG
    ENUSERSAPPASSWD06071992ASHOSTMSSAP01SYSNR
    00")
  • foreach (string connStr in
    connectionStrings)
  • using (SAPConnection conn new
    SAPConnection(connStr))
  • String str
  • str TextBox1.Text
  • DataTable dt new
    DataTable()
  • dt.Columns.Add(new
    DataColumn("Client", typeof(string)))
  • dt.Columns.Add(new
    DataColumn("Language", typeof(string)))
  • dt.Columns.Add(new
    DataColumn("Country", typeof(string)))
  • dt.Columns.Add(new
    DataColumn("No", typeof(string)))
  • dt.Columns.Add(new
    DataColumn("RegionName", typeof(string)))
  • conn.Open()
  • using (SAPCommand cmd
    conn.CreateCommand())

31
Visual Studio
3-5. Coding
Paste the attached code.
32
Visual Studio
3-5. Coding
33
Visual Studio
3-6. Debugging the application
34
BizTalk Adapter Pack (SAP) setup procedure
  • Console application development
  • Table select, .NET Data Provider for SAP
  • Console application development
  • RFC/BAPI execution, WCF LOB Adapter
  • ASP .NET Web application development
  • Table select, .NET Data Provider for SAP
  • ASP .NET Web application development
  • RFC/BAPI execution, WCF LOB Adapter
  • ASP .NET Web Service development
  • Table select, .NET Data Provider for SAP

35
Landscape
Consoleapplication
Table,View
Web application
BAPIRFC
SAP R/3 SAP ERP
XML WebServices
36
Visual Studio
4-1. Creating a new ASP .NET Web application
project
37
Visual Studio
4-2. Designing the user interface
38
Visual Studio
4-3. Adding references
39
Visual Studio
4-4. Adding Adapter Service Reference
40
Visual Studio
4-4. Adding Adapter Service Reference
41
4. ASP .NET Web application development (1)
  • using System.ServiceModel
  • using Microsoft.ServiceModel.Channels
  • using Microsoft.Adapters.SAP

42
Visual Studio
4-5. Coding
Paste the attached code.
43
4. ASP .NET Web application development (2)
  • protected void Button1_Click(object sender,
    EventArgs e)
  • String str
  • DataTable dt new DataTable()
  • DataRow dr
  • dr null
  • try
  • // Create client from
    configuration
  • using (RfcClient rfcClient new
    RfcClient("SAPBinding_Rfc"))
  • rfcClient.ClientCredentials.Us
    erName.UserName "SAP"
  • rfcClient.ClientCredentials.Us
    erName.Password "06071992"
  • // Open client
  • rfcClient.Open()
  • microsoft.lobservices.sap._200
    7._03.Types.Rfc.BRFCKNA1 customers
  • new microsoft.lobservices.
    sap._2007._03.Types.Rfc.BRFCKNA10
  • // Invoke SD_RFC_CUSTOMER_GET
  • str TextBox1.Text

44
Visual Studio
4-5. Coding
Paste the attached code.
45
Visual Studio
4-5. Coding
46
Visual Studio
4-6. Debugging the application
47
BizTalk Adapter Pack (SAP) setup procedure
  • Console application development
  • Table select, .NET Data Provider for SAP
  • Console application development
  • RFC/BAPI execution, WCF LOB Adapter
  • ASP .NET Web application development
  • Table select, .NET Data Provider for SAP
  • ASP .NET Web application development
  • RFC/BAPI execution, WCF LOB Adapter
  • ASP .NET Web Service development
  • Table select, .NET Data Provider for SAP

48
Landscape
Consoleapplication
Table,View
Web application
BAPIRFC
SAP R/3 SAP ERP
XML WebServices
49
Visual Studio
5-1. Creating a new ASP .NET Web Service project
50
Visual Studio
5-2. Adding references
51
5. ASP .NET Web Service development
  • using System
  • using System.Data
  • using System.Web
  • using System.Collections
  • using System.Web.Services
  • using System.Web.Services.Protocols
  • using System.ComponentModel
  • using Microsoft.Data.SAPClient
  • using Microsoft.Adapters.SAP
  • using Microsoft.ServiceModel.Channels
  • using System.Collections.Generic
  • namespace WebService4
  • WebService(Namespace "http//tempuri.org/")
  • WebServiceBinding(ConformsTo
    WsiProfiles.BasicProfile1_1)
  • ToolboxItem(false)
  • public class Service1 System.Web.Services.We
    bService

52
Visual Studio
5-3. Coding
Paste the attached code.
53
Visual Studio
5-3. Coding
Rename the namespace.
54
Visual Studio
5-3. Coding
55
Visual Studio
5-4. Debugging the application
56
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com