<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ALV LISTS in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-lists/m-p/3496957#M841141</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try the following&lt;/P&gt;&lt;P&gt;riday, November 9, 2007&lt;/P&gt;&lt;P&gt;ALV LIST USING OO STYLE SAMPLE CODE &lt;/P&gt;&lt;P&gt;1. Create a Control (for Custom and Split Containers only)&lt;/P&gt;&lt;P&gt;2. Instantiate a Container Object (in case of Custom and Split Containers, specify the control which is created by us in Screen painter) CREATE OBJECT &lt;/P&gt;&lt;P&gt;3. Instantiate an Object of the kind of report that has to be displayed (List, Grid or Tree). CREATE OBJECT . Here we need to specify the Parent Container as the so that it sits in that container.&lt;/P&gt;&lt;P&gt;4. Call appropriate methods to display the report on the screen. CALL METHOD -&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;DATA : g_dock TYPE REF TO cl_gui_docking_container,&lt;/P&gt;&lt;P&gt;g_split TYPE REF TO cl_gui_easy_splitter_container,&lt;/P&gt;&lt;P&gt;g_cont1 TYPE REF TO cl_gui_container,&lt;/P&gt;&lt;P&gt;g_cont2 TYPE REF TO cl_gui_container,&lt;/P&gt;&lt;P&gt;g_grid1 TYPE REF TO cl_gui_alv_grid,&lt;/P&gt;&lt;P&gt;g_grid2 TYPE REF TO cl_gui_alv_grid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;i_mara is an internal table of structure MARA&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SELECT * FROM mara INTO TABLE i_mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;i_kna1 is an internal table of structure KNA1&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM kna1 INTO TABLE i_kna1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To create an Object of type Docking Container&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OBJECT g_dock&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;side = cl_gui_docking_container=&amp;gt;dock_at_top&lt;/P&gt;&lt;P&gt;extension = 200 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To Create an Object of Type Split Container. Here we can see that the Docking *Container Created above has been used as a parent .&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OBJECT g_split&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;parent = g_dock&lt;/P&gt;&lt;P&gt;orientation = 1 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Easy Split container splits one Control into 2 manageable controls, each of them is used * to handle one GUI Container each&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;g_cont1 = g_split-&amp;gt;top_left_container.&lt;/P&gt;&lt;P&gt;g_cont2 = g_split-&amp;gt;bottom_right_container.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To Create an Object of type Grid . Here we can see that the Left Split Container * Created above has been used as a parent .&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OBJECT g_grid1&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_parent = g_cont1 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To Create an Object of type Grid . Here we can see that the Right Split Container * Created above has been used as a parent .&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OBJECT g_grid2&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_parent = g_cont2 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The method of Grid Control Object is used to display the Data.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD g_grid1-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_structure_name = 'MARA'&lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;it_outtab = i_mara[] .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The method of Grid Control Object is used to display the Data.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD g_grid2-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_structure_name = 'KNA1'&lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;it_outtab = i_kna1[] .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RELATED POSTS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALV INTERACTIVE REPORT SAMPLE CODE&lt;/P&gt;&lt;P&gt;INTERACTIVE REPORT SAMPLE CODE 2&lt;/P&gt;&lt;P&gt;ALV SAMPLE CODE OUTPUT TO EXCEL SHEET&lt;/P&gt;&lt;P&gt;ALV SAMPLE CODE COLOURING &lt;/P&gt;&lt;P&gt;ALV SIMPLE REPORT SAMPLE CODE&lt;/P&gt;&lt;P&gt;ALV DOUBLE CLICK SAMPLE CODE&lt;/P&gt;&lt;P&gt;ALV INTERACTIVE REPORT SAMPLE CODE&lt;/P&gt;&lt;P&gt;ALV FOR CHECK BOXES SAMPLE CODE&lt;/P&gt;&lt;P&gt;ALV BLOCK REPORT SAMPLE CODE&lt;/P&gt;&lt;P&gt;ALV LAYOUT DISPLAY SAMPLE CODE&lt;/P&gt;&lt;P&gt;ALV LIST DISPLAY SAMPLE CODE&lt;/P&gt;&lt;P&gt;ALV HIRARCHICAL REPORT SAMPLE CODE&lt;/P&gt;&lt;P&gt;EXECUTABLE REPORT ON ALV&lt;/P&gt;&lt;P&gt;REPLACE COMMENTARY WITH ALV REPORT&lt;/P&gt;&lt;P&gt;SAMPLE CODE FOR DATA BASE ACCESSING FROM UNIX FILE&lt;/P&gt;&lt;P&gt;ALV SAMPLE CODE CONTACT RENUAL DETAILS&lt;/P&gt;&lt;P&gt;ALV BASICS&lt;/P&gt;&lt;P&gt;ALV GRID CONTROL&lt;/P&gt;&lt;P&gt;ALV COMPLETE DOCUMENTATION&lt;/P&gt;&lt;P&gt;ABAP CROSS APPLICATIONS DEFINATIONS&lt;/P&gt;&lt;P&gt;ALV DOCS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it will help you&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;sreelatha gullapalli&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Feb 2008 10:01:07 GMT</pubDate>
    <dc:creator>sreelatha_gullapalli</dc:creator>
    <dc:date>2008-02-28T10:01:07Z</dc:date>
    <item>
      <title>ALV LISTS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-lists/m-p/3496956#M841140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;I'm using function module REUSE_ALV_GRID_DISPLAY to display an ALV list. I want to display a column say 'STATUS'&lt;/P&gt;&lt;P&gt;traffic lights or some tick mark icon depending on a condition of a column.How to do this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2008 09:52:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-lists/m-p/3496956#M841140</guid>
      <dc:creator>gautam_totekar</dc:creator>
      <dc:date>2008-02-28T09:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: ALV LISTS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-lists/m-p/3496957#M841141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try the following&lt;/P&gt;&lt;P&gt;riday, November 9, 2007&lt;/P&gt;&lt;P&gt;ALV LIST USING OO STYLE SAMPLE CODE &lt;/P&gt;&lt;P&gt;1. Create a Control (for Custom and Split Containers only)&lt;/P&gt;&lt;P&gt;2. Instantiate a Container Object (in case of Custom and Split Containers, specify the control which is created by us in Screen painter) CREATE OBJECT &lt;/P&gt;&lt;P&gt;3. Instantiate an Object of the kind of report that has to be displayed (List, Grid or Tree). CREATE OBJECT . Here we need to specify the Parent Container as the so that it sits in that container.&lt;/P&gt;&lt;P&gt;4. Call appropriate methods to display the report on the screen. CALL METHOD -&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;DATA : g_dock TYPE REF TO cl_gui_docking_container,&lt;/P&gt;&lt;P&gt;g_split TYPE REF TO cl_gui_easy_splitter_container,&lt;/P&gt;&lt;P&gt;g_cont1 TYPE REF TO cl_gui_container,&lt;/P&gt;&lt;P&gt;g_cont2 TYPE REF TO cl_gui_container,&lt;/P&gt;&lt;P&gt;g_grid1 TYPE REF TO cl_gui_alv_grid,&lt;/P&gt;&lt;P&gt;g_grid2 TYPE REF TO cl_gui_alv_grid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;i_mara is an internal table of structure MARA&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SELECT * FROM mara INTO TABLE i_mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;i_kna1 is an internal table of structure KNA1&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM kna1 INTO TABLE i_kna1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To create an Object of type Docking Container&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OBJECT g_dock&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;side = cl_gui_docking_container=&amp;gt;dock_at_top&lt;/P&gt;&lt;P&gt;extension = 200 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To Create an Object of Type Split Container. Here we can see that the Docking *Container Created above has been used as a parent .&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OBJECT g_split&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;parent = g_dock&lt;/P&gt;&lt;P&gt;orientation = 1 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Easy Split container splits one Control into 2 manageable controls, each of them is used * to handle one GUI Container each&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;g_cont1 = g_split-&amp;gt;top_left_container.&lt;/P&gt;&lt;P&gt;g_cont2 = g_split-&amp;gt;bottom_right_container.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To Create an Object of type Grid . Here we can see that the Left Split Container * Created above has been used as a parent .&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OBJECT g_grid1&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_parent = g_cont1 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To Create an Object of type Grid . Here we can see that the Right Split Container * Created above has been used as a parent .&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OBJECT g_grid2&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_parent = g_cont2 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The method of Grid Control Object is used to display the Data.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD g_grid1-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_structure_name = 'MARA'&lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;it_outtab = i_mara[] .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The method of Grid Control Object is used to display the Data.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD g_grid2-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_structure_name = 'KNA1'&lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;it_outtab = i_kna1[] .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RELATED POSTS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALV INTERACTIVE REPORT SAMPLE CODE&lt;/P&gt;&lt;P&gt;INTERACTIVE REPORT SAMPLE CODE 2&lt;/P&gt;&lt;P&gt;ALV SAMPLE CODE OUTPUT TO EXCEL SHEET&lt;/P&gt;&lt;P&gt;ALV SAMPLE CODE COLOURING &lt;/P&gt;&lt;P&gt;ALV SIMPLE REPORT SAMPLE CODE&lt;/P&gt;&lt;P&gt;ALV DOUBLE CLICK SAMPLE CODE&lt;/P&gt;&lt;P&gt;ALV INTERACTIVE REPORT SAMPLE CODE&lt;/P&gt;&lt;P&gt;ALV FOR CHECK BOXES SAMPLE CODE&lt;/P&gt;&lt;P&gt;ALV BLOCK REPORT SAMPLE CODE&lt;/P&gt;&lt;P&gt;ALV LAYOUT DISPLAY SAMPLE CODE&lt;/P&gt;&lt;P&gt;ALV LIST DISPLAY SAMPLE CODE&lt;/P&gt;&lt;P&gt;ALV HIRARCHICAL REPORT SAMPLE CODE&lt;/P&gt;&lt;P&gt;EXECUTABLE REPORT ON ALV&lt;/P&gt;&lt;P&gt;REPLACE COMMENTARY WITH ALV REPORT&lt;/P&gt;&lt;P&gt;SAMPLE CODE FOR DATA BASE ACCESSING FROM UNIX FILE&lt;/P&gt;&lt;P&gt;ALV SAMPLE CODE CONTACT RENUAL DETAILS&lt;/P&gt;&lt;P&gt;ALV BASICS&lt;/P&gt;&lt;P&gt;ALV GRID CONTROL&lt;/P&gt;&lt;P&gt;ALV COMPLETE DOCUMENTATION&lt;/P&gt;&lt;P&gt;ABAP CROSS APPLICATIONS DEFINATIONS&lt;/P&gt;&lt;P&gt;ALV DOCS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it will help you&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;sreelatha gullapalli&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2008 10:01:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-lists/m-p/3496957#M841141</guid>
      <dc:creator>sreelatha_gullapalli</dc:creator>
      <dc:date>2008-02-28T10:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: ALV LISTS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-lists/m-p/3496958#M841142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But the approach given by you is for ALV GRID using Object orirnted methods.&lt;/P&gt;&lt;P&gt;I want to use function module REUSE_ALV_GRID_DISPLAY&lt;/P&gt;&lt;P&gt;which is for lists.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2008 10:14:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-lists/m-p/3496958#M841142</guid>
      <dc:creator>gautam_totekar</dc:creator>
      <dc:date>2008-02-28T10:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: ALV LISTS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-lists/m-p/3496959#M841143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this code for Demo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Report ZMDEMO_ALV_04&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp;Make an Exception field ( = Traffic lights)&lt;/P&gt;&lt;P&gt;*&amp;amp;There can be defined a column in the grid for display of traffic lights. This field is of type Char 1, and can contain the following values:&lt;/P&gt;&lt;P&gt;*&amp;amp; 1 Red&lt;/P&gt;&lt;P&gt;*&amp;amp; 2 Yellow&lt;/P&gt;&lt;P&gt;*&amp;amp; 3 Green&lt;/P&gt;&lt;P&gt;*&amp;amp;The name of the traffic light field is supplied inh the gs_layout-excp_fname used by method set_table_for_first_display.&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report zmdemo_alv_04.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type-pools: icon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of ty_sflight.&lt;/P&gt;&lt;P&gt;include structure sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: traffic_light type c,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;lights LIKE icon_xml_doc,&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lights(4),&lt;/P&gt;&lt;P&gt;icon type icon-id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: end of ty_sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;G L O B A L I N T E R N A L T A B L E S&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;data: t_sflight type standard table of ty_sflight.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;G L O B A L D A T A&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;data: ok_code like sy-ucomm,&lt;/P&gt;&lt;P&gt;wa_sflight type ty_sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Declare reference variables to the ALV grid and the container&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;go_grid type ref to cl_gui_alv_grid,&lt;/P&gt;&lt;P&gt;go_custom_container type ref to cl_gui_custom_container.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;t_fcat type lvc_t_fcat,&lt;/P&gt;&lt;P&gt;wa_layout type lvc_s_layo.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;S T A R T - O F - S E L E C T I O N.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;perform build_fieldcat.&lt;/P&gt;&lt;P&gt;perform build_layout.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set screen '100'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Module USER_COMMAND_0100 INPUT&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;module user_command_0100 input.&lt;/P&gt;&lt;P&gt;case ok_code.&lt;/P&gt;&lt;P&gt;when 'EXIT'.&lt;/P&gt;&lt;P&gt;leave to screen 0.&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;endmodule. " USER_COMMAND_0100 INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Module STATUS_0100 OUTPUT&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;module status_0100 output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create objects&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if go_custom_container is initial.&lt;/P&gt;&lt;P&gt;create object go_custom_container&lt;/P&gt;&lt;P&gt;exporting container_name = 'ALV_CONTAINER'.&lt;/P&gt;&lt;P&gt;create object go_grid&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;i_parent = go_custom_container.&lt;/P&gt;&lt;P&gt;perform load_data_into_grid.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endmodule. " STATUS_0100 OUTPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form load_data_into_grid&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;form load_data_into_grid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data l_light type c value '1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read data from table SFLIGHT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;from sflight&lt;/P&gt;&lt;P&gt;into table t_sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;o&lt;/P&gt;&lt;P&gt;+ Condition placing to the traffic_light Field&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;LOOP AT t_sflight INTO wa_sflight.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;wa_sflight-traffic_light = l_light.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MODIFY t_sflight FROM wa_sflight.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IF l_light = '3'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;l_light = '1'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;l_light = l_light + 1.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;o&lt;/P&gt;&lt;P&gt;+ Setting the Icon based on the traffic_light field value.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;LOOP AT t_sflight INTO wa_sflight.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CASE wa_sflight-traffic_light.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WHEN '1'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;wa_sflight-lights = icon_red_light.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WHEN '2'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;wa_sflight-lights = icon_yellow_light.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WHEN '3'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;wa_sflight-lights = icon_green_light.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MODIFY t_sflight FROM wa_sflight.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at t_sflight into wa_sflight.&lt;/P&gt;&lt;P&gt;case l_light.&lt;/P&gt;&lt;P&gt;when '1'.&lt;/P&gt;&lt;P&gt;wa_sflight-lights = icon_red_light.&lt;/P&gt;&lt;P&gt;when '2'.&lt;/P&gt;&lt;P&gt;wa_sflight-lights = icon_yellow_light.&lt;/P&gt;&lt;P&gt;when '3'.&lt;/P&gt;&lt;P&gt;wa_sflight-lights = icon_green_light.&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if l_light = '3'.&lt;/P&gt;&lt;P&gt;l_light = '1'.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;l_light = l_light + 1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify t_sflight from wa_sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Load data into the grid and display them&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method go_grid-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;I_BUFFER_ACTIVE =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;I_BYPASSING_BUFFER =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;I_CONSISTENCY_CHECK =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;i_structure_name = 'SFLIGHT'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IS_VARIANT =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;i_save = 'A'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;I_DEFAULT = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is_layout = wa_layout&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IS_PRINT =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IT_SPECIAL_GROUPS =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IT_TOOLBAR_EXCLUDING =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IT_HYPERLINK =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IT_ALV_GRAPHICS =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IT_EXCEPT_QINFO =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IR_SALV_ADAPTER =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;changing&lt;/P&gt;&lt;P&gt;it_outtab = t_sflight[]&lt;/P&gt;&lt;P&gt;it_fieldcatalog = t_fcat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IT_SORT =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IT_FILTER =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;INVALID_PARAMETER_COMBINATION = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;PROGRAM_ERROR = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;TOO_MANY_LINES = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;others = 4&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;endform. " load_data_into_grid&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form build_fieldcat&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;--&amp;gt; p1 text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;&amp;lt;-- p2 text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form build_fieldcat .&lt;/P&gt;&lt;P&gt;data: w_fcat type lvc_s_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;define macro_fcat.&lt;/P&gt;&lt;P&gt;w_fcat-fieldname = &amp;amp;1.&lt;/P&gt;&lt;P&gt;w_fcat-col_pos = &amp;amp;2.&lt;/P&gt;&lt;P&gt;w_fcat-coltext = &amp;amp;3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append w_fcat to t_fcat.&lt;/P&gt;&lt;P&gt;clear w_fcat.&lt;/P&gt;&lt;P&gt;end-of-definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;macro_fcat 'CARRID' 1 text-c01 .&lt;/P&gt;&lt;P&gt;macro_fcat 'CONNID' 2 text-c02 .&lt;/P&gt;&lt;P&gt;macro_fcat 'FLDATE' 3 text-c03 .&lt;/P&gt;&lt;P&gt;macro_fcat 'PRICE' 4 text-c04 .&lt;/P&gt;&lt;P&gt;macro_fcat 'SEATSMAX' 5 text-c05 .&lt;/P&gt;&lt;P&gt;macro_fcat 'SEATSOCC' 6 text-c06 .&lt;/P&gt;&lt;P&gt;macro_fcat 'LIGHTS' 7 text-c07 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform. " build_fieldcat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form build_layout&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;--&amp;gt; p1 text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;&amp;lt;-- p2 text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form build_layout .&lt;/P&gt;&lt;P&gt;wa_layout-cwidth_opt = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;wa_layout-excp_fname = 'TRAFFIC_LIGHT'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;wa_layout-excp_group = '1'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform. " build_layout&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dhruv Shah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2008 10:29:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-lists/m-p/3496959#M841143</guid>
      <dc:creator>dhruv_shah3</dc:creator>
      <dc:date>2008-02-28T10:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: ALV LISTS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-lists/m-p/3496960#M841144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gautam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at this demo program which uses the traffic lights BCALV_DEMO_TOOLTIP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2008 10:33:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-lists/m-p/3496960#M841144</guid>
      <dc:creator>kinnera_christinatenali</dc:creator>
      <dc:date>2008-02-28T10:33:16Z</dc:date>
    </item>
  </channel>
</rss>

