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

Module Pool

Former Member
0 Likes
694

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??

5 REPLIES 5
Read only

Former Member
0 Likes
665

have you debugged and checked if there is any data in itab,

are the names of table control same as that of itab fields

Read only

0 Likes
665

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 ,...!!

Read only

Former Member
0 Likes
665

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.

Read only

Former Member
0 Likes
665

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.

Read only

0 Likes
665

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??