SlideShare une entreprise Scribd logo
1  sur  11
Lecture 15 ALV Grid Control BCO5647 Applications Programming Techniques (ABAP)
Readings & Objectives ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Key Outcomes ,[object Object],[object Object]
Working with Methods Classes and Objects
Creating Objects and Calling Methods
Application Example: ALV Grid Control
Program with ALV Grid Control
Objects and Classes for ALV Grid Control To call the custom container controls and the ALV Grid Control, the following global classes (object types) are available in the  Class Builder : CL_GUI_CUSTOM_CONTAINER  and  CL_GUI_ALV_GRID
ALV Grid Control: Important Methods ,[object Object],[object Object],[object Object],[object Object]
Display the contents of an internal table on a Screen with ALV Grid Control REPORT sapmz_hf_alv_grid . TABLES: sflight. *-------------------------------------------------- * G L O B A L  I N T E R N  A L  T A B L E S *-------------------------------------------------- DATA: gi_sflight TYPE TABLE OF sflight. *-------------------------------------------------- * G L O B A L  D A T A *-------------------------------------------------- DATA: g_wa_sflight LIKE sflight. * Declare reference variables to the ALV grid and the container DATA:  go_grid TYPE REF TO cl_gui_alv_grid, go_custom_container  TYPE REF TO cl_gui_custom_container. START-OF-SELECTION. SET SCREEN '101'. *&------------------------------------------------* *&  Module  USER_COMMAND_0101  INPUT *&------------------------------------------------* MODULE user_command_0101 INPUT. CASE sy-ucomm. WHEN 'EXIT'. LEAVE TO SCREEN 0. ENDCASE. ENDMODULE.  " USER_COMMAND_0101  INPUT
Display the contents of an internal table on a Screen with ALV Grid Control *&  Module  STATUS_0101  OUTPUT *&------------------------------------------------* MODULE status_0101 OUTPUT. set pf-status 'GRID'. * Create objects IF go_custom_container IS INITIAL. CREATE OBJECT go_custom_container EXPORTING container_name = 'CONTAINER_1'. CREATE OBJECT go_grid EXPORTING i_parent = go_custom_container. PERFORM load_data_into_grid. ENDIF. ENDMODULE.  " STATUS_0101  OUTPUT *&------------------------------------------------* *&  Form  load_data_into_grid *&------------------------------------------------* FORM load_data_into_grid. * Read data from table SFLIGHT SELECT * FROM sflight INTO TABLE gi_sflight. * Load data into the grid and display them CALL METHOD go_grid->set_table_for_first_display EXPORTING i_structure_name = 'SFLIGHT' CHANGING  it_outtab  = gi_sflight. ENDFORM.  " load_data_into_grid

Contenu connexe

Similaire à Lecture15 abap on line

Alv object model simple 2 d table - the basics
Alv object model   simple 2 d table - the basicsAlv object model   simple 2 d table - the basics
Alv object model simple 2 d table - the basics
Faina Fridman
 
An easy reference for alv grid control (1)
An easy reference for alv grid control (1)An easy reference for alv grid control (1)
An easy reference for alv grid control (1)
Faina Fridman
 
Alv object model simple 2 d table - event handling
Alv object model   simple 2 d table - event handlingAlv object model   simple 2 d table - event handling
Alv object model simple 2 d table - event handling
anil kumar
 
Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007
paulguerin
 
PostgreSQL 9.5 Features
PostgreSQL 9.5 FeaturesPostgreSQL 9.5 Features
PostgreSQL 9.5 Features
Saiful
 
MySQL Query And Index Tuning
MySQL Query And Index TuningMySQL Query And Index Tuning
MySQL Query And Index Tuning
Manikanda kumar
 

Similaire à Lecture15 abap on line (20)

Alv object model simple 2 d table - the basics
Alv object model   simple 2 d table - the basicsAlv object model   simple 2 d table - the basics
Alv object model simple 2 d table - the basics
 
An easy reference for alv grid control (1)
An easy reference for alv grid control (1)An easy reference for alv grid control (1)
An easy reference for alv grid control (1)
 
