‎2010 Jan 05 11:11 AM
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
‎2010 Jan 05 11:27 AM
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.
‎2010 Jan 05 11:17 AM
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]
‎2010 Jan 05 11:24 AM
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
‎2010 Jan 05 11:27 AM
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.
‎2010 Jan 05 12:22 PM
Hi Chandra,
Why not use the table control wizard when it is available, please try to use it.
Regards,
Abhijit G. Borkar