cancel
Showing results for 
Search instead for 
Did you mean: 

Give the list of tables using code without using transaction SE11.

Former Member
0 Kudos

Hi

I have a requirement where a function module should return the list of names of tables based on the string passed to it like if a* is passed it should give the names of all the tables starting with a.

Are there ways to select the table names using code and not using transaction SE11?

thanks

hema.

Accepted Solutions (1)

Accepted Solutions (1)

former_member184569
Active Contributor
0 Kudos

Hello Hema,

SELECT TABNAME, TABCLASS

FROM DD02L

WHERE TABNAME LIKE 'NP%'

AND ( TABCLASS EQ 'TRANSP' OR

TABCLASS EQ 'CLUSTER' OR

TABCLASS EQ 'POOL' OR

TABCLASS EQ 'VIEW' )

I am attaching a sample code which lists all the tables corresponding to the selection criteria.

http://www.guidancetech.com/people/holland/sap/abap/zzbgs044.htm

Hoping that this helped you.

Cheers,

Susmitha

Answers (3)

Answers (3)

Former Member
0 Kudos

HI

I DONT THINK THERE IS ANY FUNCTION MODULE THAT WILL RETURN YOU THE APPROPRIATE TABLE NAME BY USING A KEYWORK.

IN STEAD OF GOING FOR A FUNCTION MODULE I HOPE IT WOULD BE BETTER IF YOU GO FOR A NORMAL ABAP LOGIC WHICH WILL RETURN YOU ALL THE TABLES.

THANKS

MRUTYUN

Former Member
0 Kudos

You can get the list of tables from TADIR...

SELECT *
 FROM tadir
 WHERE pgmid = 'R3TR' AND object = 'TABL'
 AND OBJ_NAME LIKE 'A%'.

Former Member
0 Kudos

Hi,

You can write one quickly and get the table names from DD02L table.

Regards,

Ravi

Note : Please mark the helpful answers