Alv object model simple 2 d table - event handling
Alv object model   simple 2 d table - event handlingAlv object model   simple 2 d table - event handling
Alv object model simple 2 d table - event handling
 
Object oriented approach to ALV Lists in ABAP
Object oriented approach to ALV Lists in ABAPObject oriented approach to ALV Lists in ABAP
Object oriented approach to ALV Lists in ABAP
 
ABAP Advanced List
ABAP Advanced ListABAP Advanced List
ABAP Advanced List
 
Ground Breakers Romania: Explain the explain_plan
Ground Breakers Romania: Explain the explain_planGround Breakers Romania: Explain the explain_plan
Ground Breakers Romania: Explain the explain_plan
 
Part3 Explain the Explain Plan
Part3 Explain the Explain PlanPart3 Explain the Explain Plan
Part3 Explain the Explain Plan
 
Part5 sql tune
Part5 sql tunePart5 sql tune
Part5 sql tune
 
Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007
 
Alv theory
Alv theoryAlv theory
Alv theory
 
Polymorphic Table Functions in 18c
Polymorphic Table Functions in 18cPolymorphic Table Functions in 18c
Polymorphic Table Functions in 18c
 
Advanced plsql mock_assessment
Advanced plsql mock_assessmentAdvanced plsql mock_assessment
Advanced plsql mock_assessment
 
Top 10 Oracle SQL tuning tips
Top 10 Oracle SQL tuning tipsTop 10 Oracle SQL tuning tips
Top 10 Oracle SQL tuning tips
 
Les10 Creating And Managing Tables
Les10 Creating And Managing TablesLes10 Creating And Managing Tables
Les10 Creating And Managing Tables
 
PostgreSQL 9.5 Features
PostgreSQL 9.5 FeaturesPostgreSQL 9.5 Features
PostgreSQL 9.5 Features
 
BAPI - Criação de Ordem de Manutenção
BAPI - Criação de Ordem de ManutençãoBAPI - Criação de Ordem de Manutenção
BAPI - Criação de Ordem de Manutenção
 
SQL212.3 Introduction to SQL using Oracle Module 3
SQL212.3 Introduction to SQL using Oracle Module 3SQL212.3 Introduction to SQL using Oracle Module 3
SQL212.3 Introduction to SQL using Oracle Module 3
 
SQL Tunning
SQL TunningSQL Tunning
SQL Tunning
 
MariaDB Optimizer
MariaDB OptimizerMariaDB Optimizer
MariaDB Optimizer
 
MySQL Query And Index Tuning
MySQL Query And Index TuningMySQL Query And Index Tuning
MySQL Query And Index Tuning
 

Plus de Milind Patil

Abap slide class4 unicode-plusfiles
Abap slide class4 unicode-plusfilesAbap slide class4 unicode-plusfiles
Abap slide class4 unicode-plusfiles
Milind Patil
 
Step by step abap_input help or lov
Step by step abap_input help or lovStep by step abap_input help or lov
Step by step abap_input help or lov
Milind Patil
 
Step bystep abap_fieldhelpordocumentation
Step bystep abap_fieldhelpordocumentationStep bystep abap_fieldhelpordocumentation
Step bystep abap_fieldhelpordocumentation
Milind Patil
 
Step bystep abap_field help or documentation
Step bystep abap_field help or documentationStep bystep abap_field help or documentation
Step bystep abap_field help or documentation
Milind Patil
 
Abap slides user defined data types and data
Abap slides user defined data types and dataAbap slides user defined data types and data
Abap slides user defined data types and data
Milind Patil
 
Abap slide lock Enqueue data clusters auth checks
Abap slide lock Enqueue data clusters auth checksAbap slide lock Enqueue data clusters auth checks
Abap slide lock Enqueue data clusters auth checks
Milind Patil
 
Step bystep abap_changinga_singlerecord
Step bystep abap_changinga_singlerecordStep bystep abap_changinga_singlerecord
Step bystep abap_changinga_singlerecord
Milind Patil
 
