5 Module Programming - I
5 Module Programming - I
Introduction
Collection of ABAP language entities that drive a transaction. Allows user interaction
Components of program
Processing logic Screens Flow logic
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
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
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)
Thank You