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.
Showing results for 
Search instead for 
Did you mean: 

This is regarding abap for database table......

Former Member
0 Kudos

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.........




Former Member
0 Kudos


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.



Former Member
0 Kudos


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.


~ Ranganath

Former Member
0 Kudos

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.