‎2006 Aug 07 1:27 PM
I have created a Module Pool Program of type m and name SAPMZxxx. I created a screen for the same , and created a table control on the screen . In the PBO of the screen :
pbo
module status_0010.
loop at itab with control tab_ctl cursor current-line.
endloop.
pai
loop.
endloop.
In module status_0010.
select * from ztest1 into itab.
endselect.
Also specified the itab name while defining the table control and selected the fields for display .
As i created this as module pool ( i dint get a TOP include automatically inserted though ??) , so i added the declarations in the SAPMZxxx .
Now , i created a tcode to run this program with screen . But , I cant see any data in the table control when i run the program through the tcode??
‎2006 Aug 07 1:30 PM
have you debugged and checked if there is any data in itab,
are the names of table control same as that of itab fields
‎2006 Aug 07 1:35 PM
Yes the names are same ...but i put a breakpoint in module status_0010...but it never stops there ..as soon as i give the tcode , it displays the screen with table control and no data in it ,...!!
‎2006 Aug 07 1:43 PM
select * from ztest1 into itab.
endselect.
Above select statement do not call in the PAI status. Instead declare a module(data_fill) at PBO.
write the select statemnt in this module.
PBO
module status_0010.
module data_fill.
loop at itab with control tab_ctl cursor current-line.
endloop.
pai
loop.
endloop.
‎2006 Aug 07 1:44 PM
Hi ,
I hope your declarations is as below..
CONTROLS: tab_ctl TYPE TABLEVIEW USING SCREEN '0010'.
<b>pbo</b>
module status_0010.
loop at itab with control tab_ctl cursor
<i>tab_ctl-current_line.</i>
endloop.
<b>pai</b>
loop at itab .
endloop.
And you have created table control with name tab_ctl,
and with fields of itab.
Regards,
Sreejesh P.
‎2006 Aug 07 1:47 PM
Yes , i have cross checked the declaration and statements ..they are all the same ...I m not sure if it has something to do with a Report type program or a Module pool type ( m) type program ???
When i run the tcode ...it just goes and displays the tab control empty and doesnt stop at the pbo module status_0010??