Abap slide lockenqueuedataclustersauthchecks
Abap slide lockenqueuedataclustersauthchecksAbap slide lockenqueuedataclustersauthchecks
Abap slide lockenqueuedataclustersauthchecks
Milind Patil
 
Abap slide exceptionshandling
Abap slide exceptionshandlingAbap slide exceptionshandling
Abap slide exceptionshandling
Milind Patil
 
Step bystep abap_changinga_singlerecord
Step bystep abap_changinga_singlerecordStep bystep abap_changinga_singlerecord
Step bystep abap_changinga_singlerecord
Milind Patil
 
Lecture16 abap on line
Lecture16 abap on lineLecture16 abap on line
Lecture16 abap on line
Milind Patil
 
Lecture14 abap on line
Lecture14 abap on lineLecture14 abap on line
Lecture14 abap on line
Milind Patil
 
Lecture13 abap on line
Lecture13 abap on lineLecture13 abap on line
Lecture13 abap on line
Milind Patil
 
Lecture12 abap on line
Lecture12 abap on lineLecture12 abap on line
Lecture12 abap on line
Milind Patil
 
Lecture11 abap on line
Lecture11 abap on lineLecture11 abap on line
Lecture11 abap on line
Milind Patil
 
Lecture10 abap on line
Lecture10 abap on lineLecture10 abap on line
Lecture10 abap on line
Milind Patil
 
Lecture09 abap on line
Lecture09 abap on lineLecture09 abap on line
Lecture09 abap on line
Milind Patil
 

Plus de Milind Patil (20)

Abap slide class4 unicode-plusfiles
Abap slide class4 unicode-plusfilesAbap slide class4 unicode-plusfiles
Abap slide class4 unicode-plusfiles
 
Step by step abap_input help or lov
Step by step abap_input help or lovStep by step abap_input help or lov
Step by step abap_input help or lov
 
Step bystep abap_fieldhelpordocumentation
Step bystep abap_fieldhelpordocumentationStep bystep abap_fieldhelpordocumentation
Step bystep abap_fieldhelpordocumentation
 
Step bystep abap_field help or documentation
Step bystep abap_field help or documentationStep bystep abap_field help or documentation
Step bystep abap_field help or documentation
 
Abap slides user defined data types and data
Abap slides user defined data types and dataAbap slides user defined data types and data
Abap slides user defined data types and data
 
Abap slides set1
Abap slides set1Abap slides set1
Abap slides set1
 
Abap slide class3
Abap slide class3Abap slide class3
Abap slide class3
 
Abap slide lock Enqueue data clusters auth checks
Abap slide lock Enqueue data clusters auth checksAbap slide lock Enqueue data clusters auth checks
Abap slide lock Enqueue data clusters auth checks
 
Step bystep abap_changinga_singlerecord
Step bystep abap_changinga_singlerecordStep bystep abap_changinga_singlerecord
Step bystep abap_changinga_singlerecord
 
Abap slide lockenqueuedataclustersauthchecks
Abap slide lockenqueuedataclustersauthchecksAbap slide lockenqueuedataclustersauthchecks
Abap slide lockenqueuedataclustersauthchecks
 
Abap slide exceptionshandling
Abap slide exceptionshandlingAbap slide exceptionshandling
Abap slide exceptionshandling
 
Step bystep abap_changinga_singlerecord
Step bystep abap_changinga_singlerecordStep bystep abap_changinga_singlerecord
Step bystep abap_changinga_singlerecord
 
Abap reports
Abap reportsAbap reports
Abap reports
 
Lecture16 abap on line
Lecture16 abap on lineLecture16 abap on line
Lecture16 abap on line
 
Lecture14 abap on line
Lecture14 abap on lineLecture14 abap on line
Lecture14 abap on line
 
Lecture13 abap on line
Lecture13 abap on lineLecture13 abap on line
Lecture13 abap on line
 
Lecture12 abap on line
Lecture12 abap on lineLecture12 abap on line
Lecture12 abap on line
 
