on 05-05-2006 7:34 AM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can get the list of tables from TADIR...
SELECT *
FROM tadir
WHERE pgmid = 'R3TR' AND object = 'TABL'
AND OBJ_NAME LIKE 'A%'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can write one quickly and get the table names from DD02L table.
Regards,
Ravi
Note : Please mark the helpful answers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.