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

Problem in module pool

Former Member
0 Likes
2,114

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..........

4 REPLIES 4
Read only

Former Member
0 Likes
1,062

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.

Read only

Former Member
0 Likes
1,062

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.

Read only

Former Member
0 Likes
1,062

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.

Read only

Former Member
0 Likes
1,062

issue resolved ...thanks for your reply..........