<?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: Internal Table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113940#M106902</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think Suresh has got it! Well spotted!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Feb 2006 02:28:41 GMT</pubDate>
    <dc:creator>former_member221770</dc:creator>
    <dc:date>2006-02-07T02:28:41Z</dc:date>
    <item>
      <title>Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113924#M106886</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;I have four fields in an internal table. three fields i have populated from dictionary tabe. For the fourth column I am assigning some random value. when I try to modify the internal table the modify operation is failed. To me, everything seems to be fine but it still fails. Could you please check and tell me where I am going wrong.&lt;/P&gt;&lt;P&gt;*********************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&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;     Form  int_table&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 int_table .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA :&lt;/P&gt;&lt;P&gt;    l_rnd_value LIKE datatype-integer2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear wa_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at i_ekko into wa_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'RANDOM_I2'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   RND_MIN         = 0&lt;/P&gt;&lt;P&gt;   RND_MAX         = 3&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   RND_VALUE       = l_rnd_value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if l_rnd_value = 0.&lt;/P&gt;&lt;P&gt;wa_ekko-line_color = 'C100'.&lt;/P&gt;&lt;P&gt;modify table i_ekko from wa_ekko .&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if l_rnd_value = 1.&lt;/P&gt;&lt;P&gt;wa_ekko-line_color = 'C300'.&lt;/P&gt;&lt;P&gt;modify table i_ekko from wa_ekko .&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if l_rnd_value = 2.&lt;/P&gt;&lt;P&gt;wa_ekko-line_color = 'C500'.&lt;/P&gt;&lt;P&gt;modify table i_ekko from wa_ekko .&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if l_rnd_value = 3.&lt;/P&gt;&lt;P&gt;wa_ekko-line_color = 'C600'.&lt;/P&gt;&lt;P&gt;modify table i_ekko from wa_ekko .&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear wa_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop. " Loop ends here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " int_table&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;Varun.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2006 01:51:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113924#M106886</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-07T01:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113925#M106887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Varun,&lt;/P&gt;&lt;P&gt;  Can you try this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at i_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'RANDOM_I2'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;RND_MIN = 0&lt;/P&gt;&lt;P&gt;RND_MAX = 3&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;RND_VALUE = l_rnd_value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if l_rnd_value = 0.&lt;/P&gt;&lt;P&gt;i_ekko-line_color = 'C100'.&lt;/P&gt;&lt;P&gt;modify table i_ekko index sy-tabix.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if l_rnd_value = 1.&lt;/P&gt;&lt;P&gt;i_ekko-line_color = 'C300'.&lt;/P&gt;&lt;P&gt;modify table i_ekko index sy-tabix.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if l_rnd_value = 2.&lt;/P&gt;&lt;P&gt;i_ekko-line_color = 'C500'.&lt;/P&gt;&lt;P&gt;modify table i_ekko index sy-tabix.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if l_rnd_value = 3.&lt;/P&gt;&lt;P&gt;i_ekko-line_color = 'C600'.&lt;/P&gt;&lt;P&gt;modify table i_ekko index sy-tabix .&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop. " Loop ends here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2006 01:56:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113925#M106887</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-07T01:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113926#M106888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Phani,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This still gives the same error.Moreever you cannot specify index here. It gives an error  I specify index here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Varun.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2006 02:01:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113926#M106888</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-07T02:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113927#M106889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Varun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the definition of I_EKKO and WA_EKKO? DO they have the same structure?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2006 02:01:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113927#M106889</guid>
      <dc:creator>former_member221770</dc:creator>
      <dc:date>2006-02-07T02:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113928#M106890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Patrick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  *---- Types Declaration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  TYPES: BEGIN OF t_ekko ,&lt;/P&gt;&lt;P&gt;           ebeln LIKE ekko-ebeln, " Purchasing Document Number&lt;/P&gt;&lt;P&gt;           bukrs LIKE ekko-bukrs, " Company Code&lt;/P&gt;&lt;P&gt;           bsart LIKE ekko-bsart, " Purchasing Document Type&lt;/P&gt;&lt;P&gt;           ernam LIKE ekko-ernam, " Name of Person who Created&lt;/P&gt;&lt;P&gt;                                  " the Object&lt;/P&gt;&lt;P&gt;           lifnr LIKE ekko-lifnr, " Account Number of the Vendor&lt;/P&gt;&lt;P&gt;           line_color(4) type c,         " Line color&lt;/P&gt;&lt;P&gt;         END OF t_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  *---- Table Memory Allocation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA i_ekko TYPE t_ekko OCCURS 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  *---- Work area Declaration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA wa_ekko LIKE LINE OF i_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have specified the structure as above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Varun.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2006 02:03:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113928#M106890</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-07T02:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113929#M106891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Exactly what happens when it fails? Dump, return code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2006 02:06:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113929#M106891</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-07T02:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113930#M106892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Patrick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I am right.What do you say Patrick ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Varun.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2006 02:07:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113930#M106892</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-07T02:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113931#M106893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sy-subrc returns 4. And the table is not modified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Varun.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2006 02:08:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113931#M106893</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-07T02:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113932#M106894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Varun,&lt;/P&gt;&lt;P&gt;  can you change the statement like this..&lt;/P&gt;&lt;P&gt; MODIFY TABLE I_EKKO FROM WA_EKKO TRANSPORTING LINE_COLOR.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2006 02:08:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113932#M106894</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-07T02:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113933#M106895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Phani,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No use sy-subrc is still 4. Should I forward my whole code ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Varun.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2006 02:13:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113933#M106895</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-07T02:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113934#M106896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yhea can you do that...let me check the code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2006 02:16:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113934#M106896</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-07T02:16:17Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113935#M106897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi phani,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*********************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  z_v_alv_linecolor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---- Type pools Declaration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE-POOLS slis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---- Tables declaration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES ekko. " Purchasing Document Header&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; *---- Types Declaration.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  TYPES: BEGIN OF t_ekko ,&lt;/P&gt;&lt;P&gt;           ebeln LIKE ekko-ebeln, " Purchasing Document Number&lt;/P&gt;&lt;P&gt;           bukrs LIKE ekko-bukrs, " Company Code&lt;/P&gt;&lt;P&gt;           bsart LIKE ekko-bsart, " Purchasing Document Type&lt;/P&gt;&lt;P&gt;           ernam LIKE ekko-ernam, " Name of Person who Created&lt;/P&gt;&lt;P&gt;                                  " the Object&lt;/P&gt;&lt;P&gt;           lifnr LIKE ekko-lifnr, " Account Number of the Vendor&lt;/P&gt;&lt;P&gt;           line_color(4) type c,         " Line color&lt;/P&gt;&lt;P&gt;         END OF t_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---- Table Memory Allocation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA i_ekko TYPE t_ekko OCCURS 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---- Work area Declaration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA wa_ekko LIKE LINE OF i_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*data : begin of i_ekko occurs 0,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          ebeln LIKE ekko-ebeln, " Purchasing Document Number&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          bukrs LIKE ekko-bukrs, " Company Code&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          bsart LIKE ekko-bsart, " Purchasing Document Type&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          ernam LIKE ekko-ernam, " Name of Person who Created&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                                 " the Object&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          lifnr LIKE ekko-lifnr, " Account Number of the Vendor&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          line_color(4) type c,         " Line color&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;      end of i_ekko.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---- Select options declaration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options ebeln for ekko-ebeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---- Simulation of fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : ls_layout   TYPE slis_layout_alv, " Layout&lt;/P&gt;&lt;P&gt;       ls_fieldcat TYPE slis_fieldcat_alv, " Workarea&lt;/P&gt;&lt;P&gt;       lt_fieldcat TYPE slis_t_fieldcat_alv, " Table&lt;/P&gt;&lt;P&gt;       colpos type i value 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---- Data selection into i_mara&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ebeln&lt;/P&gt;&lt;P&gt;       bukrs&lt;/P&gt;&lt;P&gt;       bsart&lt;/P&gt;&lt;P&gt;       ernam&lt;/P&gt;&lt;P&gt;       lifnr from&lt;/P&gt;&lt;P&gt;       ekko into table i_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform int_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform build_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Fill Layout - Name of the field with color&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ls_layout-info_fieldname = 'LINE_COLOR'.&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;STRONG&gt;----&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;     Form  build_fieldcat&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_fieldcat .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   I_PROGRAM_NAME               = 'Z_V_ALV_LINECOLOR'&lt;/P&gt;&lt;P&gt;   I_INTERNAL_TABNAME           = 'I_EKKO'&lt;/P&gt;&lt;P&gt;   I_STRUCTURE_NAME             = 'Z_V_ALV_LINECOLOR'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_CLIENT_NEVER_DISPLAY       = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_INCLNAME                   =&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_BUFFER_ACTIVE              =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CHANGING&lt;/P&gt;&lt;P&gt;    ct_fieldcat                  = lt_fieldcat&lt;/P&gt;&lt;UL&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;  INCONSISTENT_INTERFACE       = 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;  OTHERS                       = 3&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&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;&lt;/P&gt;&lt;P&gt;endform.                    " build_fieldcat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&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;     Form  int_table&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 int_table .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA :&lt;/P&gt;&lt;P&gt;    l_rnd_value LIKE datatype-integer2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*clear wa_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at i_ekko into wa_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'RANDOM_I2'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   RND_MIN         = 0&lt;/P&gt;&lt;P&gt;   RND_MAX         = 3&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   RND_VALUE       = l_rnd_value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if l_rnd_value = 0.&lt;/P&gt;&lt;P&gt;wa_ekko-line_color = 'C100'.&lt;/P&gt;&lt;P&gt;MODIFY TABLE I_EKKO FROM WA_EKKO TRANSPORTING LINE_COLOR.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if l_rnd_value = 1.&lt;/P&gt;&lt;P&gt;wa_ekko-line_color = 'C300'.&lt;/P&gt;&lt;P&gt;MODIFY TABLE I_EKKO FROM WA_EKKO TRANSPORTING LINE_COLOR.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if l_rnd_value = 2.&lt;/P&gt;&lt;P&gt;wa_ekko-line_color = 'C500'.&lt;/P&gt;&lt;P&gt;MODIFY TABLE I_EKKO FROM WA_EKKO TRANSPORTING LINE_COLOR.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if l_rnd_value = 3.&lt;/P&gt;&lt;P&gt;wa_ekko-line_color = 'C600'.&lt;/P&gt;&lt;P&gt;MODIFY TABLE I_EKKO FROM WA_EKKO TRANSPORTING LINE_COLOR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear wa_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop. " Loop ends here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " int_table&lt;/P&gt;&lt;P&gt;&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;Varun.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2006 02:17:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113935#M106897</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-07T02:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113936#M106898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks ok to me...do what Phiani said with the TRANSPORTING clause, but it looks good to me. Just tried it on my computer and it works fine...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2006 02:18:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113936#M106898</guid>
      <dc:creator>former_member221770</dc:creator>
      <dc:date>2006-02-07T02:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113937#M106899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Varun,&lt;/P&gt;&lt;P&gt;  Its working fine for me.just check whether you are getting data in your internal table i_ekko from your sleect statement.I can see no where clause in the select.&lt;/P&gt;&lt;P&gt;select ebeln&lt;/P&gt;&lt;P&gt;bukrs&lt;/P&gt;&lt;P&gt;bsart&lt;/P&gt;&lt;P&gt;ernam&lt;/P&gt;&lt;P&gt;lifnr from&lt;/P&gt;&lt;P&gt;ekko into table i_ekko&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;where ebeln = ebeln."your select-option.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2006 02:25:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113937#M106899</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-07T02:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113938#M106900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Varun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since you have opened the loop, you should not specify table.. just use MODIFY i_ekko from wa_ekko and you will be good to go.&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;Suresh Datti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2006 02:26:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113938#M106900</guid>
      <dc:creator>suresh_datti</dc:creator>
      <dc:date>2006-02-07T02:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113939#M106901</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;Guys go through the program in this link I am trying to do the same. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;http://www.geocities.com/mpioud/Z_ALV_LINE_COLOR.html&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I copy the program from site and execute it it &lt;/P&gt;&lt;P&gt;works fine. But when I modify a little it doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Varun.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2006 02:26:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113939#M106901</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-07T02:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113940#M106902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think Suresh has got it! Well spotted!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2006 02:28:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113940#M106902</guid>
      <dc:creator>former_member221770</dc:creator>
      <dc:date>2006-02-07T02:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113941#M106903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just use modify i_ekko from wa_ekko transporting line_color.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2006 02:31:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113941#M106903</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-07T02:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113942#M106904</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;Thank you all guys. Finally Suresh Datti got it. Anyway thanks you all for trying to help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Varun.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2006 02:31:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113942#M106904</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-07T02:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113943#M106905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*---------------------------------------------------------------------*
* Form int_table
*---------------------------------------------------------------------*
form int_table .

  DATA: l_rnd_value LIKE datatype-integer2.

  clear wa_ekko.

  loop at i_ekko into wa_ekko.
    CALL FUNCTION 'RANDOM_I2'
      EXPORTING
        RND_MIN = 0
        RND_MAX = 3
      IMPORTING
        RND_VALUE = l_rnd_value.

    case l_rnd_value.
      when 0.
        wa_ekko-line_color = 'C100'.
      when 1.
        wa_ekko-line_color = 'C300'.
      when 2.
        wa_ekko-line_color = 'C500'.
      when 3.
        wa_ekko-line_color = 'C600'.
    endcase. 
    MODIFY I_EKKO FROM WA_EKKO.
    clear wa_ekko.
  endloop. " Loop ends here.

endform. " int_table&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2006 02:40:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/1113943#M106905</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-07T02:40:58Z</dc:date>
    </item>
  </channel>
</rss>

