screen in container (cl_gui_container)

Die Frage ist als "gelöst" markiert. Den entsprechend Beitrag findest du hier.

Die Objektorientierung mit ABAP®: Vererbung, Dynamische Programmierung, GUI Controls (u.a. ALV im OO).
2 Beiträge • Seite 1 von 1
2 Beiträge Seite 1 von 1

screen in container (cl_gui_container)

Beitrag von test'r ( / / 0 / 3 ) »
Hi,

I thought containers where perfectly suited for displaying screens....

This is a code, with screen 0100 a normal screen with a custom control 'TEST_CONTAINER'.

Screen 0200 is a subscreen with a little text on : 'Test 1,2,3'.


But when executing the program, I don't see the 'Test 1,2,3'....

Code: Alles auswählen.

DATA : lo_container TYPE REF TO cl_gui_container, 
       l_screen LIKE sy-dynnr, 
       lo_grid TYPE REF TO cl_gui_alv_grid, 
       lo_control TYPE REF TO cl_gui_custom_container. 


CREATE OBJECT lo_control 
  EXPORTING 
*     parent                      = 
    container_name              = 'TEST_CONTAINER' 
*     STYLE                       = 
*     LIFETIME                    = lifetime_default 
*     REPID                       = 
*     DYNNR                       = 
*     NO_AUTODEF_PROGID_DYNNR     = 
 EXCEPTIONS 
   cntl_error                  = 1 
   cntl_system_error           = 2 
   create_error                = 3 
   lifetime_error              = 4 
   lifetime_dynpro_dynpro_link = 5 
   others                      = 6 
    . 

l_screen = '0200'. 


CREATE OBJECT LO_CONTAINER 
  EXPORTING 
    CLSID                          = SPACE 
    PARENT                         = lo_control 
*    STYLE                          = 
    DYNNR                          = l_screen 
    REPID                          = sy-repid 
*    CONTAINER_NAME                 = 
*    LIFETIME                       = lifetime_default 
*    AUTOALIGN                      = 
    NO_AUTODEF_PROGID_DYNNR        = 'X' 
*    NAME                           = 
*  EXCEPTIONS 
*    CNTL_ERROR                     = 1 
*    CNTL_SYSTEM_ERROR              = 2 
*    CREATE_ERROR                   = 3 
*    LIFETIME_ERROR                 = 4 
*    LIFETIME_DYNPRO_DYNPRO_LINK    = 5 
*    LIFETIME_DYNPRO_ILLEGAL_PARENT = 6 
*    others                         = 7 
    . 
IF SY-SUBRC <> 0. 
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO 
*            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. 
ENDIF. 

Can someone tell me what I'm doing wrong?
Tnx.

gesponsert
Stellenangebote auf ABAPforum.com schalten
kostenfrei für Ausbildungsberufe und Werksstudenten


Beitrag von Haubi (Expert / 625 / 20 / 30 ) »
Hi.

It is impossible to display Screens/Dynpros in containers.

Containers are used for displaying Frontend Controls (SE24 -> CL_GUI_*, every class that does not have "CONTAINER" in its name), while they are Frontend Controls themselves.

The code snippet you posted puts an container into an container.
You can place Custom Control elements on Dynpros. This is the Parameter DYNNR that you see in the constructor of Container classes, which tells the container to bind to exactly this screen.

Regards,
Haubi
Das ABAP Kochbuch ab sofort bei Amazon...

I'd rather write code that writes code than write code...

Seite 1 von 1

Vergleichbare Themen

2
Antw.
1751
Views
GUI Container ohne Dynpro nach Selektion-Screen ausgeben
von Legxis » 14.05.2019 12:22 • Verfasst in ABAP® Core
2
Antw.
3995
Views
Kein Varianten-Admin im Splitter-Container auf Default Screen
von tonyparzonka » 09.03.2023 12:45 • Verfasst in ABAP Objects®
3
Antw.
3642
Views
Docking Container im Docking Container
von GreatEMU » 25.04.2013 11:54 • Verfasst in ABAP Objects®
14
Antw.
16347
Views
PDF im Container öffnen
von Barney » 24.04.2017 10:19 • Verfasst in ABAP® Core
2
Antw.
3196
Views
Scrollbalken bei ALV-Container
von Barney » 12.10.2016 08:18 • Verfasst in ABAP® für Anfänger

Über diesen Beitrag


Die Frage ist als "gelöst" markiert. Den entsprechend Beitrag findest du hier.

Unterstütze die Community und teile den Beitrag für mehr Leser und Austausch

Aktuelle Forenbeiträge

Auftrag & Posititen ZZFELD ändern
vor 18 Stunden von ewx 11 / 360
Feldwerte vergleichen
vor 4 Tagen von a-dead-trousers 4 / 1076
Workflow-Datenfluss mit Multi-Line-Container
vor 5 Tagen von ewx gelöst 2 / 1511

Newsletter Anmeldung

Keine Beiträge verpassen! Wöchentlich versenden wir lesenwerte Beiträge aus unserer Community.
Die letzte Ausgabe findest du hier.
Details zum Versandverfahren und zu Ihren Widerrufsmöglichkeiten findest du in unserer Datenschutzerklärung.

Aktuelle Forenbeiträge

Auftrag & Posititen ZZFELD ändern
vor 18 Stunden von ewx 11 / 360
Feldwerte vergleichen
vor 4 Tagen von a-dead-trousers 4 / 1076
Workflow-Datenfluss mit Multi-Line-Container
vor 5 Tagen von ewx gelöst 2 / 1511

Unbeantwortete Forenbeiträge

OPD Druck im SPOOL
vor einer Woche von Manfred K. 1 / 1473
Export von Spools in XLSX
vor einer Woche von abapamateur 1 / 3053
Feldberechnung ME32K
vor 3 Wochen von ZF_SAPler 1 / 3379