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

umashankar_poojar
Active Contributor
0 Likes
790

Hi,

I want to create table control in a module pool, i want step by step procedure to follow -to create that without using the wizard. Can any one suggest me where i will get those steps or give me links.

Thank you

Umashankar

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
637

Hi Umashankar,

Check this out.

1) Screen tables

A table can be created in transaction. These tables, when designed on the screen are called as SCREEN TABLES.

These are of two types.

Table Controls and Step loops

These tables are treated as Loops.

2)Features of Table Controls

Data is displayed in the form of table.

Table control gives user the feeling of an actual table.

You can scroll through the table vertically as well as horizontally.

You can select rows and columns.

You can resize the with of columns.

You can have separator lines between rows and columns.

Automatic resizing of the table when the user resizes the window.

You can update information in the table control and it can be updated in the database table by writing code for it.

3)Steps for creating table control

Declaration of table control in module pool program.

Designing of table controls on the screen.

Passing data to table control in flow logic.

4)Declaration of TC in MPP

syntax:

controls <name of table control> type tableview using screen <‘screen no.’>.

5)Designing Table control on screen

Click on Table in Control bar and place it on the screen. You can adjust the length and width of the Table Control.

Name the table control.(same name as given in data declaration).

From dictionary object OR from program fields select the fields and place them in the table control

6)Passing data to table control

Usually transfer of data from program to screen is automatic.

In case of TC, you need to explicitly transfer the data to table control.

ABAP/4 provides Loop statement, which is associated with flow logic to transfer the data.

7)Passing of data contd.

PBO.

Loop at <name of internal table> with control <name of table control> cursor <scroll variable>.

module…….

Endloop.

PAI.

Loop at < name of internal table>.Endloop.

8)Scroll variables

Top_line : the row of table where the screen display starts.

Current_line : the row currently being processed inside a loop.

9)Transfer of data from prg to TC.

With ‘Loop at …’ statement, the first row is placed in the header of internal table.

If any module is specified between Loop and End loop, it will be executed. In this module, generally we will be assigning this internal table fields to table control screen fields.

The row in internal table is transferred to the TC as stated in the ‘Loop at…..’ statement.

The system encounters the ‘Endloop’ statement and control is passed back to the next line of internal table.

In the same way all the records of the internal table are passed to the TC.

Regds,

Younus

<b>Reward Helpful Answers!!!</b>

6 REPLIES 6
Read only

Former Member
0 Likes
638

Hi Umashankar,

Check this out.

1) Screen tables

A table can be created in transaction. These tables, when designed on the screen are called as SCREEN TABLES.

These are of two types.

Table Controls and Step loops

These tables are treated as Loops.

2)Features of Table Controls

Data is displayed in the form of table.

Table control gives user the feeling of an actual table.

You can scroll through the table vertically as well as horizontally.

You can select rows and columns.

You can resize the with of columns.

You can have separator lines between rows and columns.

Automatic resizing of the table when the user resizes the window.

You can update information in the table control and it can be updated in the database table by writing code for it.

3)Steps for creating table control

Declaration of table control in module pool program.

Designing of table controls on the screen.

Passing data to table control in flow logic.

4)Declaration of TC in MPP

syntax:

controls <name of table control> type tableview using screen <‘screen no.’>.

5)Designing Table control on screen

Click on Table in Control bar and place it on the screen. You can adjust the length and width of the Table Control.

Name the table control.(same name as given in data declaration).

From dictionary object OR from program fields select the fields and place them in the table control

6)Passing data to table control

Usually transfer of data from program to screen is automatic.

In case of TC, you need to explicitly transfer the data to table control.

ABAP/4 provides Loop statement, which is associated with flow logic to transfer the data.

7)Passing of data contd.

PBO.

Loop at <name of internal table> with control <name of table control> cursor <scroll variable>.

module…….

Endloop.

PAI.

Loop at < name of internal table>.Endloop.

8)Scroll variables

Top_line : the row of table where the screen display starts.

Current_line : the row currently being processed inside a loop.

9)Transfer of data from prg to TC.