Lecture11 abap on line
Lecture11 abap on lineLecture11 abap on line
Lecture11 abap on line
 
Lecture10 abap on line
Lecture10 abap on lineLecture10 abap on line
Lecture10 abap on line
 
Lecture09 abap on line
Lecture09 abap on lineLecture09 abap on line
Lecture09 abap on line
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 

Lecture15 abap on line

  • 1. Lecture 15 ALV Grid Control BCO5647 Applications Programming Techniques (ABAP)
  • 2.
  • 3.
  • 4. Working with Methods Classes and Objects
  • 5. Creating Objects and Calling Methods
  • 7. Program with ALV Grid Control
  • 8. Objects and Classes for ALV Grid Control To call the custom container controls and the ALV Grid Control, the following global classes (object types) are available in the Class Builder : CL_GUI_CUSTOM_CONTAINER and CL_GUI_ALV_GRID
  • 9.
  • 10. Display the contents of an internal table on a Screen with ALV Grid Control REPORT sapmz_hf_alv_grid . TABLES: sflight. *-------------------------------------------------- * G L O B A L I N T E R N A L T A B L E S *-------------------------------------------------- DATA: gi_sflight TYPE TABLE OF sflight. *-------------------------------------------------- * G L O B A L D A T A *-------------------------------------------------- DATA: g_wa_sflight LIKE sflight. * Declare reference variables to the ALV grid and the container DATA: go_grid TYPE REF TO cl_gui_alv_grid, go_custom_container TYPE REF TO cl_gui_custom_container. START-OF-SELECTION. SET SCREEN '101'. *&------------------------------------------------* *& Module USER_COMMAND_0101 INPUT *&------------------------------------------------* MODULE user_command_0101 INPUT. CASE sy-ucomm. WHEN 'EXIT'. LEAVE TO SCREEN 0. ENDCASE. ENDMODULE. " USER_COMMAND_0101 INPUT
  • 11. Display the contents of an internal table on a Screen with ALV Grid Control *& Module STATUS_0101 OUTPUT *&------------------------------------------------* MODULE status_0101 OUTPUT. set pf-status 'GRID'. * Create objects IF go_custom_container IS INITIAL. CREATE OBJECT go_custom_container EXPORTING container_name = 'CONTAINER_1'. CREATE OBJECT go_grid EXPORTING i_parent = go_custom_container. PERFORM load_data_into_grid. ENDIF. ENDMODULE. " STATUS_0101 OUTPUT *&------------------------------------------------* *& Form load_data_into_grid *&------------------------------------------------* FORM load_data_into_grid. * Read data from table SFLIGHT SELECT * FROM sflight INTO TABLE gi_sflight. * Load data into the grid and display them CALL METHOD go_grid->set_table_for_first_display EXPORTING i_structure_name = 'SFLIGHT' CHANGING it_outtab = gi_sflight. ENDFORM. " load_data_into_grid

