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
1,383

Hai how to fetch the data into the Table Control?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
738

Hi ,

Check this sample programs

<a href="http://www.planetsap.com/online_pgm_main_page.htm">http://www.planetsap.com/online_pgm_main_page.htm</a>

<a href="http://sap.niraj.tripod.com/id29.html">http://sap.niraj.tripod.com/id29.html</a>

<a href="http://www.sapdevelopment.co.uk/dialog/tabcontrol/tc_basic.htm">http://www.sapdevelopment.co.uk/dialog/tabcontrol/tc_basic.htm</a>

Regards,

Raghav

7 REPLIES 7
Read only

gopi_narendra
Active Contributor
0 Likes
738

see the examples related to Table Control in SE38

demo_dynpro_tabcont_loop

demo_dynpro_tabcont_loop_at

or look in transaction DWDM

RSDEMO_TABLE_CONTROL

Regards

- Gopi

Read only

0 Likes
738

Please find the code sample:

From Program : DEMO_DYNPRO_TABCONT_LOOP_AT

Read only

Former Member
0 Likes
738

LOOP AT <internal table> CURSOR <scroll-var>

[WITH CONTROL <table-control> ]

[FROM <line1> ] [TO <line2> ].

...<actions>...

ENDLOOP.

This form of LOOP loops through the internal table, performing <actions> for each row. For each internal table row, the system transfers the relevant program fields to or from the corresponding screen table row.

Have a look at below links. It will help you.

http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac5135c111d1829f0000e829fbfe/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/content.htm

Best Regards,

Vibha

*Please mark all the helpful answers

Read only

Former Member
0 Likes
739

Hi ,

Check this sample programs

<a href="http://www.planetsap.com/online_pgm_main_page.htm">http://www.planetsap.com/online_pgm_main_page.htm</a>

<a href="http://sap.niraj.tripod.com/id29.html">http://sap.niraj.tripod.com/id29.html</a>

<a href="http://www.sapdevelopment.co.uk/dialog/tabcontrol/tc_basic.htm">http://www.sapdevelopment.co.uk/dialog/tabcontrol/tc_basic.htm</a>

Regards,

Raghav

Read only

Former Member
0 Likes
738

hi

good

go through this link which ll give you complete idea about the table control

http://www.sapdevelopment.co.uk/dialog/tabcontrol/tc_basic.htm

http://answers.yahoo.com/question/index?qid=20061119065350AA3mZZl

thanks

mrutyun^

Read only

Former Member
0 Likes
738

Hi,

In PBO of the Module-pool program,

SELECT * FROM <TABLE NAME> INTO TABLE ITAB WHERE <CONDITION>.

MOVE-CORRESPONDING ITAB TO <TABLE NAME>.

Note:- This code works fine, if you have inserted DB table fields in your table control, if u r using internal table in your table control then dont use MOVE-CORRESPONDING statement.

Cheers...

Santosh.

Mark ALL Usefull Answers

Read only

Former Member
0 Likes
738

to fill the data into table control use the foll code .

first u declare a variable of type tableview inthe foll manner.

controls: tc_tabcontrol type tableview using <screen no> .

then in ur program write the foll code .

loop with control tc_tablecontrol .

in this loop u can fill the structure of ur table control .

to read from internal table use tc_tablecontrol-current line in the index option

and fill ur structure

endloop .

to read data from table control .

loop with control tc_tablecontrol .

in this loop u can read ur table control .

like-wise use tc_tablecontrol-current line in this loop to read a line

endloop .