![]() |
VOOZH | about |
This article demonstrates using the CData ADO.NET Provider for SAP Ariba Procurement 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 Ariba Procurement to retrieve data.
ANID=AN02000000280;API=PurchaseOrdersBuyerAPI-V1;APIKey=wWVLn7WTAXrIRMAzZ6VnuEj7Ekot5jnU;AuthScheme=OAuthClient;InitiateOAuth=GETANDREFRESH;
In order to connect with SAP Ariba Procurement, set the following:
After setting connection properties, you need to configure OAuth connectivity to authenticate.
For more information on creating an OAuth application, refer to the Help documentation.
After setting the following, you are ready to connect:
When you connect, the provider automatically completes the OAuth process:
<DataGrid AutoGenerateColumns="False" Margin="13,249,12,14" Name="datagrid1" TabIndex="70" ItemsSource="{Binding}">
<DataGrid.Columns>
<DataGridTextColumn x:Name="idColumn" Binding="{Binding Path=Id}" Header="Id" Width="SizeToHeader" />
<DataGridTextColumn x:Name="nameColumn" Binding="{Binding Path=DocumentNumber}" Header="DocumentNumber" 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.SAPAribaProcurement.SAPAribaProcurementConnection conn conn = create System.Data.CData.SAPAribaProcurement.SAPAribaProcurementConnection(connectionString) System.Data.CData.SAPAribaProcurement.SAPAribaProcurementCommand comm comm = create System.Data.CData.SAPAribaProcurement.SAPAribaProcurementCommand(command, conn) System.Data.DataTable table table = create System.Data.DataTable System.Data.CData.SAPAribaProcurement.SAPAribaProcurementDataAdapter dataAdapter dataAdapter = create System.Data.CData.SAPAribaProcurement.SAPAribaProcurementDataAdapter(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 Ariba Procurement Data Provider to get started:
Download NowLearn more:
👁 SAP Ariba Procurement IconRapidly create and deploy powerful .NET applications that integrate with SAP Ariba Procurement.