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: 

Container object on selection screen?

Clemenss
Active Contributor
0 Kudos

Hi, simple question:

Is it possible to create a container object for gui controls using ABAP selection-screen commands?

I do not want to use the screen painter.

Regards,

Clemens

6 REPLIES 6

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Nop, you can't do it.

Regards,

RIch Heilman

former_member181962
Active Contributor
0 Kudos

I don't think you can create container for gui control using simple selection-screen statements.

Regards,

Ravi

Clemenss
Active Contributor
0 Kudos

Hi,

what about this (I did not try, just thought of):

- Have a selection-screen.

- process it immediately by setting 'SET_NEXT_OK_CODE'

- Minimize it (programmatically, howto?)

- Create Dialogbox and use it for anaything.

Do you think this would work?

Regards,

Clemens

0 Kudos

Your better off creating a dynpro in screen painter, putting your control container on this dynpro and also a subscreen container, then define your selection screen as you need to in the program and make sure to say AS SUBSCREEN. Then simply include the subscreen in your dynpro. That's it. Done.

Regards,

Rich Heilman

Clemenss
Active Contributor
0 Kudos

OK,

we can't define a Container object on selection screen.

I wonder why as anything else including tab strips is possible.

regards,

Clemens

you can have container and custom controls in the selection screen. check out this sample code.

REPORT Y_SEL_SCREEN_CONTAINER .

DATA:
docking TYPE REF TO cl_gui_docking_container,
htmlviewer TYPE REF TO cl_gui_html_viewer.

PARAMETERS: p_check TYPE c  .


AT SELECTION-SCREEN OUTPUT.

  PERFORM build_htmlviewer.



START-OF-SELECTION.


*&---------------------------------------------------------------------*
*&      Form  build_htmlviewer
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM build_htmlviewer .
  DATA: repid LIKE sy-repid.
  repid = sy-repid.

  IF docking IS INITIAL .
  CREATE object docking
  exporting
  repid = repid
  dynnr = sy-dynnr
  side = cl_gui_docking_container=>dock_at_right
  extension = '400'
  exceptions
  cntl_error = 1
  cntl_system_error = 2
  create_error = 3
  lifetime_error = 4
  lifetime_dynpro_dynpro_link = 5.
    IF htmlviewer IS INITIAL .
      CREATE OBJECT htmlviewer
        EXPORTING
          parent             = docking .
    ENDIF .
  ENDIF .
ENDFORM.                    " build_htmlviewer

Raja