Application Development 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: 

about module pool prog

Former Member
0 Kudos
81

can you help me out in providing a general concept on module pool prog. just a general understanding and how to go about

1 ACCEPTED SOLUTION

Former Member
0 Kudos
56

hi,

module pool programming works like this.

screens[layout] + flow logic [code] = dynpro

screens: the layout structure for screens in module pool is done here. while designing screens we ll give function codes for all screen fields so that that items can be recognized by system at runtime because of function codes only.

flow logic: all actual code for module pool programs are written here. it mainly contains two events.

1. PBO [process before output.]

2. PAI [ process after input ]

PBO: in this event all validations are done are displaying o/p screen to the user. we can done validations in two levels.

1. in screen level validations [ while designing screens we have some options like only for input, mandatory fields,....................]

2. in flow logic also same valdations can be done.

for ex: a screen has a field name suresh which should not be empty then in flow logic we write as

PBO

if screen-name = 'suresh'.

screen-required = 1.

modify screen.

endif.

for no. of fields we ll use loop ......end loop st.

screen is table which contains fields like name of field, input required, for o/p only...............

u can see this screen table while debugging module pool program as put a break point in screen and check it in tables part of debugging. then u can see all fields of screen

PAI: generally in this event we ll write code for screen after the screen is displayed for user. generally navigations from one screen to another , displaying info to user all done in this event only.

for ex:

case sy-ucomm.

when 'disp' .

select * . ........................

when 'call'.

call screeen 200.

when 'exit'.

leave program.

.......................

endcase.

POV: it is triggered when user clicks on F4 button on a screen field.

POH: it is triggered when user clicks on F1 button on a screen field..

if useful reward some points.

with regards,

suresh.

in module pool programming we have 4 events

1. PBO

2.PAI

3.POH

4.POV

8 REPLIES 8

Former Member

0 Kudos
56

hi naren,

what i basically want to do is that when i click a push button then i should get a message on the text box and i should get the logo on the screen. how to do it.

Former Member
0 Kudos
56

HI,

Module pools are directly created using the ABAP Editor and are introduced with the PROGRAM statement. With the exception of reporting event blocks and function modules, module pools can contain all processing blocks supported in ABAP and as many local classes as required. While they are executed, all events of the ABAP runtime environment may be triggered.

The most important technical attribute of a module pool is that it can only be controlled using screen flow logic. You must start them using a transaction code, which is linked to the program and one of its screens (initial screen). Another feature of these programs is that you must define your own screens in the Screen Painter (although the initial screen can be a selection screen).

When you start a program using a transaction code, the runtime environment starts a processor that calls the initial screen. This then calls a dialog module in the corresponding ABAP program. The remainder of the program flow can take any form. For example, the dialog module can:

· return control to the screen, after which the processing passes to a subsequent screen. Each screen has a following screen, set either statically or dynamically. Screens and their subsequent screens are components of freely definable screen sequences.

· call other screen sequences, selection screens or lists, from which further processing blocks in the ABAP program are started.

· call other processing blocks itself, either internally or externally.

· call other application programs using CALL TRANSACTION or SUBMIT.

It is appropriate to use module pools when you write dialog-oriented programs using a large number of screens whose flow logic largely determines the program flow of screen sequences.

rgds,

bharat.

Former Member

gopi_narendra
Active Contributor
0 Kudos
56

tcode : ABAPDOCU and DWDM will also help u abt the sample program in module pool programs.

Regards

Gopi

Former Member
0 Kudos
57

hi,

module pool programming works like this.

screens[layout] + flow logic [code] = dynpro

screens: the layout structure for screens in module pool is done here. while designing screens we ll give function codes for all screen fields so that that items can be recognized by system at runtime because of function codes only.

flow logic: all actual code for module pool programs are written here. it mainly contains two events.

1. PBO [process before output.]

2. PAI [ process after input ]

PBO: in this event all validations are done are displaying o/p screen to the user. we can done validations in two levels.

1. in screen level validations [ while designing screens we have some options like only for input, mandatory fields,....................]

2. in flow logic also same valdations can be done.

for ex: a screen has a field name suresh which should not be empty then in flow logic we write as

PBO

if screen-name = 'suresh'.

screen-required = 1.

modify screen.

endif.

for no. of fields we ll use loop ......end loop st.

screen is table which contains fields like name of field, input required, for o/p only...............

u can see this screen table while debugging module pool program as put a break point in screen and check it in tables part of debugging. then u can see all fields of screen

PAI: generally in this event we ll write code for screen after the screen is displayed for user. generally navigations from one screen to another , displaying info to user all done in this event only.

for ex:

case sy-ucomm.

when 'disp' .

select * . ........................

when 'call'.

call screeen 200.

when 'exit'.

leave program.

.......................

endcase.

POV: it is triggered when user clicks on F4 button on a screen field.

POH: it is triggered when user clicks on F1 button on a screen field..

if useful reward some points.

with regards,

suresh.

in module pool programming we have 4 events

1. PBO

2.PAI

3.POH

4.POV

0 Kudos
56

hi suresh,

i want to display a logo on my screen when i click the push button and i want to have some thing written in the text element.

how to do this?