Notes de l'éditeur

  1. SAP List Viewer (previously called ABAP List Viewer) is a set of function modules that are added to program code to enhance the appearance and functionality of lists (reports). LV can add functionality features to lists such as sorting, subtotals and interactivity with minimal programming effort. LV can enhance the appearance of list by adding column headings, vertical lines and color with no programming effort. LV has limited technical support but is widely used in industry. SLV can now be activated using ABAP Objects by creating object instantiations and call methods.
  2. At first glance, a class is very much like a function group since it contains data objects ( attributes ) and functions ( methods ). These components can be protected against outside access. This is usually done with the attributes and some methods. Then the protected components can only be accessed by public methods. Unlike function groups, classes can have multiple instances . This means that more than one runtime object can be created for each program in a class. In other words, a class contains the technical description of objects (instances). Therefore, all these objects have the same attributes and provide the same methods. However, they can be distinguished physically. Their attributes can have different features. Classes can be defined either locally within an executable program or Globally (in DD).
  3. To create instances of classes and to be able to address them, you need reference variables . These are pointers to these instances. Reference variables are defined using: DATA reference_name TYPE REF TO class_name . When the program starts, the data objects are created in the memory. However, since no instances have been created yet, the reference variables are still empty. At runtime, you can create any number of instances of classes using: CREATE OBJECT reference_name . You call methods of an instance using: CALL METHOD reference_name -> method_name . In contrast to a function module call, the function name is not sufficient here since, generally, several instances of a class exist for each program. Using the reference variable, here reference_name, followed by the object component selector -> , you instruct a specific instance to execute its method.
  4. The ALV Grid Control is used for displaying non-hierarchical data in table form. Several user functions are already implemented: On the screen, you can increase or decrease the column width or use the ‘Optimum Width’ function to adjust the column width to suit the data currently displayed. You can also change the column sequence by selecting a column and dragging it to a new position. Standard functions are available in the application toolbar for the control. The detail view displays the fields of the row, on which the cursor is positioned, in a modal dialog box. The sort function in the ALV Grid Control is available for as many columns as required. You can set complex sort criteria and sort columns in either ascending or descending order. You can use the Search function to search for a string (generic search without * ) in rows or columns within a selected area. You can use the Sum function to request totals for one or more numeric columns. You can use the Subtotal function to structure control level lists: Select the columns (non-numeric fields only) that you want to use and the corresponding control level totals are displayed. For Print and Download the whole list is always processed, not just the sections displayed on the screen.
  5. Before you start creating a ALV Grid Control, you should show class the menu path Environment ->Examples ->Control Examples in the Object Navigator. An Enjoy SAP control must always be embedded in an SAP container control. This manages the embedded controls and provides a physical area for displaying them. The container becomes the parent of the embedded control. Since containers are themselves controls, they can be nested within one another. In this way, you can work with controls in a flexible and modular manner. To be able to use an ALV Grid Control in your program, you require at least one container and one ALV grid instance.
  6. SET SCREEN '101'. To reserve an area of the screen for an EnjoySAP control, create a custom container area using the Screen Painter (choose Layout ). On the toolbar to the left of the editing area, choose Custom Control and specify the size and position of the area on the screen. Proceed as follows: Define the top left corner of the area by holding down the left mouse button. Drag the cursor diagonally down to the right to where you want the bottom right corner. Once you release the mouse button, the bottom right corner is fixed in position. You can change the size and position of the area at any time using the drag symbols that appear at the edge of the area. Enter a name for the new screen element (here: CONTAINER_1 ) DATA: go_grid TYPE REF TO cl_gui_alv_grid, go_custom_container TYPE REF TO cl_gui_custom_container. Two reference variables are required in the ABAP program: The reference variable that is to point to the grid control instance is called GO_GRID in this case, and is typed with the global class CL_GUI_ALV_GRID . The reference variable that is to point to the container control instance is called GO_CUSTOM_CONTAINER in this case, and is typed with the global class CL_GUI_CUSTOM_CONTAINER .
  7. CREATE OBJECT go_custom_container EXPORTING container_name = 'CONTAINER_1'. CREATE OBJECT go_grid EXPORTING i_parent = go_custom_container. You create control instances using the CREATE OBJECT statement. The control processing must be complete before the corresponding screen is displayed. Therefore, it should we recommend placed in the PBO module for this purpose. Creating an instance for the controls should take place only once, before the screen is first displayed. This is easily done by querying the content of one of the two reference variables. Since here the instantiation of the container control is implemented in the corresponding PBO module, you need only pass the name of the custom container area to the interface. When you instantiate the grid control, all you need to do is to pass the pointer to the container instance. In this way, the container control manages the technical link of the SAP Grid Control to the screen. CALL METHOD go_grid->set_table_for_first_display EXPORTING i_structure_name = 'SFLIGHT‘ CHANGING it_outtab = gi_sflight. To pass the contents of the internal table and the line type to the SAP Grid Control, you must call the method SET_TABLE_FOR_FIRST_DISPLAY . Pass the name of the internal table to the IT_OUTTAB parameter. Here the internal table has been typed with the transparent table SPFLIGHT as the line type. Therefore, you need only pass this name to the I_STRUCTURE_NAME parameter.