23-Dialog Module Pool Programming
23-Dialog Module Pool Programming
SCREEN
It is a visible layout which is displayed in the output. The components of the Screen are
Components of Screen:
MODULE:
Flow-Logic cannot understand ABAP statements. So the entire ABAP code is written in
the form of modules.
Since the entire abap logic is divided in the form of modules, that is why it is called
MODULE POOL PROGRAMMING
Provide a program name ZSAPN_HELLO_WORLD (same name as given above), select create
with top include check box and enter.
Go to change mode, double click on program name, uncomment all include programs, double
click on each include and create (TIP- Just double click on each include enter, enter, save in local
object, save, back(F3)) .Now to double click on program name, right click , activate.
The layout will be like below, drag and drop Text Field element on to screen area.
Save, close windows, go to flow logic, double click on each module and add below code.
Double click on menu name and title to create GUI status for the program...checkout creating a
custom menu in SAP to create menu.
Double click on program name, right click, activate.
To execute a module pool program we need to create a t-code, to create a t-code right click on
program name, create, transaction.
Expand program, double click on top include and add below code.
Module Pool layout designer will open, click on 'Dictionary/Program fields icon' (see below
image), a popup will open, provide name as WA_MARA, click on 'Get from program', select all
rows and enter.
Move mouse cursor on layout and place the form in suitable position.
Now click on text icon, put it before any input field and enter text.
Insert button, provide text as 'Get Data', double click, provide a name , fct code, enter and close.
Save and Activate.
Now go to t-code ZSAPN_MAT_MPP, provide a material no and click on get data button, it will
get output.