In this topic, we described about the below sections -
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.
|All components /Dialog Programs||SE80||Tools ABAP Workbench Object browser|
|Screens||SE51||Tools ABAP Workbench Screen painter|
|Module Pools||SE38||Tools ABAP Workbench ABAP/4 Editor|
|Menus||SE41||Tools ABAP Workbench Menu painter|
|Transactions||SE93||Tools 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.
Step-2: Click on 'Yes' on the Create Object dialog to proceed to the next dialog.
Step-3: Check 'With TOP INCL.' in the next dialog box and click on 'Yes'.
Step-4: Enter TOP include name as 'ZSCRTOP' and click on Continue icon.
Step-5: Enter the required information in the program attributes screen and click on save button.
Step-6: Enter the package information and Click on 'local object' to create the 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.
Step-2: Enter the desired screen number in the below dialog and click on Continue icon. In this case, we are using 202.
Step-3: Enter the short description and click on save icon to save the changes.
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'.
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.
Step-2: Enter the transaction code, description and click on Continue icon.
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.
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.