Toad World® Forums

Reporting Problems

Hi friends,

We use a ERP like SAP in company. When we get sales reports, datas are not the same as TOAD.

For example our sales are 100k in ERP but in TOAD it seems 90k.

Its huge problem.

By the way during reporting in TOAD we use view.

You think what i should? Is the problem on the view?

The most important thing to know is that Toad does not run SQL. Oracle does. If the data is different, either something is different between the SQL that the report runs and the view's SQL, OR, maybe there is some context or some other variable that is set differently or not set at all.

First thing is first... find out what query is used to produce the sales report, and compare the query results with the one that you're using with Toad (e.g. the view). There's something different either in the base queries used, or other report logic that may not be in the view.

They’re getting automatic report with ERP. We dont know ERP use which code

To troubleshoot this issue correctly, you're going to need to find out which query/queries are being used to create the report on the SAP side, and which query (sounds like you're using an Oracle view) when creating the report with Toad.

As John Dorlon said, Toad doesn't execute the query, but passes it to Oracle to execute, so my guess is that the view definition is not bringing back the same results set as your SAP report query.

Have someone check the Oracle view you're using that creates the report result set in Toad, and then compare that with the SAP report result set. You might be able to use the Session browser within Toad to extract the queries/views used in the SAP report connection vs. the way you're creating the results in Toad.

i couldnt understand. what should i do on Session browser?

The Session Browser of Toad can help you understand what SQL queries are being passed to the database for the different application connections... you can find which connection SAP is using to create your report, which allows you to see the underlying SQL...

1 Like

I will try that. Thanks Gary. You think what should i attention in queries while reporting?

If your question is "what should i pay attention to for the report queries?", then the main thing is to test whether the query from SAP is equivalent to the other query or view that someone is using Toad to execute. That is, run the SAP query, then run the view, and compare the data results. If you're not getting the same results from both sides, then one of the queries is incorrect, and needs to be changed.

1 Like

Thanks Gary.Jerep