<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3175102#M755577</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;go threough below notes and sample code snippet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Info_fieldname TYPE slis_fieldname: infofield for listoutput. A whole list record can be colored individually using a color code in a column of the internal output table for the record. Assign the name of the field containing the color code to this parameter.&lt;/P&gt;&lt;P&gt;Value set: SPACE, internal output table field name&lt;/P&gt;&lt;P&gt;The internal output table field must be of type CHAR(3).&lt;/P&gt;&lt;P&gt;The code must have the following syntax:  'Cxy':&lt;/P&gt;&lt;P&gt;        C = color (all codes must start with 'C')&lt;/P&gt;&lt;P&gt;        X = color number ('1'-'9')&lt;/P&gt;&lt;P&gt;        Y = bold ('0' = off, '1' = on)&lt;/P&gt;&lt;P&gt;List_append(1) TYPE c :  no call screen. It is only useful to output block-lists without specifying the above modules if the number of list blocks exceeds, or may exceed, the maximum number specified in the block module documentation. These operations are not possible for user-defined block lists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example code : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       I_LAYOUT-f2code       = ws_fcode.&lt;/P&gt;&lt;P&gt;       I_LAYOUT-zebra        = 'X'.&lt;/P&gt;&lt;P&gt; I_LAYOUT-colwidth_optimize = 'X'.&lt;/P&gt;&lt;P&gt; I_LAYOUT-no_keyfix = 'X'.&lt;/P&gt;&lt;P&gt; I_LAYOUT-get_selinfos = 'X'.&lt;/P&gt;&lt;P&gt; I_LAYOUT-no_hotspot = 'X'.&lt;/P&gt;&lt;P&gt;       I_LAYOUT-no_input = 'X'.&lt;/P&gt;&lt;P&gt; I_LAYOUT-hotspot_fieldname = FIELDNAME.&lt;/P&gt;&lt;P&gt; I_LAYOUT-no_input          = &amp;#145;X&amp;#146;.&lt;/P&gt;&lt;P&gt; I_LAYOUT-no_vline          = `X&amp;#146;.&lt;/P&gt;&lt;P&gt; I_LAYOUT-no_colhead        = &amp;#145; &amp;#145;.&lt;/P&gt;&lt;P&gt; I_LAYOUT-lights_condense   = ` `.&lt;/P&gt;&lt;P&gt; I_LAYOUT-totals_text       = ` `.&lt;/P&gt;&lt;P&gt; I_LAYOUT-subtotals_text    = ` `.&lt;/P&gt;&lt;P&gt; I_LAYOUT-totals_only       = ` `.&lt;/P&gt;&lt;P&gt; I_LAYOUT-key_hotspot       = &amp;#145;X&amp;#146;.&lt;/P&gt;&lt;P&gt; I_LAYOUT-detail_popup      = &amp;#145;X&amp;#146;.&lt;/P&gt;&lt;P&gt; I_LAYOUT-group_change_edit = &amp;#145;X&amp;#146;.&lt;/P&gt;&lt;P&gt; I_LAYOUT-GROUP_BUTTONS     = &amp;#145;X&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;suresh.d&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Dec 2007 07:02:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-18T07:02:10Z</dc:date>
    <item>
      <title>ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3175100#M755575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to give colors to headings in ALV reports&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sekhar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2007 06:51:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3175100#M755575</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-18T06:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3175101#M755576</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;Check the below sample code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;he follow program demonstrates how to change the colour of individual rows of an ALV grid. Changes required &lt;/P&gt;&lt;P&gt;from a basic ALV grid include adding a new field to ALV grid data table(it_ekko), Populating this field with color &lt;/P&gt;&lt;P&gt;attribute and adding an entry to layout control table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report ZDEMO_ALVGRID *&lt;/P&gt;&lt;P&gt;*&amp;amp; *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; *&lt;/P&gt;&lt;P&gt;*&amp;amp; Example of a simple ALV Grid Report *&lt;/P&gt;&lt;P&gt;*&amp;amp; ................................... *&lt;/P&gt;&lt;P&gt;*&amp;amp; *&lt;/P&gt;&lt;P&gt;*&amp;amp; The basic ALV grid, Enhanced to display each row in a different *&lt;/P&gt;&lt;P&gt;*&amp;amp; colour *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT zdemo_alvgrid .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type-pools: slis. "ALV Declarations&lt;/P&gt;&lt;P&gt;*Data Declaration&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------" /&gt;&lt;P&gt;TYPES: BEGIN OF t_ekko,&lt;/P&gt;&lt;P&gt;ebeln TYPE ekpo-ebeln,&lt;/P&gt;&lt;P&gt;ebelp TYPE ekpo-ebelp,&lt;/P&gt;&lt;P&gt;statu TYPE ekpo-statu,&lt;/P&gt;&lt;P&gt;aedat TYPE ekpo-aedat,&lt;/P&gt;&lt;P&gt;matnr TYPE ekpo-matnr,&lt;/P&gt;&lt;P&gt;menge TYPE ekpo-menge,&lt;/P&gt;&lt;P&gt;meins TYPE ekpo-meins,&lt;/P&gt;&lt;P&gt;netpr TYPE ekpo-netpr,&lt;/P&gt;&lt;P&gt;peinh TYPE ekpo-peinh,&lt;/P&gt;&lt;P&gt;line_color(4) type c, "Used to store row color attributes&lt;/P&gt;&lt;P&gt;END OF t_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,&lt;/P&gt;&lt;P&gt;wa_ekko TYPE t_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*ALV data declarations&lt;/P&gt;&lt;P&gt;data: fieldcatalog type slis_t_fieldcat_alv with header line,&lt;/P&gt;&lt;P&gt;gd_tab_group type slis_t_sp_group_alv,&lt;/P&gt;&lt;P&gt;gd_layout type slis_layout_alv,&lt;/P&gt;&lt;P&gt;gd_repid like sy-repid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;*Start-of-selection.&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform data_retrieval.&lt;/P&gt;&lt;P&gt;perform build_fieldcatalog.&lt;/P&gt;&lt;P&gt;perform build_layout.&lt;/P&gt;&lt;P&gt;perform display_alv_report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form BUILD_FIELDCATALOG&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&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;Build Fieldcatalog for ALV Report&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form build_fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;There are a number of ways to create a fieldcat.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;For the purpose of this example i will build the fieldcatalog manualy&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;by populating the internal table fields individually and then&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;appending the rows. This method can be the most time consuming but can&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;also allow you more control of the final product.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Beware though, you need to ensure that all fields required are&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;populated. When using some of functionality available via ALV, such as&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;total. You may need to provide more information than if you were&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;simply displaying the result&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;I.e. Field type may be required in-order for&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;the 'TOTAL' function to work.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fieldcatalog-fieldname = 'EBELN'.&lt;/P&gt;&lt;P&gt;fieldcatalog-seltext_m = 'Purchase Order'.&lt;/P&gt;&lt;P&gt;fieldcatalog-col_pos = 0.&lt;/P&gt;&lt;P&gt;fieldcatalog-outputlen = 10.&lt;/P&gt;&lt;P&gt;fieldcatalog-emphasize = 'X'.&lt;/P&gt;&lt;P&gt;fieldcatalog-key = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;fieldcatalog-do_sum = 'X'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;fieldcatalog-no_zero = 'X'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;clear fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fieldcatalog-fieldname = 'EBELP'.&lt;/P&gt;&lt;P&gt;fieldcatalog-seltext_m = 'PO Item'.&lt;/P&gt;&lt;P&gt;fieldcatalog-col_pos = 1.&lt;/P&gt;&lt;P&gt;append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;clear fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fieldcatalog-fieldname = 'STATU'.&lt;/P&gt;&lt;P&gt;fieldcatalog-seltext_m = 'Status'.&lt;/P&gt;&lt;P&gt;fieldcatalog-col_pos = 2.&lt;/P&gt;&lt;P&gt;append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;clear fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fieldcatalog-fieldname = 'AEDAT'.&lt;/P&gt;&lt;P&gt;fieldcatalog-seltext_m = 'Item change date'.&lt;/P&gt;&lt;P&gt;fieldcatalog-col_pos = 3.&lt;/P&gt;&lt;P&gt;append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;clear fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fieldcatalog-fieldname = 'MATNR'.&lt;/P&gt;&lt;P&gt;fieldcatalog-seltext_m = 'Material Number'.&lt;/P&gt;&lt;P&gt;fieldcatalog-col_pos = 4.&lt;/P&gt;&lt;P&gt;append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;clear fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fieldcatalog-fieldname = 'MENGE'.&lt;/P&gt;&lt;P&gt;fieldcatalog-seltext_m = 'PO quantity'.&lt;/P&gt;&lt;P&gt;fieldcatalog-col_pos = 5.&lt;/P&gt;&lt;P&gt;append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;clear fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fieldcatalog-fieldname = 'MEINS'.&lt;/P&gt;&lt;P&gt;fieldcatalog-seltext_m = 'Order Unit'.&lt;/P&gt;&lt;P&gt;fieldcatalog-col_pos = 6.&lt;/P&gt;&lt;P&gt;append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;clear fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fieldcatalog-fieldname = 'NETPR'.&lt;/P&gt;&lt;P&gt;fieldcatalog-seltext_m = 'Net Price'.&lt;/P&gt;&lt;P&gt;fieldcatalog-col_pos = 7.&lt;/P&gt;&lt;P&gt;fieldcatalog-outputlen = 15.&lt;/P&gt;&lt;P&gt;fieldcatalog-datatype = 'CURR'.&lt;/P&gt;&lt;P&gt;append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;clear fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fieldcatalog-fieldname = 'PEINH'.&lt;/P&gt;&lt;P&gt;fieldcatalog-seltext_m = 'Price Unit'.&lt;/P&gt;&lt;P&gt;fieldcatalog-col_pos = 8.&lt;/P&gt;&lt;P&gt;append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;clear fieldcatalog.&lt;/P&gt;&lt;P&gt;endform. " BUILD_FIELDCATALOG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form BUILD_LAYOUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&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;Build layout for ALV grid report&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form build_layout.&lt;/P&gt;&lt;P&gt;gd_layout-no_input = 'X'.&lt;/P&gt;&lt;P&gt;gd_layout-colwidth_optimize = 'X'.&lt;/P&gt;&lt;P&gt;gd_layout-totals_text = 'Totals'(201).&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Set layout field for row attributes(i.e. color) &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;gd_layout-info_fieldname = 'LINE_COLOR'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;gd_layout-totals_only = 'X'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;gd_layout-f2code = 'DISP'. "Sets fcode for when double&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;"click(press f2)&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;gd_layout-zebra = 'X'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;gd_layout-group_change_edit = 'X'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;gd_layout-header_text = 'helllllo'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endform. " BUILD_LAYOUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form DISPLAY_ALV_REPORT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&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;Display report using ALV grid&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form display_alv_report.&lt;/P&gt;&lt;P&gt;gd_repid = sy-repid.&lt;/P&gt;&lt;P&gt;call function 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;i_callback_program = gd_repid&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;i_callback_user_command = 'USER_COMMAND'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;i_grid_title = outtext&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;is_layout = gd_layout&lt;/P&gt;&lt;P&gt;it_fieldcat = fieldcatalog[]&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;it_special_groups = gd_tabgroup&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IT_EVENTS = GT_XEVENTS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;i_save = 'X'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;is_variant = z_template&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;t_outtab = it_ekko&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;program_error = 1&lt;/P&gt;&lt;P&gt;others = 2.&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endform. " DISPLAY_ALV_REPORT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form DATA_RETRIEVAL&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&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;Retrieve data form EKPO table and populate itab it_ekko&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form data_retrieval.&lt;/P&gt;&lt;P&gt;data: ld_color(1) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ebeln ebelp statu aedat matnr menge meins netpr peinh&lt;/P&gt;&lt;P&gt;up to 10 rows&lt;/P&gt;&lt;P&gt;from ekpo&lt;/P&gt;&lt;P&gt;into table it_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Populate field with color attributes&lt;/P&gt;&lt;P&gt;loop at it_ekko into wa_ekko.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate color variable with colour properties&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Char 1 = C (This is a color property)&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Char 2 = 3 (Color codes: 1 - 7)&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Char 3 = Intensified on/off ( 1 or 0 )&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Char 4 = Inverse display on/off ( 1 or 0 )&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;i.e. wa_ekko-line_color = 'C410'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ld_color = ld_color + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Only 7 colours so need to reset color value&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if ld_color = 8.&lt;/P&gt;&lt;P&gt;ld_color = 1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;concatenate 'C' ld_color '10' into wa_ekko-line_color.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;wa_ekko-line_color = 'C410'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;modify it_ekko from wa_ekko.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endform. " DATA_RETRIEVAL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2007 06:58:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3175101#M755576</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2007-12-18T06:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3175102#M755577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;go threough below notes and sample code snippet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Info_fieldname TYPE slis_fieldname: infofield for listoutput. A whole list record can be colored individually using a color code in a column of the internal output table for the record. Assign the name of the field containing the color code to this parameter.&lt;/P&gt;&lt;P&gt;Value set: SPACE, internal output table field name&lt;/P&gt;&lt;P&gt;The internal output table field must be of type CHAR(3).&lt;/P&gt;&lt;P&gt;The code must have the following syntax:  'Cxy':&lt;/P&gt;&lt;P&gt;        C = color (all codes must start with 'C')&lt;/P&gt;&lt;P&gt;        X = color number ('1'-'9')&lt;/P&gt;&lt;P&gt;        Y = bold ('0' = off, '1' = on)&lt;/P&gt;&lt;P&gt;List_append(1) TYPE c :  no call screen. It is only useful to output block-lists without specifying the above modules if the number of list blocks exceeds, or may exceed, the maximum number specified in the block module documentation. These operations are not possible for user-defined block lists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example code : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       I_LAYOUT-f2code       = ws_fcode.&lt;/P&gt;&lt;P&gt;       I_LAYOUT-zebra        = 'X'.&lt;/P&gt;&lt;P&gt; I_LAYOUT-colwidth_optimize = 'X'.&lt;/P&gt;&lt;P&gt; I_LAYOUT-no_keyfix = 'X'.&lt;/P&gt;&lt;P&gt; I_LAYOUT-get_selinfos = 'X'.&lt;/P&gt;&lt;P&gt; I_LAYOUT-no_hotspot = 'X'.&lt;/P&gt;&lt;P&gt;       I_LAYOUT-no_input = 'X'.&lt;/P&gt;&lt;P&gt; I_LAYOUT-hotspot_fieldname = FIELDNAME.&lt;/P&gt;&lt;P&gt; I_LAYOUT-no_input          = &amp;#145;X&amp;#146;.&lt;/P&gt;&lt;P&gt; I_LAYOUT-no_vline          = `X&amp;#146;.&lt;/P&gt;&lt;P&gt; I_LAYOUT-no_colhead        = &amp;#145; &amp;#145;.&lt;/P&gt;&lt;P&gt; I_LAYOUT-lights_condense   = ` `.&lt;/P&gt;&lt;P&gt; I_LAYOUT-totals_text       = ` `.&lt;/P&gt;&lt;P&gt; I_LAYOUT-subtotals_text    = ` `.&lt;/P&gt;&lt;P&gt; I_LAYOUT-totals_only       = ` `.&lt;/P&gt;&lt;P&gt; I_LAYOUT-key_hotspot       = &amp;#145;X&amp;#146;.&lt;/P&gt;&lt;P&gt; I_LAYOUT-detail_popup      = &amp;#145;X&amp;#146;.&lt;/P&gt;&lt;P&gt; I_LAYOUT-group_change_edit = &amp;#145;X&amp;#146;.&lt;/P&gt;&lt;P&gt; I_LAYOUT-GROUP_BUTTONS     = &amp;#145;X&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;suresh.d&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2007 07:02:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3175102#M755577</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-18T07:02:10Z</dc:date>
    </item>
  </channel>
</rss>

