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

Getting Error when createing Table control in Module Pool.

Former Member
0 Likes
1,398

Hi expert ,

i am creating a module pool program . i want to crate line item value for that i have created table control on screen 200 .

but when i am activation to that giving error below mention.

The field "ZFBDCHALLAN-EBELN" is not assigned to a loop. "LOOP ...ENDLOOP" must appear in "PBO" and "PAI".

thanks

chandra

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
811

hi

You have declare table control in pgm.

CONTROLS:tc TYPE TABLEVIEW USING SCREEN 1002.

in modul programming.

PBO

LOOP AT lt_ekko INTO lw_ekko WITH CONTROL tc.

ENDLOOP.

PAI

LOOP AT lt_ekko.

ENDLOOP.

4 REPLIES 4
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
811

to copy the screen data between program and screen we need to code a LOOP statement in both PBO and PAI events

for each table in the screen.

Please go through the basics of creating a table control.

link:[http://www.sapmaterial.com/tablecontrol_sap.html]

Read only

Former Member
0 Likes
811

Its mandatory to have loop endloop in both events

PBO and PAI

loop your internal table similarly.

Please check it should be below format



PROCESS BEFORE OUTPUT.
* Set PF Status for screen 100.
  MODULE status_0200.

* This module will initialize the field
  MODULE init_0100.

  LOOP AT t_custmat_asg INTO w_custmat_asg
      WITH CONTROL tc_1
      CURSOR tc_1-current_line.
* It will count the record in internal table
    MODULE set_linecount.
* Screen Modifications
    MODULE status_check.
  ENDLOOP.

PROCESS AFTER INPUT.
* Module AT EXIT-COMMAND
  MODULE exit_0200 AT EXIT-COMMAND.

  LOOP AT t_custmat_asg .
    CHAIN.
      FIELD :
      w_custmat_asg-check,
              w_custmat_asg-kunnr,
              w_custmat_asg-name1,
              w_custmat_asg-asgtyp,
              w_custmat_asg-productcls,
              w_custmat_asg-sctegry,
              w_custmat_asg-ctegry,
              w_custmat_asg-parent,
              w_custmat_asg-frmdate,
              w_custmat_asg-todate,
              w_custmat_asg-frecster,
              w_custmat_asg-salesrep,
              w_custmat_asg-flag,
              w_custmat_asg-username,
              w_custmat_asg-udate.
* Validation For Forecaster.
      MODULE validate_forecaster.
* Validation For Salesrep.
      MODULE valiate_salesrep.
* Validation for Customer
      module validate_customer.
* Validate null value
      module validate_null_vals.
* Validation For Data Changed On The Screen
      MODULE data_changed_0200 ON CHAIN-REQUEST.
    ENDCHAIN.
  ENDLOOP.


Regards

Satish Boguda

Read only

Former Member
0 Likes
812

hi

You have declare table control in pgm.

CONTROLS:tc TYPE TABLEVIEW USING SCREEN 1002.

in modul programming.

PBO

LOOP AT lt_ekko INTO lw_ekko WITH CONTROL tc.

ENDLOOP.

PAI

LOOP AT lt_ekko.

ENDLOOP.

Read only

Former Member
0 Likes
811

Hi Chandra,

Why not use the table control wizard when it is available, please try to use it.

Regards,

Abhijit G. Borkar