Skip to Content
0
Former Member
Sep 11, 2007 at 09:38 AM

About table control

21 Views

Hi all,

I have create a report program, and I call a screen in it:

AT SELECTION-SCREEN.

CALL SCREEN 100.

In the screen 100, I create a table control.

PROCESS BEFORE OUTPUT.

MODULE get_data. " Get data to table it_tab

LOOP AT it_tab TO wa_tab WITH CONTROL tc_ctrl.

MODULE populate_screen.

ENDLOOP.

MODULE populate_screen OUTPUT.

DATA: ld_line TYPE i.

IF sy-stepl = 1.

tc_ctrl-lines = tc_ctrl-top_line + sy-loopc - 1.

ENDIF.

MOVE-CORRESPONDING wa_tab TO ztc_tab.

ENDMODULE. " populate_screen OUTPUT

ztc_tab is the table I used in the table control, but when I check the screen, there is an error message 'The field 'ZTC_TAB-SEL' is not assigned to a loop. 'LOOP...ENDLOOP' must appear in 'PBO' and 'PAI''. I don't know why, can anyone tell me ? Many thanks!