Saturday, December 18, 2010
Use class CL_GUI_DOCKING_CONTAINER to be able to get ALV in docking container.
Screen Flow Logic.
REPORT ZALV_OOPS_WO_CONTROLLER. "Docking Container declarations DATA: G_DOCKING_CONTAINER_1 TYPE REF TO CL_GUI_DOCKING_CONTAINER, G_GRID TYPE REF TO CL_GUI_ALV_GRID. "Variables Declarations DATA: ITAB LIKE SFLIGHT OCCURS 0 WITH HEADER LINE, OKCODE LIKE SY-UCOMM. SELECT * FROM SFLIGHT INTO TABLE ITAB. SET SCREEN 101. *----------------------------------------------------------------------* * MODULE STATUS_0101 OUTPUT *----------------------------------------------------------------------* MODULE STATUS_0101 OUTPUT. SET PF-STATUS 'MENU'. SET TITLEBAR 'TIT'. PERFORM CREATE_AND_INIT_CONTROLS. ENDMODULE. " STATUS_0101 OUTPUT *&---------------------------------------------------------------------* *& Form create_and_init_controls *&---------------------------------------------------------------------* FORM CREATE_AND_INIT_CONTROLS . CREATE OBJECT G_DOCKING_CONTAINER_1 EXPORTING REPID = SY-REPID DYNNR = '101' SIDE = CL_GUI_DOCKING_CONTAINER=>DOCK_AT_TOP EXTENSION = 100. CREATE OBJECT G_GRID EXPORTING I_PARENT = G_DOCKING_CONTAINER_1. CALL METHOD G_GRID->SET_TABLE_FOR_FIRST_DISPLAY EXPORTING I_STRUCTURE_NAME = 'SFLIGHT' CHANGING IT_OUTTAB = ITAB[]. ENDFORM. " create_and_init_controls *----------------------------------------------------------------------* * MODULE user_command_0101 INPUT *----------------------------------------------------------------------* MODULE USER_COMMAND_0101 INPUT. CASE OKCODE. WHEN 'BACK'. SET SCREEN 0. ENDCASE. ENDMODULE. " user_command_0101 INPUT
PROCESS BEFORE OUTPUT. MODULE status_0101. PROCESS AFTER INPUT. MODULE user_command_0101.
Followers
Popular Posts
- ABAP - ALV Report example with steps
- ABAP - Sending email with pdf attachment
- ABAP - Step by step tutorial on Smart Forms - Template Node
- SAP Adobe Form - Steps to create simple ADOBE Form and calling it from ABAP Program
- SAP ABAP - CL_ABAP_CHAR_UTILITIES class usage
- ABAP - Multiple value selection from F4 help for SELECT-OPTIONS
- Execute ABAP Report using SUBMIT statement
- ABAP - Select all or Deselect all in ALV or Check box handling in ALV
- Web Dynpro ABAP ALV - ON_CLICK event
- ABAP - Dynamic WHERE clause
very simple , easy to understand, thanks!!
ReplyDelete