Friday 13 March 2015

Dialog Programming/Module Pool/Transactions Programming

The general definition of Module Pool is Module pool is the pool of modules. It can be used for Screen, Info types, Program, Dialog etc... It is mainly used for Screens. We call various modules in PBO and PAI depending upon the requirements.



We can create many no. of screens for one Main program.
Main program: In this we can do any Declaration, Data Selection, Calculations (or) Validations done in main program.
Screen: It is a GUI component where users gives an input and see output.
Flow logic: It is an interface between main program and screen.
Flow logic + screen = Dynamic program.


Tcode for Screen painter is SE 51.

TIP: To get fields disable in output screen for that click on check box “output only” In attributes.
TIP: To make module pool screen field as mandatory for that click on check box I “REQUIRED” In attributes.

Module pool program EVENTS
  • PROCESS BEFORE OUTPUT (PBO)
  • PROCESS AFTER INPUT (PAI)
  •  PROCESS ON VALUE-REQUEST (POV)
  • PROCESS ON HELP REQUEST (POH)

NOTE: Events of module pool is screen specific.


Table control: It’s a screen element to display internal table data. Data is displayed in the form of table.
Table control gives user the feeling of an actual table.
You can scroll through the table vertically as well as horizontally.
You can select rows and columns.
You can resize with of columns.
You can have separator lines between rows and columns.
Declaration syntax:
Controls type table view using screen <‘screen no.’>.



Flow logic syntax
PBO.
Loop at with control cursor.
Module…….
End loop.
PAI.
Loop at < name of internal table>.End loop.
Scroll variables
Top_line: the row of table where the screen display starts.

Current_line: the row currently being processed inside a loop.

NOTE:  In module pool program internal table database declaration will work only ‘with header line’; we can’t declare parameters, select-options.


Sub Screens: It is a screen to display the data, but sub screen appears only when user perform any action on screen. E.g. pushbutton, radio button etc....


NOTE: Sub screens must call into sub screen area in normal screen and it will not navigate to another screen like normal screen.



Flow logic syntax:
PROCESS BEFORE OUTPUT.
  CALL SUBSCREEN: INCLUDING sy-cprog ,
                       INCLUDING sy-cprog ,
                   INCLUDING sy-cprog .

PROCESS AFTER INPUT.

  CALL SUBSCREEN: ,,.


In PBO of main screen
CALL SUBSCREEN sub1 INCLUDING SY_REPID 'pie chart screen no'.
CALL SUBSCREEN sub2 INCLUDING SY-REPID 'bar grph screen no'.

In PAI of main screen
CALL SUBSCREEN sub1.
CALL SUBSCREEN sub2.



Tab Strip: In screen we should have minimum two tab strips.






No comments:

Post a Comment