Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

table control

Former Member
0 Likes
379

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.

2 REPLIES 2
Read only

Former Member
0 Likes
352

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

Read only

nivin_varkey
Active Participant
0 Likes
352

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