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 error

Former Member
0 Likes
1,091

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.

4 REPLIES 4
Read only

Former Member
0 Likes
777

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.

Read only

Former Member
0 Likes
777

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

Read only

Former Member
0 Likes
777

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

Read only

Former Member
0 Likes
777

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