‎2009 Jun 03 9:52 AM
hi !
Table name :ZDR_MOD.
Internal table:ITAB.
I am doing Custom table control in screen painter.I have done desgin in screen painter,I am not writing any doing in PAI abd PBO. while compiling it showing error like,
"The field "ITAB-MANDT" is not assigned to a loop."LOOP ... ENDLOOP" must appear in PBO and PAI""
Report coding:
EPORT ZDR_PGM_TMP.
tables:zdr_mod.
CONTROLS tc TYPE TABLEVIEW USING SCREEN 100.
data:itab TYPE STANDARD TABLE OF zdr_mod with HEADER LINE.
DATA : flg, "Flag to set the change mode
ln TYPE i. "No. of records
select * from zdr_mod into CORRESPONDING FIELDS OF TABLE ITAB.
call SCREEN 100.
INCLUDE ZDR_PGM_TMP_STATUS_0100O01.
INCLUDE ZDR_PGM_TMP_USER_COMMAND_01I01.
thank in advance
Dharma
‎2009 Jun 03 10:08 AM
Hi Dharma,
Just Check By Using,
Loop with Control Table control.
endloop.
Just follow the Link for Syntax,
‎2009 Jun 03 9:57 AM
Hi Dharma,
you need to give the loop and endloop in the PBO and PAI as like below,
in the PBO,
LOOP AT T_ASSIGNMENT WITH CONTROL tablecontrol
CURSOR tablecontrol-current_line.
endloop.
in the PAI,
loop at t_assignment.
endloop.
‎2009 Jun 03 10:04 AM
hi suresh!
now it is show the srror like"unable to interpret "WITH",Possible cause of error.Incorrest spelling orcomma errror".
Thanks
dharma
‎2009 Jun 03 10:08 AM
Hi Dharma,
Just Check By Using,
Loop with Control Table control.
endloop.
Just follow the Link for Syntax,
‎2009 Jun 03 10:09 AM
check this
Link:[Example|http://help.sap.com/saphelp_nw04/helpdata/EN/9f/dbac5e35c111d1829f0000e829fbfe/content.htm]
‎2009 Jun 03 11:00 AM
hi
try this
in se51
PBO
Module_status_0800.
loop with control itab.
Module fill_itab. -
> Module to do screen modifications in PBO
endloop.
PAI
Module_user_command_0800.
loop with control itab.
Module read_tc. -
> Module to read table control in PAI
endloop.
Regards
‎2009 Jun 03 11:22 AM
Hi,
When a table control is added onto the Screen Painter, it is mandatory that the fields that you have added on from the dictionary be present in your program and is used within a loop...endloop.
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
LOOP AT T_ITAB INTO WA_ITAB WITH CONTROL TABCONTROL1.
MODULE PURCHASEITEM_DETAILS.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP AT T_ITAB.
MODULE USER_COMMAND_0100.
ENDLOOP.
The internal table that you declare will have the same structure as that your table control. So it always loops with respect to the table control.
‎2009 Jun 03 11:40 AM