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

table control

Former Member
0 Kudos

Hello Experts ,

I am using Tablecontrol . Is it necessary to bring the data in internal table then transfer it to tablecontrol . Is it possible to dirctly show the records from databse table .

I am not clear with Loop statements used in pbo and pai module . Pls help me

Thanks in advance .

9 REPLIES 9

ferry_lianto
Active Contributor
0 Kudos

H Raghavendra,

Please check this links for sample code and on how to setup table control using screen painter.

http://m2.aol.com/skarkada/sap/table_control/table_control.htm

http://www.sapfans.com/sapfans/repos/comelite.htm

Hope this will help.

Regards,

Ferry Lianto

Former Member
0 Kudos

HI

THE FOLLOWING LINKS EXPLAINS TABLE CONTROL IN DETAIL PLEASE GO THROUGH THE LINKS

<a href="http://72.14.203.104/search?q=cache:MZuyQ_s3WKsJ:m2.aol.com/skarkada/sap/table_control/table_control.htmtablecontrol+ABAP&hl=en&gl=in&ct=clnk&cd=1">TABLE CONTROL</a>

<a href="http://www.geocities.com/SiliconValley/Campus/6345/contro02.htm">ABAP/4 table control</a>

REGARDS

ANOOP

Former Member
0 Kudos

Raghavendra,

Suggest you to use a ALV Grid Control than a table control.

Regards,

Ravi

Former Member
0 Kudos

hi Raghavendra,

**I am using Tablecontrol . Is it necessary to bring the data in internal table then transfer it to tablecontrol .

Yes, if you want to process your table control programmatically then you have to follow this approach.

    • Is it possible to dirctly show the records from databse table .

yes , u can do this by using a table control wizards

    • am not clear with Loop statements used in pbo and pai module

It is simple , just try to understand the concept of the same .

Say you hava an internal table ITAB which contains 10 record and you want to show all this record in a table control.

In that case in PBO.

You will use the loop on ITAB and display all the fields in the Table control.

Why in PAI ?.

Say in the table control if user made any changes or say there are n numbers of scenario .In that case you again have to loop the ITAB for further processing.

You can check out the simple program 'DEMO_DYNPRO_TABCONT_LOOP_AT'.

This will clear your points.

Hope this will help you.

Cheers

Sunny

Rewrd points, if found helpful

Former Member
0 Kudos

Hi,

--If you are doing Module pool programming there to display the information as table view we need to display using

Table Control.

Table control is a type of screen table which you can add to a screen in the Screen Painter.

---The following statement loops through an internal table and a screen table in parallel.

LOOP AT <internal table>.

In particular, LOOP AT loops through the portion of the internal table that is currently visible in the screen. You can use this form of the LOOP statement for both table controls and step loops.

The complete syntax for this form of the LOOP statement is:

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.

thanks,

PRamod

0 Kudos

hi...

one more point is there..

In PBO data is transfered from screen to ABAP...

loop at itab using tablecontrol.

endloop.

In PAI data is transfered from ABAP to screen...

loop at itab.

endloop.

things work automatically as u linked the table control to ITAb...

loop are required becoz Screen itself is a header line...so to display data u have to make loops...so that control go from PBO to PAI and vice versa..n data will be displayed...

hopes thing ll strike ur mind...carry on..

regards.

Former Member
0 Kudos

Hi raghavendra,

As per form etiquette's

If you are satisfied , please close the thread by rewarding appropriate points to the helpful answers.

Cheers

Sunny

Former Member
0 Kudos

Hi,

I suggest you to go by Ravikumar's idea.

But if you still wanna to use table control then,

1. GO TO transaction DWDM

2. Expand the Control folder

3. Check the node "Table Control'.

Will help you a lot, not only for table control but for all other controls.

Regs,

Venkat Ramanan

Message was edited by: Venkat Ramanan Natarajan