[Solved] ABAP query - has a specific table been used?

Development (ABAP Development WorkBench, ABAP/4 programming)

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

Post Reply
learning_sap
Posts: 157
Joined: Sun Jan 26, 2003 8:08 am

[Solved] ABAP query - has a specific table been used?

Post by learning_sap » Fri Mar 05, 2010 12:45 pm

How can we check which abap queries, that uses a specific table?

A. The easier part is probably finding the relevant "logical databases" that contain the specific table; and secondly find the queries building on one of these logical databases.

B. The more tricky part seems to be to find the info sets, where the specific table has been used. We really do not want to go through each and every info set one by one; but how can we automate this? Are the tables that are joined in a specific info set stored in some AQ-table, or????

UPDATE: Solution sounds doable. Will try :-)
Last edited by learning_sap on Wed Mar 10, 2010 7:45 am, edited 1 time in total.

AndyW
Posts: 70
Joined: Wed Jan 02, 2008 10:27 am
Location: North Norfolk, UK

Re: ABAP query - has a specific table been used?

Post by AndyW » Mon Mar 08, 2010 4:16 am

Hi

Not really I know something about but your question intrigued me so I did a bit of digging around.

I guess it depends on how you want to automate it. It looks like the data for an Infoset is stored in AQ tables (AQGDB?) but its stored in LRAW format. There is a FM (RSAQ_IMPORT_INFOSET) which seems to work on our system (4.6C) if you just provide an Infoset name. It then returns a load of internal tables and the one you want looks like its O_DBJT.

Table AQLSCAT appears to hold a list of Infosets and the Logical Database used or the the table selected as the basis for the Infoset.

I guess it would not be too difficult to write a report with a 'Table Name' parameter that uses the above FM to interrogate the ODBJT table for all instances of a given table.

I haven't spent too long looking at this so might have missed something but hope it helps.

Andy

Post Reply