Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Trace with Filter

Former Member
0 Kudos

Hi,

I have a report Z_MA_TEST including a simple sql statement (open sql).

I want to trace this to see what happends.

When I Activate Trace With Filter (OK)

  • Provide USERNAME = MYUSERNAME

When I Activate Trace With Filter (<b>Trace file empty??</b>)

  • Provide USERNAME = MYUSERNAME

  • Provide PROGRAMNAME = Z_MA_TEST

Why cant I trace with my program name ?

//Martin

1 ACCEPTED SOLUTION

christian_wohlfahrt
Active Contributor
0 Kudos

Hi,

there exists a transaction code to reset complete application server - that's to much (and don't ask).

But each write access invalids buffer. But this invalidation might need some time to be recognized by all servers.

Just flag buffer-trace, that's OK.

Christian

9 REPLIES 9

Former Member
0 Kudos

After you activate trace.

Run your program.

When you are done; deactive trace.

Push trace list.

It will give the necessary output.

-


If it helps please give points.

0 Kudos

Hmmm... I only get a COMMIT.

Maybe because this is a pooled table ?

//MA

REPORT Z_MA_TEST.

data: vobjtest type A004-MATNR.

select A004~MATNR

into vobjtest

from A004

where A004~MATNR = '000000000000117777'.

WRITE: / vobjtest.

endselect.

christian_wohlfahrt
Active Contributor
0 Kudos

Hi Martin,

Pool or not - has nothing to do with the problem.

Are you handling different logons? Direct trace (like Fuats explanation) only works between sessions of one login. Trace with filter can handle all sessions of one application server.

Filtering behaves little bit strange - add some stars to get more valid entries:

username = myusername

progamname = z*

TABN_INC = * (or A004)

By the way: don't forget to check for KONP-LOEVM_KO = space.

Regards,

Christian

0 Kudos

I change my code to access a trans table (MARA).

Then It works I get the trace.

data: vobjtest2 type MARA-MATNR.

select MARA~MATNR

into vobjtest2

from MARA

where MARA~MATNR = '000000000000117777'.

WRITE: / vobjtest2.

endselect.

0 Kudos

Hi Martin,

I used your example with A004.

I activated the trace on with filter in ST05.

Checked all the checkboxes.

Gave User name and program name in 'Trace on for user' option.

Ran the program.

Switched the trace off.

I got some trace as follows.

                                                                                
Transaction = SE38                 PID =    24768 P type  DIA Client = 040 User = SADAVI         
        
 HH:MM:SS.MS  Duration  Program  ObjectName Op.     Curs Array Rec   RC     Conn  Statement       
                                         
 11:19:59.947    11,414 SAPLSECU TSL1D      READ SI                1      0       R 3 AUW         
 11:19:59.962        22 ZTESTAKX A004       OPEN                   0      0       R 3 040         
 11:19:59.962        27 ZTESTAKX A004       FETCH                  1      0                       
 11:19:59.963        20 SAPLOMCV TMCNV      READ SI                1      0       R 11 040MATCONV 
 11:19:59.963        32 ZTESTAKX A004       FETCH                  0     64                       
 11:19:59.963         7 ZTESTAKX A004       CLOSE                  0      0                       

So I am not sure if this what you are also getting, whereas you are expecting more.

Please let us know.

Thanks,

Srinivas

0 Kudos

Okej, but I still can't see my SQL statement.

And if I only use SQL Trace then nothing about A004 is visible.

//Martin

christian_wohlfahrt
Active Contributor
0 Kudos

Hi Martin,

it's not the usual default, but A004 is fully buffered. So activate the flag buffer trace or change an entry immediately before running your example.

Yellow lines will be actually executed via DB, blue lines will be handled by the application server out of buffer.

Hope this is the solution,

regards,

Christian

0 Kudos

Hi,

I really want to see the sql.

Is there a way to empty/disable bufferd tables ?

//Martin

christian_wohlfahrt
Active Contributor
0 Kudos

Hi,

there exists a transaction code to reset complete application server - that's to much (and don't ask).

But each write access invalids buffer. But this invalidation might need some time to be recognized by all servers.

Just flag buffer-trace, that's OK.

Christian