‎2009 Apr 10 11:15 AM
Hello,
I am creating table control using screen painter.
I am getting the following error.
"LOOP" cannot be assigned to any field.
This is my flow logic.
PROCESS BEFORE OUTPUT.
MODULE STATUS_1001.
LOOP WITH CONTROL ZSGMAT_TAB.
MODULE FILLTAB.
ENDLOOP.
*
PROCESS AFTER INPUT.
MODULE CANCEL AT EXIT-COMMAND.
LOOP WITH CONTROL ZSGMAT_TAB.
MODULE READ_TABLE_CONTROL.
ENDLOOP.
MODULE USER_COMMAND_1001.
I have declared table control in abap program in this way.
CONTROLS ZSGMATTAB_ TYPE TABLEVIEW USING SCREEN 1001.
‎2009 Apr 10 12:23 PM
hi,
Try this,
PROCESS BEFORE OUTPUT.
MODULE STATUS_0301.
LOOP AT GT_VBAK INTO WA_VBAK WITH CONTROL TABLE_CTRL CURSOR
TABLE_CTRL-CURRENT_LINE.
MODULE MOVE_CORRES.
ENDLOOP.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0301.
LOOP AT GT_VBAK.
MODULE MOVE_CORRES_VBAK .
ENDLOOP.
Regards,
R K.
‎2009 Apr 10 7:38 PM
Hi,
For another thing, you do not LOOP at control in the PAI.
Refer the link [Table Controls|http://help.sap.com/saphelp_47x200/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/frameset.htm]for more information.
PBO:
LOOP AT <internal table> CURSOR <scroll-var>
[WITH CONTROL <table-control> ]
[FROM <line1> ] [TO <line2> ].
...<actions>...
ENDLOOP.PAI:
LOOP AT <internal table>.Cheers,
Aditya
Edited by: Aditya Laud on Apr 10, 2009 8:38 PM
‎2009 Apr 13 6:20 AM
Hi!
loop into the internal table with control name.
PROCESS BEFORE OUTPUT.
MODULE STATUS_1001.
LOOP at <internal table> into <work area> WITH CONTROL ZSGMAT_TAB.
MODULE FILLTAB.
ENDLOOP.(the internal table to be used in loop in pai and pbo is the table whose fields u want to pass in the screen and back to program in pai )
PROCESS AFTER INPUT.
MODULE CANCEL AT EXIT-COMMAND.
LOOP at <internal table>.
MODULE READ_TABLE_CONTROL.
ENDLOOP.
MODULE USER_COMMAND_1001.Edited by: Richa Tripathi on Apr 13, 2009 7:20 AM
‎2009 Apr 13 7:16 AM
Well I got the data in my table but I am not able to get vertical scrollbar active though I have check the
boxes on the table control attributes