Create Screen along with PBO and PAI modules

The next step is to create screen 100, to do this double click on the '100' within the call screen command(Call screen 100.). Enter short description and select 'Normal' as screen type.

To create the PBO and PAI modules insert that code below into the screen's flow logic. Much of this code should automatically have been inserted during screen creation but with the module lines commented out. Simple remove the comments and double click the module name(STATUS_0100 and USER_COMMAND_0100) in-order to create them, this will display the perform/module creation screen. The MODULES are usually created within two includes one ending in 'O01' for PBO modules and one ending in 'I01' for PAI modules(See code below).

Please note in order for these includes to be displayed on the creation screen they need to have be created along with the following lines of code added to the main prog(see previous step):
INCLUDE ZDEMO_ALVTREEO01. "Screen PBO Modules
INCLUDE ZDEMO_ALVTREEI01. "Screen PAI Modules

Otherwise use the 'New Include' entry and SAP will add the necassary line for you.


* Screen flow logic code
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
*
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.


*-----------------------------------------------------------*
***INCLUDE Z......O01 .
*-----------------------------------------------------------*
*&----------------------------------------------------------*
*&      Module  STATUS_0100  OUTPUT
*&----------------------------------------------------------*
*       PBO Module
*-----------------------------------------------------------*
module status_0100 output.
*  SET PF-STATUS 'xxxxxxxx'.
*  SET TITLEBAR 'xxx'.
endmodule.                 " STATUS_0100  OUTPUT

*-------------------------------------------------------------------*
***INCLUDE Z......I01 .
*-------------------------------------------------------------------*
*&------------------------------------------------------------------*
*&      Module  USER_COMMAND_0100  INPUT
*&------------------------------------------------------------------*
*       PAI Module
*-------------------------------------------------------------------*
module user_command_0100 input.
endmodule.                 " USER_COMMAND_0100  INPUT

Related Articles

Activate user interaction within SAP ALV tree
Add button to SAP ALV tree toolbar using ABAP code
ABAP ALV Tree tutorial to create a fully working ALVTree Control SAP dynpro program
Create ALV Tree Custom control and add to sap dynpro screen
Final ABAP code for the ALV Tree PBO(..O01) and FORM(..F01) includes
Create SAP ALV Tree Container in ABAP dynpro screen container
Create Container and Object
Create ALV tree main program including Data & Event declaration
SAP ALV Tree fieldcatalog creation
Set SAP ALV tree table for first display and user interaction
Build SAP ALV tree Hierarchy
Build SAP ALV tree Hierarchy Header
Add alv tree already exists check to pbo module
Create all includes required for the ALV tree report
Full ABAP code listing of main ALV tree program
Module creation screen
Create SAP ALV Tree object within ABAP dynpro screen container/H1>
Create ok code to store ALV tree user interaction
Example Output from ALV tree display
Create screen control
Create Pf-status(screen menu functionality)
Refresh ALVtree
Build Report Header(Title)
ALVtree toolbar processing
Implement user defined buttons to ALVtree toolbar
ALVtree user interaction processing
Implement ALVtree user interaction processing
Setup ALVtree variant
Main Steps to create ALV simple Tree(Using Objects)
Create Add Custom control to screen
Final code for the PBO(..O01) and FORM(..F01) includes
Create Container and Object
Create and register events for user interaction
Create ALVtree Hierarchy
Add already exists check!
Create Includes for ALVtree report
Full ABAP code listing of main program
Create Container and Object
Create screen control
Example Output from ALV simple tree display
Create screen control
Create Screen along with PBO and PAI modules
Create Pf-status(screen menu functionality)