Dialog programming related to developing the objects. These objects can't able to execute independently, linked/added somewhere in the main program and executed according to sequence in main program.

Dialog program is also used to navigate back and forth between screens. Dialog programs are created with type as 'M' - Module Pool.

Dialog programs can’t be executed independently and must be attached to at least one transaction code. The transaction code must be one among the transactions specified on the initial screen.

A dialog program allows the system to work with database to perform operations on data that includes updating. Each dialog program has a set of screens that are executed by the system in a sequence one after the other.

Dialog programs must be developed by the object browser to link all the objects to the main program without explicitly pointing to other object.

Dialog program components -

The below table shows the list of components and the corresponding transactions to develop the dialog components.

ComponentTransactionMenu path
All components /Dialog ProgramsSE80Tools ABAP Workbench Object browser
ScreensSE51Tools ABAP Workbench Screen painter
Module PoolsSE38Tools ABAP Workbench ABAP/4 Editor
SubroutinesSE80
MenusSE41Tools ABAP Workbench Menu painter
TransactionsSE93Tools ABAP Workbench Development Other tools Transactions

The module pool places modularized syntax inside the include of the dialog program. These modules can gets invoked by the flow logic processed by the dialog processor.

Screens are created with screen attributes, layout, fields and flow logic. Screen Flow logic has the below events in it -

  • Process Before Output (PBO) event: Processed before the screen is displayed.
  • Process After Input (PAI) event: Processed after a user action on the screen.
  • Process on help request (POH): Processed when F1 is pressed.
  • Process on value request (POV): Processed when F4 is pressed.

Create new dialog program -

Step-1: Go to SE80. Select the 'program' from the drop down and enter the program name with 'Z' as starting letter. In this case object dialog program name is ZSCREENA.

Create New Dialog Program

Step-2: Click on 'Yes' on the Create Object dialog to proceed to the next dialog.

Create New Dialog Program

Step-3: Check 'With TOP INCL.' in the next dialog box and click on 'Yes'.

Create New Dialog Program

Step-4: Enter TOP include name as 'ZSCRTOP' and click on Continue icon.

Create New Dialog Program

Step-5: Enter the required information in the program attributes screen and click on save button.

Create New Dialog Program

Step-6: Enter the package information and Click on 'local object' to create the program.

Create New Dialog Program

Adding Screen to Dialog program -

Step-1: To add the screen to the dialog program, right click on the program and select Create Screen like below.

Adding Screen to Dialog program

Step-2: Enter the desired screen number in the below dialog and click on Continue icon. In this case, we are using 202.

Adding Screen to Dialog program

Step-3: Enter the short description and click on save icon to save the changes.

Adding Screen to Dialog program

Step-4: Click on Layout button on application tool bar to open the screen painter. Modify the screen according to the requirement. In this case, we are displaying sample text 'TutorialsCampus – SAP ABAP Dialog Screen'.

Adding Screen to Dialog program

Step-5: Save and Activate the screen.

Creating Transaction -

Step-1: To add the transaction to the dialog program, right click on the program and select Create Transaction like below.

Creating Transaction

Step-2: Enter the transaction code, description and click on Continue icon.

Creating Transaction

Step-3: Enter the program name, screen number to link to the transaction and check the option 'GUI for Windows' and click on Save button.

Creating Transaction

Step-4: Enter the package name and click on 'Local object' button to create transaction.

Executing Transaction -

Activate the program to activate all the objects under it. Execute the program by opening the output in new window.

Executing Transaction