0% found this document useful (0 votes)
68 views

Module Programming

This document provides an overview of module programming in ABAP. It discusses how module pool programs allow for user interaction through screens and flow logic. Key points include: 1) Module pool programs are identified by a program type of 'M' and can contain processing logic, multiple screens, and flow logic to control screen navigation and processing. 2) Screens are created using the screen painter (SE51) and can be normal screens, subscreens, or dialog boxes. 3) Flow logic events like PBO, PAI, POV, and POH control screen initialization, response to user input, value requests, and help requests. 4) The PF-STATUS and OK_CODE system fields
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views

Module Programming

This document provides an overview of module programming in ABAP. It discusses how module pool programs allow for user interaction through screens and flow logic. Key points include: 1) Module pool programs are identified by a program type of 'M' and can contain processing logic, multiple screens, and flow logic to control screen navigation and processing. 2) Screens are created using the screen painter (SE51) and can be normal screens, subscreens, or dialog boxes. 3) Flow logic events like PBO, PAI, POV, and POH control screen initialization, response to user input, value requests, and help requests. 4) The PF-STATUS and OK_CODE system fields
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Module Programming

Overview
Introduction

Collection of ABAP language entities that drive a


transaction.
Allows user interaction
Define Module Pool Program

Creating a module pool program

Enter the Module Pool name in the Program name and Click
Create
This is similar to creating an ordinary report except that the
program type should be M ( Module Pool )
Define Module Pool
Define Module Pool
Components of program

Processing logic
Screens
Flow logic
Creating the screens

Screens have to be created in the screen painter (Workbench Tool )

TCODE : SE51 (Screen Painter)

A module pool program can have more than One screen attached to it.

The type of screens are Normal, Sub screen, Dialog box ( flow logic )
Creating Screens
Flow logic
Flow Logic Events
Flow logic describes how the
program reacts to the user
interactions

Process before output (PBO)


Process after input (PAI)
Process on value request (POV)
Process on help request (POH)

Flow logic of a screen drives the


processing sequence for that
particular screen
Process Before Output (PBO)

Generally used to initialize screen fields

Flow logic
PROCESS BEFORE OUTPUT.
MODULE init_request.

Processing logic
MODULE init_request OUTPUT.
SET PF-STATUS STA.
ENDMODULE.
Menu Painter

PF-STATUS ( Menu Painter )


TCODE: SE 41

The GUI Status of the screen can be set by the command


SET PF-STATUS <name of the status>

Different GUI statuses can refer to common components

A program can have many GUI statuses and titles


Adding menu

The code is stored in the sy-ucomm (system field) of AT


USER-COMMAND event
Process After Input (PAI)

Processed after User interactions either function, a pushbutton or a


function key

Flow logic
PROCESS AFTER INPUT.
MODULE user_command.

Processing logic
MODULE user_command INPUT.
CASE ok_code.
WHEN BACK.
LEAVE TO SCREEN 0.
.. ENDCASE
ENDMODULE
Ok_code

Type C of length 4 (declared in the processing logic)

The name should be specified in the field list of the


screen (OK)

Stores the function code of the button selected in the


screen during the runtime of the program (The
function code is specified in the attributes of the
buttons while creating a screen)

You might also like