cancel
Showing results for 
Search instead for 
Did you mean: 

System Query

Former Member
0 Kudos

Hi all

Where Can i find the system query for the Profit Center report.

Regards

Rashid

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

This is the Code I got after SQL Trace



SELECT T1.[TransId], T1.[Line_ID], T1.[ShortName], T1.[TransType], T1.[Debit], T1.[Credit], T1.[RefDate], T1.[DueDate], T0.[ActType] FROM  [dbo].[OACT] T0 
,  [dbo].[JDT1] T1  WHERE T1.[Account] = T0.[AcctCode]  AND  T1.[DueDate] >= '2008-04-01 00:00:00:000'  AND  T1.[DueDate] <= '2009-03-31 00:00:00:000'  AND  T1.[RefDate] >= '2008-08-01 00:00:00:000'  AND  T1.[RefDate] <= '2008-08-31 00:00:00:000'  AND 
 T1.[TaxDate]>= '2008-04-01 00:00:00:000'  AND  T1.[TaxDate] <= '2009-03-31 00:00:00:000'  AND  T1.[ProfitCode] = 'CF1'   ORDER BY T1.[Account]


In the above query,

T1.[ProfitCode] = 'CF1' 

Replace 'CF1' with your profit centre codes.


The above query is repeated with different parameters for T1.[ProfitCode] (all the Profit Centre Codes)

Edited by: Sridharan T on Aug 5, 2008 4:54 PM

Edited by: Sridharan T on Aug 5, 2008 4:54 PM

Answers (2)

Answers (2)

former_member204969
Active Contributor
0 Kudos

Most of the reports you see in the menu are programmed and their code is not accessible. Only the ones with icon containing u2018?u2019 are simple SQL queries, and you can see their code in the query manager.

Former Member
0 Kudos

Hi

Open SQL Server Management Studio.

From Menu select Tools -> SQL Server Profiler

Create a New Trace by selecting File -> New Trace

Now click on the report in SAP B1.

Now see the SQL Trace.

You can find out the Query here in the Trace Window.