‎2008 Mar 06 3:12 PM
Hello all,
what is the wrong in code while creating container.
*&---------------------------------------------------------------------*
*& Report ZTEST_TREE4
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ztest_tree4.
*----------------------------------------------------------------------*
* CLASS lcl_application DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_application DEFINITION CREATE PRIVATE.
PUBLIC SECTION.
CLASS-METHODS: run_application.
METHODS constructor.
PRIVATE SECTION.
CLASS-DATA: s_container TYPE REF TO cl_gui_simple_container.
DATA: container TYPE REF TO cl_gui_simple_container.
ENDCLASS. "lcl_application DEFINITION
*----------------------------------------------------------------------*
* CLASS lcl_implementation DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_application IMPLEMENTATION.
METHOD run_application.
IF lcl_application=>s_container IS INITIAL.
CREATE OBJECT lcl_application=>s_container.
ENDIF.
ENDMETHOD. "run_application
METHOD constructor.
CREATE OBJECT container.
ENDMETHOD. "constructor
ENDCLASS. "lcl_implementation DEFINITION
*&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
CALL METHOD lcl_application=>run_application.
SET PF-STATUS 'CO_100'.
SET TITLEBAR 'CO_100'.
ENDMODULE. " STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE user_command_0100 INPUT.
ENDMODULE. " USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
*& Module exit INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE exit INPUT.
LEAVE PROGRAM.
ENDMODULE. " exit INPUT
START-OF-SELECTION.
CALL SCREEN 100.
regards,
Lisa.
Edited by: Lisa Roy on Mar 6, 2008 10:15 AM
Edited by: Lisa Roy on Mar 6, 2008 10:29 AM
‎2008 Mar 06 4:14 PM
Lisa,
the syntax seems to be ok, but what is the problem. Are you getting an error message when checking it? If so, what is the message?
P.S. The =>run_application method should be placed after the set pf-status, better yet, in a separate module.
‎2008 Mar 06 4:24 PM
Hi Micky,
The progam is dumping at line CREATE OBJECT lcl_application=>s_container.
Can you help me.
Regards,
Lisa
‎2008 Mar 06 5:25 PM
Hi Lisa,
a container must be placed in a respective screen area. Also the module calls must be implemented in your screen input and output sections. Finally you have to place something (a GUI control) in your container.
I do not see anything like this in your program. So I don't know what you are asking about. Do you get any error message?
Regards,
Clemens
‎2008 Mar 06 5:29 PM
Hello clemens,
Can we create a container with out placing a container in screen area?
Regards,
Lisa