![]() |
VOOZH | about |
This article demonstrates using the CData ADO.NET Provider for SAP in PowerBuilder, showcasing the ease of use and compatibility of these standards-based controls across various platforms and development technologies that support Microsoft .NET, including Appeon PowerBuilder.
This article shows how to create a basic PowerBuilder application that uses the CData ADO.NET Provider for SAP to retrieve data.
CData provides the easiest way to access and integrate live data from SAP. Customers use CData connectivity to:
While most users leverage our tools to replicate SAP data to databases or data warehouses, many also integrate live SAP data with analytics tools such as Tableau, Power BI, and Excel.
Host=sap.mydomain.com;User=EXT90033;Password=xxx;Client=800;System Number=09;ConnectionType=Classic;Location=C:/mysapschemafolder;
You can connect to SAP systems using either librfc32.dll, librfc32u.dll, NetWeaver, or Web Services (SOAP). Set the ConnectionType connection property to CLASSIC (librfc32.dll), CLASSIC_UNICODE (librfc32u.dll), NETWEAVER, or SOAP.
If you are using the SOAP interface, set the Client, RFCUrl, SystemNumber, User, and Password properties, under the Authentication section.
Otherwise, set Host, User, Password, Client, and SystemNumber.
Note: We do not distribute the librfc32.dll or other SAP assemblies. You must find them from your SAP installation and install them on your machine.
For more information, see this guide on obtaining the connection properties needed to connect to any SAP system.
<DataGrid AutoGenerateColumns="False" Margin="13,249,12,14" Name="datagrid1" TabIndex="70" ItemsSource="{Binding}">
<DataGrid.Columns>
<DataGridTextColumn x:Name="idColumn" Binding="{Binding Path=MANDT}" Header="MANDT" Width="SizeToHeader" />
<DataGridTextColumn x:Name="nameColumn" Binding="{Binding Path=MANDT}" Header="MANDT" Width="SizeToHeader" />
...
</DataGrid.Columns>
</DataGrid>
Once the visual elements have been configured, you can use standard ADO.NET objects like Connection, Command, and DataAdapter to populate a DataTable with the results of an SQL query:
System.Data.CData.SAPERP.SAPERPConnection conn conn = create System.Data.CData.SAPERP.SAPERPConnection(connectionString) System.Data.CData.SAPERP.SAPERPCommand comm comm = create System.Data.CData.SAPERP.SAPERPCommand(command, conn) System.Data.DataTable table table = create System.Data.DataTable System.Data.CData.SAPERP.SAPERPDataAdapter dataAdapter dataAdapter = create System.Data.CData.SAPERP.SAPERPDataAdapter(comm) dataAdapter.Fill(table) datagrid1.ItemsSource=table.DefaultView
The code above can be used to bind data from the specified query to the DataGrid.
Download a free trial of the SAP ERP Data Provider to get started:
Download NowLearn more:
👁 SAP ERP IconStraightforward SAP ERP integration. Now accessing SAP RFC's from .NET applications is as easy as querying SQL Server.