Example of a small window

Source: Internet
Author: User

*&---------------------------------------------------------------------*
* & Report zfasdfa
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
Report zfasdfa.
Data: con_diabox type ref to cl_gui_dialogbox_container.
Data: l_alv type ref to cl_gui_alv_grid,
Lt_sflight type table of sflight.
Data: OK _code like sy-ucomm.

Parameters: p_zkp type char15.

Initialization.

Start-of-selection.
Set pf-status 'xg001 '.
Write 'zkp is a good student '.

At user-command.
Case sy-ucomm.
When 'sss '.
Call screen 100 ..
When 'back '.
Leave to screen 0.
Endcase.

*----------------------------------------------------------------------*
* Class lcl_event_handler Definition
*----------------------------------------------------------------------*
Class lcl_event_handler definition.
Public section.
Class-methods:
On_close for event close of cl_gui_dialogbox_container importing
Sender.
Endclass. "lcl_event_handler Definition
*----------------------------------------------------------------------*
* Class lcl_event_handler implementation
*----------------------------------------------------------------------*
Class lcl_event_handler implementation.
Method on_close.
Call method sender-> free.
Free: con_diabox, l_alv.
Leave to screen 0.

Endmethod. "on_close
Endclass. "lcl_event_handler implementation

*&---------------------------------------------------------------------*
* & Module status_0100 output
*&---------------------------------------------------------------------*
Module status_0100 output.
Set PF-STATUS 'm200 '.

Select * From sflight into Table lt_sflight.
If con_diabox is initial.
Create object con_diabox
Exporting
Width = 600
Height = 200
Top = 70
Left = 1, 140
Caption = 'title'
Exceptions
Others = 1.
Set handler lcl_event_handler => on_close for con_diabox.

Create object l_alv
Exporting
I _parent = con_diabox.
Endif.
Call method l_alv-> set_table_for_first_display
Exporting
I _structure_name = 'sflight'
Changing
It_outtab = lt_sflight.
Endmodule. "status_0100 output
*&---------------------------------------------------------------------*
* & Module user_command_0100 Input
*&---------------------------------------------------------------------*
Module user_command_0100 input.
Case sy-ucomm.
When 'back '.
Leave to screen 0.
Endcase.
Endmodule. "user_command_0100 inpu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.