cancel
Showing results for 
Search instead for 
Did you mean: 

Data Access from Table

Former Member
0 Kudos

Hello

We would like to access data from multiple tables (A , B) using select statement, join and where clause.

Please help and provide the example that how to write a code in SAP .Net to fetch these data without using any function module.

Please help

Regards

Basis

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Note the description of the SCN Space from the Overview:

based on the above, are you sure you posted your query to the correct Space?

List of SCN Spaces:

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow me on Twitter

Answers (1)

Answers (1)

0 Kudos

Use a Command object as your data source. Once you figure out how to create the SQL based on your data source simply copy the SQL in the Command and then you can report off the data.

Here is an example using Oracle and joining Orders and Order Detail tables and filtering on Order ID:

SELECT "ORDERS"."Customer ID", "ORDERS"."Employee ID", "ORDERS"."Order Amount", "ORDERS"."Order Date", "ORDERS"."Order ID", "Orders_Detail"."Quantity", "Orders_Detail"."Unit Price"

FROM   "XTREME"."ORDERS" "ORDERS" INNER JOIN "XTREME"."Orders Detail" "Orders_Detail" ON "ORDERS"."Order ID"="Orders_Detail"."Order ID"

WHERE  "ORDERS"."Order ID"<1000

Don

Former Member
0 Kudos

Dear Williams

Thanks for your suggestion.

Request you to share the complete code with syntax that how to pass this sql statement through the .Net and get the data. Actually my developers are expert in .net and try to fetch the data using the same from SAP system.

Regards

Basis

0 Kudos

Create a new report, after logging on you will see this screen. Select Add Command and type in your SQL

You will then see this screen:

Enter your SQL and Click OK. If all is well then you should see the fields you selected in the database window:

Easiest way is to create a report hitting the database directly, add the fields you want to use and then Show SQL. Copy that SQL and create a new report using Add Command and paste in the SQL.

Add some fields and preview....

Don

Former Member
0 Kudos

Dear Don

We have created the code in asp.net after installing BIZAdapter Pack 1.0 and we got the required dll as Microsoft.data.sapclient.dll, which was required to create a connection to SAP. On opening the connection we are getting error as  "FileNotFoundException was unhandled" screen shot attached.

Since we are making a assessment tools so we want to access the data using SAP API because the same tools will work for all database .

Please suggest.

Regards

Basis

0 Kudos

OK, never heard of that driver....

So what is the data source you are trying to connect to?

And what SDK package are you using?

Don