Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

To split screen

Former Member
0 Kudos

I want to split a screen so that on left side there is one image and right there should be a selection screen(or any screen). Let me know how can I do it.

Thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi ,

Use CL_GUI_EASY_SPLITTER_CONTAINER class to split the sceen.

With Regards,

Ranganathan

6 REPLIES 6

Former Member
0 Kudos

Hi ,

Use CL_GUI_EASY_SPLITTER_CONTAINER class to split the sceen.

With Regards,

Ranganathan

Former Member
0 Kudos

hi,

define two subscreen area, and using two sub screens you achieve this

cheers,

sasi

Former Member
0 Kudos

HI,

Open se38 and try this sap program RSDEMO_EASY_SPLITTER_CONTROL

I think this is exactly what you want.

please reward points if it helps you.

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

You have to use custom container and subscreen for spliting the screen.Kindly go through the below sample code and reward points by clicking the star on the left of reply,if it helps.

Declaration should be

  • Custom Container for first tab

data : o_custom_container1 TYPE REF TO cl_gui_custom_container,

  • Custom Container for second tab

o_custom_container2 TYPE REF TO cl_gui_custom_container,

  • Splitter Container for second tab

o_splitter type ref to cl_gui_splitter_container.

You should have a coding like this in PBO.

IF o_splitter IS INITIAL .

CREATE OBJECT o_splitter

EXPORTING

parent = pparent

rows = prows

columns = pcolumns

EXCEPTIONS

cntl_error = 1

cntl_system_error = 2

others = 3.

IF sy-subrc ne 0.

PERFORM f9003_error_handle USING text-004.

ENDIF.

ENDIF.

  • Creating containers for the split grids

call method o_splitter->get_container exporting row = 1

column = 1

receiving container = o_container1.

call method o_splitter->get_container exporting row = 2

column = 1

receiving container = o_container2.

  • Set where the splits on the screen comes

call method o_splitter->set_row_height

exporting

id = 1

height = 45

exceptions

cntl_error = 1

cntl_system_error = 2

others = 3.

Former Member
0 Kudos

U can see this sample code


*&---------------------------------------------------------------------*
*& Report  <b>RSDEMO_EASY_SPLITTER_CONTROL</b>                                *
*&                                                                     *
*&---------------------------------------------------------------------*
*&                                                                     *
*&                                                                     *
*&---------------------------------------------------------------------*

REPORT  rsdemo_easy_splitter_control         .

* splitter control
DATA splitter TYPE REF TO cl_gui_easy_splitter_container.
* container for the splitter control
DATA container TYPE REF TO cl_gui_custom_container.
* containers created by the splitter control
DATA container_1 TYPE REF TO cl_gui_container.
DATA container_2 TYPE REF TO cl_gui_container.

DATA  init.
DATA ok_code TYPE sy-ucomm.

CALL SCREEN 100.

*&---------------------------------------------------------------------*
*&      Module  STATUS_0100  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
  SET PF-STATUS 'STATUS'.
  IF init is initial.
* create a container for the splitter control
    CREATE OBJECT container
                  EXPORTING container_name = 'CUSTOM'.
* create the splitter control
    CREATE OBJECT splitter
                  EXPORTING parent = container
                            orientation    = 1.
* get the containers of the splitter control
<b>    container_1 = splitter->top_left_container.
    container_2 = splitter->bottom_right_container.</b>* create the picture controls inside the containers of the splitter
    CREATE OBJECT picture_1
                  EXPORTING parent  = container_1.

    CREATE OBJECT picture_2
                  EXPORTING parent  = container_2.


    CALL METHOD cl_gui_cfw=>flush
         EXCEPTIONS cntl_system_error = 1
                    cntl_error = 2.
    IF sy-subrc <> 0.
* error handling
    ENDIF.
  ENDIF.
ENDMODULE.                             " STATUS_0100  OUTPUT

*&---------------------------------------------------------------------*
*&      Module  EXIT  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE exit INPUT.
  CALL METHOD container->free.
  LEAVE PROGRAM.
ENDMODULE.                             " EXIT  INPUT

Hope this helps.

Try this sample program its available in control examples.

Reward points and close the thread.

Former Member
0 Kudos