‎2009 Jan 20 2:33 PM
Dear All,
I am developing a module pool program. In that I want to show one internal table in table control.
For that I have exclusively made one Z structure which includes all the fields(also in one internal table) to be displayed in Table Control
So , In table control, I dragged the fields using 'From Dictionary' . And gave Heading to all columns...
But when I check it , it gives the syntax error
The field ZSTR_FIELD1 is not assigned to a loop. "LOOP...ENDLOOP" must appear in PBO and PAI
Though I have written in PBO :-
PROCESS BEFORE OUTPUT.
MODULE STATUS_9000.
LOOP AT IT_DATA WITH CONTROL CNTL CURSOR CNTL-CURRENT_LINE.
MODULE FILL_TABLE_CONTROL.
ENDLOOP.
In module MODULE FILL_TABLE_CONTROL , i am populating that ZSTR from internal table IT_DATA
What could be the error ?
Any suggestions please.........
Thanks..........
‎2009 Jan 20 2:38 PM
For table control you should assign internal table fields, your it_data fields. Since it has a header line you need not have a structure.
‎2009 Jan 20 2:38 PM
hi,
the Loop and endloop mustt appear in PBO & PAI
PROCESS BEFORE OUTPUT.
* PBO flow logic for tablecontrol 'VAL_BENE_MAINT'
MODULE val_bene_maint_init.
LOOP AT g_val_bene_maint_itab
INTO g_val_bene_maint_wa
WITH CONTROL val_bene_maint
CURSOR val_bene_maint-current_line.
* Module to move data to the Table control
MODULE val_bene_maint_move.
* Module to get total line displayed
MODULE val_bene_maint_get_lines.
* Module to decide the Display/Hide characteristics on screen '0110'
MODULE display_tab.
ENDLOOP.
PROCESS AFTER INPUT.
* PAI flow logic for tablecontrol 'VAL_BENE_MAINT'
LOOP AT g_val_bene_maint_itab.
CHAIN.
FIELD zval_benefit-zbranch.
FIELD zval_benefit-zcategory.
FIELD zval_benefit-zdays.
FIELD zval_benefit-zdisccode.
FIELD zval_benefit-zpercent.
MODULE val_bene_maint_modify ON CHAIN-REQUEST.
ENDCHAIN.
FIELD g_val_bene_maint_wa-flag
MODULE update_flag ON REQUEST.
ENDLOOP.
* Module for scorlling,Select All & Deselect All on the table contol
MODULE val_bene_maint_user_command.
* Module for processing User command
MODULE user_command_0110.
‎2009 Jan 20 2:41 PM
or try this
PROCESS BEFORE OUTPUT.
MODULE STATUS_9000.
LOOP AT IT_DATA into zstr WITH CONTROL CNTL CURSOR CNTL-CURRENT_LINE.
MODULE FILL_TABLE_CONTROL.
ENDLOOP.
‎2009 Jan 22 11:43 AM