2007 Dec 24 6:15 AM
Hi to all,
here is my requirement,
i want to give table name as input.
if i give table name as input with parameters,then i want to display all fields in that
table dynamically.
suppose first i want to give lfa1 as input and i want to display all the fields in lfa1,
then i will give ekko and now i want to all the fields in the ekko table.
like that i want to see some 16 tables.....How to write coding fot this...
please reply.........
Regards,
swami.
Hi to all,
here is my requirement,
i want to give table name as input.
if i give table name as input with parameters,then i want to display all fields in that
table dynamically.
suppose first i want to give lfa1 as input and i want to display all the fields in lfa1,
then i will give ekko and now i want to all the fields in the ekko table.
like that i want to see some 16 tables.....How to write coding fot this...
please reply.........
Regards,
swami.
2007 Dec 24 6:22 AM
Hi,
There is a table DD03L which have table name with all fields.
select TABNAME FIELDNAME from DD03L into i_DD03L where TABNAME = <table name>
now you use this internal table to display on the output.
Regards,
Pankaj
2007 Dec 24 6:23 AM
Hi
This code may help.
parameters : p_tab type TABNAME.
data : i_tab type standard table of dd03l,
wa_tab type dd03l.
select * from dd03l into table i_tab where tabname = p_tab.
loop at i_tab into wa_tab.
write : / wa_tab-tabname, wa_tab-fieldname.
endloop.
~ Ranganath
2007 Dec 24 6:24 AM
PARAMETERS: tname type dd03l-tabname.
data: begin of wa,
fname type dd03l-fieldname,
end of wa.
data: itab like table of wa.
select fieldname from dd03l into table itab where tabname = tname.
loop at itab into wa.
write:/ wa-fname.
endloop.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |