2009 Aug 19 2:55 PM
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
2009 Aug 19 3:01 PM
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
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
2009 Aug 19 3:01 PM
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
2009 Aug 19 3:06 PM
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
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |