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

Two table controls on one screen

Former Member
0 Likes
595

Hi,

I am trying to put two table controls onto one screen. In the flow logic do I simply state both loops right under the other ?

PROCESS BEFORE OUTPUT.

MODULE STATUS_.

MODULE init_.

Loop gl_table1 at gl_structure1

WITH CONTROL tc_table1

CURSOR tc_table1-current_line.

.....

Endloop.

Loop gl_table2 at gl_structure2

WITH CONTROL tc_table2

CURSOR tc_table2-current_line.

.....

Endloop.

PROCESS AFTER INPUT.

Loop gl_table1 at gl_structure1.

.....

Endloop.

Loop gl_table2 at gl_structure2.

.....

Endloop.

MODULE user_command_.

Because I am doing it as above and its telling me that the structure of the first table control is unknown.

Any help would be appreciated.

Thnx

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
474

The only restriction is that table control should appear in the same order in screen dynpro and in flow logic.

Of course internal table and control definition must be in a part of the program accessible, like a TOP include.

But that has no relation with the fact that there are two table controls, and that is not the cause of your problem.

Press F1 on [LOOP - WITH CONTROL|http://help.sap.com/abapdocu/en/DYNPLOOP.htm] statement :

* PBO
LOOP AT gl_table1 INTO gl_structure1 WITH CONTROL tc_table1 CURSOR tc_table1-current_line. 
* ...
ENDLOOP. 
LOOP AT gl_table2 INTO gl_structure2 WITH CONTROL tc_table2 CURSOR tc_table2-current_line.
* ...
ENDLOOP.
* PAI
LOOP AT gl_table1 INTO gl_structure1 
* ...
ENDLOOP. 
LOOP AT gl_table2 INTO gl_structure2.
* ...
ENDLOOP.

Regards,

Raymond

Hi,

I am trying to put two table controls onto one screen. In the flow logic do I simply state both loops right under the other ?

PROCESS BEFORE OUTPUT.

MODULE STATUS_.

MODULE init_.

Loop gl_table1 at gl_structure1

WITH CONTROL tc_table1

CURSOR tc_table1-current_line.

.....

Endloop.

Loop gl_table2 at gl_structure2

WITH CONTROL tc_table2

CURSOR tc_table2-current_line.

.....

Endloop.

PROCESS AFTER INPUT.

Loop gl_table1 at gl_structure1.

.....

Endloop.

Loop gl_table2 at gl_structure2.

.....

Endloop.

MODULE user_command_.

Because I am doing it as above and its telling me that the structure of the first table control is unknown.

Any help would be appreciated.

Thnx

2 REPLIES 2
Read only

RaymondGiuseppi
Active Contributor
0 Likes
475

The only restriction is that table control should appear in the same order in screen dynpro and in flow logic.

Of course internal table and control definition must be in a part of the program accessible, like a TOP include.

But that has no relation with the fact that there are two table controls, and that is not the cause of your problem.

Press F1 on [LOOP - WITH CONTROL|http://help.sap.com/abapdocu/en/DYNPLOOP.htm] statement :

* PBO
LOOP AT gl_table1 INTO gl_structure1 WITH CONTROL tc_table1 CURSOR tc_table1-current_line. 
* ...
ENDLOOP. 
LOOP AT gl_table2 INTO gl_structure2 WITH CONTROL tc_table2 CURSOR tc_table2-current_line.
* ...
ENDLOOP.
* PAI
LOOP AT gl_table1 INTO gl_structure1 
* ...
ENDLOOP. 
LOOP AT gl_table2 INTO gl_structure2.
* ...
ENDLOOP.

Regards,

Raymond

Read only

MarcinPciak
Active Contributor
0 Likes
474

Check [Using Multiple Table Controls In One Screen|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/9771] [original link is broken] [original link is broken] [original link is broken];.

Regards

Marcin