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

Table control:screen painter(Module Pool)

Former Member
0 Likes
1,106

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
822

Hi Dharma,

Just Check By Using,

Loop with Control Table control.

endloop.

Just follow the Link for Syntax,

http://sap.niraj.tripod.com/id29.html

7 REPLIES 7
Read only

Former Member
0 Likes
822

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.

Read only

Former Member
0 Likes
822

hi suresh!

now it is show the srror like"unable to interpret "WITH",Possible cause of error.Incorrest spelling orcomma errror".

Thanks

dharma

Read only

Former Member
0 Likes
823

Hi Dharma,

Just Check By Using,

Loop with Control Table control.

endloop.

Just follow the Link for Syntax,

http://sap.niraj.tripod.com/id29.html

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
822

check this

Link:[Example|http://help.sap.com/saphelp_nw04/helpdata/EN/9f/dbac5e35c111d1829f0000e829fbfe/content.htm]

Read only

Former Member
0 Likes
822

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

Read only

Former Member
0 Likes
822

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.

Read only

Former Member
0 Likes
822

Thanks to all !

I got it.

Thanks

Dharma.