With ‘Loop at …’ statement, the first row is placed in the header of internal table.

If any module is specified between Loop and End loop, it will be executed. In this module, generally we will be assigning this internal table fields to table control screen fields.

The row in internal table is transferred to the TC as stated in the ‘Loop at…..’ statement.

The system encounters the ‘Endloop’ statement and control is passed back to the next line of internal table.

In the same way all the records of the internal table are passed to the TC.

Regds,

Younus

<b>Reward Helpful Answers!!!</b>

Read only

former_member196299
Active Contributor
0 Likes
637

hi Umashankar,

<B><U> Features of Table Controls </U></B>

Data is displayed in the form of table.

Table control gives user the feeling of an actual table.

You can scroll through the table vertically as well as horizontally.

You can select rows and columns.

You can resize the with of columns.

You can have separator lines between rows and columns.

Automatic resizing of the table when the user resizes the window.

You can update information in the table control and it can be updated in the database table by writing code for it.

<B>Steps for creating table control </B>

Declaration of table control in module pool program.

Designing of table controls on the screen.

Passing data to table control in flow logic.

<B> Declaration of TC in modulepool program </B>

syntax:

controls <name of table control> type tableview using screen <‘screen no.’>.

<B> Designing Table control on screen </B>

Click on Table in Control bar and place it on the screen. You can adjust the length and width of the Table Control.

Name the table control.(same name as given in data declaration).

From dictionary object OR from program fields select the fields and place them in the table control

<B> Passing data to table control </B>

Usually transfer of data from program to screen is automatic.

In case of TC, you need to explicitly transfer the data to table control.

ABAP/4 provides Loop statement, which is associated with flow logic to transfer the data.

<B> Passing of data contd. </B>

PBO.

Loop at <name of internal table> with control <name of table control> cursor <scroll variable>.

module…….

Endloop.

PAI.

Loop at < name of internal table>.Endloop.

<B> Scroll variables </B>

Top_line : the row of table where the screen display starts.

Current_line : the row currently being processed inside a loop.

<B> Transfer of data from prg to TC. </B>

With ‘Loop at …’ statement, the first row is placed in the header of internal table.

If any module is specified between Loop and End loop, it will be executed. In this module, generally we will be assigning this internal table fields to table control screen fields.

The row in internal table is transferred to the TC as stated in the ‘Loop at…..’ statement.

The system encounters the ‘Endloop’ statement and control is passed back to the next line of internal table.

just refer....

http://help.sap.com/saphelp_nw04/helpdata/en/d1/801c7b454211d189710000e8322d00/content.htm

http://www.sapgenie.com/abap/controls/htmlviewer.htm

check these sample programs for understannding of table controls and their coding :

DEMO_DYNPRO_TABLE_CONTROL_1 Table Control with LOOP Statement

DEMO_DYNPRO_TABLE_CONTROL_2 Table Control with LOOP AT ITAB

DEMO_INT_TABLES_APPEND Appending Table Lines

DEMO_INT_TABLES_ASSIGNING_FS Accessing an Internal Table Using Field Symbols

DEMO_INT_TABLES_AT_1 Control Level Processing

DEMO_INT_TABLES_AT_2 Control Level Processing

DEMO_INT_TABLES_CLEAR Initializing an Internal Table

I hope all the info provided above will be of great help to you regarding Modulepools and table controls ,

Regards,

Ranjita

Read only

Former Member
Read only

Former Member
0 Likes
637

U need to <b><u>award points for all the useful replies</u></b>, and also u nees to <b><u>mark it as Answered if ur problem is solved</u></b>.

Regards

Sudheer

Read only

Former Member
0 Likes
637

hi,

here is a step by step example. you can learn by following the steps:

http://www.planetsap.com/online_pgm_main_page.htm

Check out these demo programs

RSDEMO_TABLE_CONTROL

DEMO_DYNPRO_TABLE_CONTROL_1

DEMO_DYNPRO_TABLE_CONTROL_2

Check

http://www.sap-img.com/ab031.htm

through this link

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

table control scrolling:

Read only

umashankar_poojar
Active Contributor
0 Likes
637

Thank you all,