‎2008 Jan 16 7:25 AM
hi,
i now have an input field and a table control. when i enter the table name into the input field, the field names inside the table will be pulled out and display in the table control. how can i do that?
thanks. will reward handsomely if useful.
‎2008 Jan 16 7:33 AM
Hi,
wht u do is in the PAI of the screen
write one quiery as the fields of the table will be there in the table DD03L and get the data into the internal table and display that table i think u got me if u have any further quiries contact me on mutyalasunilkumar@gmail.com
plzz dont forget to reward if it is useful......
‎2008 Jan 16 9:03 AM
hi evonne..
i would try to give u an outline..
Lets assume ur screen has table name field- TABNAME
and a table control- TC
let the internal table of TC be it_data with field FIELDNAME
so the internal table would be as ,
begin of it_data occurs 0,
fieldname like dd03l-fieldname,
end of it_data.
the flow logic for the screen (say 1000) would be as.
PROCESS BEFORE OUTPUT.
MODULE STATUS_1000.
loop with control 1000_tc.
MODULE SHOW_TABLINE_TC.
endloop.
PROCESS AFTER INPUT.
MODULE EXIT at exit-command.
FIELD TABNAME
MODULE GET_FIELD on request.
loop with control TC.
endloop.
the PBO modules would be as..
&----
*& Module STATUS_1000 OUTPUT
&----
text
----
MODULE STATUS_1000 OUTPUT.
set titlebar 'T1000'. " your titlebar
set pf-status '1000_STAT'. " your status
ENDMODULE. " STATUS_1000 OUTPUT
&----
*& Module SHOW_TABLINE_TC OUTPUT
&----
text
----
MODULE SHOW_TABLINE_TC OUTPUT.
read table it_data index tc-current_line.
ENDMODULE. "SHOW_TABLINE_TC OUTPUT
and PAI modules would be like.
&----
*& Module EXIT INPUT
&----
text
----
MODULE EXIT INPUT.
leave program.
ENDMODULE. " EXIT INPUT
&----
*& Module GET_FIELD INPUT
&----
text
----
MODULE GET_FIELD INPUT.
refresh: it_data.
select fieldname from dd03l
into table it_data
where tabname = tabname.
ENDMODULE. " GET_FIELD INPUT
hope this reply suffices ur requirement, if so pls do assign points.
Thanks,
Nivin