Skip to main content

Module pool program can be called dialog programming

SAP-ABAP supports two types of programs - Report Program and Dialog Program. Module pool program can be called dialog programming. If ABAP program demands user input, Dialog programming is used.
Module pool program has different modules which contains different logic for different screen. Any number of screens can be developed by module pool programming. Every screen has a logic which runs at the back end. Module pool program can be executed by Transaction Code only.
Difference between Report and Dialog Programs
Report Program:
A report is a program that typically reads and analyzes data in database tables without changing the database.
Dialog Program:
A dialog program allows you to work interactively with the system and to change the contents of the database tables. Each dialog program has a certain sequence of screens that are processed by the system one after the other.

The Toolset

The components of a dialog program are:
1) Transaction code
  • The transaction code starts a screen sequence.
  • You create transaction codes in the Repository Browser in the ABAP Workbench or using Transaction SE93.
  • A transaction code is linked to an ABAP program and an initial screen.
  • You can start a screen sequence from any ABAP program using the CALL SCREEN statement.
 2) Screens
  • Each dialog in an SAP system is controlled by one or more screens.
  • You create screens using the Screen Painter in the ABAP Workbench through transaction SE51
  • Each screen belongs to an ABAP program.
  • These screens consist of a "screen mask" or "layout" and its flow logic. The screen has a layout that determines the positions of input/output fields and other graphical elements such as checkboxes and radio buttons. A flow logic determines the logical processing within screen.
 3) GUI status
  • Each screen has a GUI status(es) which are independent components of a program.
  • This controls the menu bars, standard toolbar, application toolbar , with which the user can choose functions in the application.
  • You create them in the ABAP Workbench using the Menu Painter.
 4) ABAP Program
  • Each screen and GUI status in the R/3 System belongs to one ABAP program.
  • The ABAP program contains the dialog modules that are called by the screen flow logic, and also process the user input from the GUI status.
  • ABAP programs that use screens are also known as dialog programs.
  • In a module pool (type M program); the first processing block to be called is always a dialog module. However, you can also use screens in other ABAP programs, such as executable programs or function modules. The first processing block is then called differently; for example, by the runtime environment or a procedure call. The screen sequence is then started using the CALL SCREEN statement.
 5) Screen Flow Logic
In the Object Browser, the module pool code belongs to one of the following categories:
Global fields: data declarations that can be used by all modules in the module pool
PBO modules: modules that are called before displaying the screen
PAI modules:  modules that are called in response to the user input
Subroutines: subroutines that can be called from any position within the module pool
By default, the system divides a module pool into one or several include programs. An include program can contain several modules of the same type (only PBO modules or only PAI modules).
Events in Dialog Program
  • PBO event
This event is triggered before the screen is displayed. The processing of screen before the display of screen is done in this event. For example , filling in default values in the screen fields.
  • PAI event
    This event is responsible for processing of screen after the user enters the data and clicks the pushbutton. The processing of screen can include displaying another screen, or just displaying list or quitting the transaction itself and many more things. Usually it is displaying another screen. These operations can be carried out in the PAI event. OKCODE plays an important role in this operation.
  • POV event
Process on value request is triggered when the user clicks F4 key. You can handle this event when the user presses F4 key by writing code for the same in module pool program. Normally when the user presses F4, list of possible values is displayed. The standard list produced by system is adequate for applications you develop yourself. However, you can also have the option of setting up your own documentation and lists of possible values that are more detailed.
POH event
Normally when the user places the cursor on the field and presses F1 function key, the system displays its own Help for that particular field. You can add your own functionality to the Help button by writing code for the same in the POH event.
6) Dynpro
  • A screen together with its Flow logic is called a Dynpro ("Dynamic Program" since the screen flow logic influences the program flow)
  • Each dynpro controls exactly one step of your Dialog Program.
  • The screens belonging to a program are numbered. The screen flow sequence can be either linear or cyclic. From within a screen chain, you can even call another screen chain and, after processing it, return to the original chain. You can also override the statically-defined next screen from within the dialog modules of the ABAP program.
 7) ABAP Module Pool
  • On a PBO or PAI event a Dynpro calls an ABAP dialog program. Collection of such programs is called the ABAP module pool.
  • For example modules called at the PAI event are used to check the user input and to trigger appropriate dialog steps, such as the update task.
  • All dynpros to be called from within one transaction refer to a common module pool.
Structure of a Dialog Program
Process Flow for a Dialog Program

Comments

Popular posts from this blog

What you need to know about small business websites.

  Small business owners should check code in their web site design. The key visitors to your commercial pages are the web crawlers that catalog your content.HTML source code along with a combination of text and graphics is just one of the secrets to success. Higher robot ratings may result from better code, and a beautiful design is equally important. Once a new prospect finds your website, you have 5 seconds to entice them to stay. Many small business web site owners  w onder, “Why don’t we get any hits?”. Did you know web pages can load and appear correctly even with improper or deprecated HTML code? You may get a great looking result, even if your browser ignores your errors. However, web robots may not be so forgiving. Below is a list of 8 fundamental elements of a good search engine placement which need to be considered when you design and promote your web site. Web Presence Importance 8 Key Components- DOCTYPE Statement Page Title Proper HTML Code META Description META Key Words

What You Need to Know to Stay Alive During a Financial Crisis

  Overview Having a superb product, soaring sales and stupendous customer service are undoubtedly some of the things which go into making a successful business. But all of this is irrelevant if you suffer a  financial   crisis. Without a sound stable financial position, the slightest shock can be enough to send your business crashing to the ground. So, what can you do to ensure that all your  h ard work is not in vain? What can you do to make sure that a   financial   crisis doesn’t rock the boat or even sink it? Let’s take a look at what can cause these jolts and, more importantly, what you can do about it. 1) Poor Record Keeping and Administration Business owners are usually not good recorders or bookkeepers.People who start businesses are the ones who have great ideas, see a gap in the market or have the personality to sell anything. They are not people who jump out of bed in the morning and say “Great, it’s a VAT and paperwork day today!” If you are to keep your business on the str

Procure to Pay (P2P) Cycle- by Amod Bhat SAP Consultant at SAVIC Technologies

Procure to Pay, also known as P2P , is the process of obtaining the raw materials needed for manufacturing a product or providing a service, and making payment for these. Every manufacturing concern or service provider needs to run this cycle efficiently if they are to continuously manage their cash flow, build goodwill with suppliers and make profits. Steps of the Procure to Pay (P2P) Cycle: *   The process begins with planning what materials are required, when they are required, and the price that the company can afford to pay for them. *   Then the company prepares a list of vendors that they think can provide the materials for them. *   The company asks each of the vendors to submit a quotation, which includes the price, terms of delivery, quality of materials, and any other information that they need for making their decision. This stage could also involve negotiating with the vendors for the best deal. *   Once a vendor has been chosen, the buyers create a