<?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: cl_gui_alv_tree_simple and optimize column width in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-alv-tree-simple-and-optimize-column-width/m-p/6754067#M1460632</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The above post would set the column width to a static width, which, I don't think is what you are looking for. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ls_fieldcat-COL_OPT = 'X'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where  ls_fieldcat is defined as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ls_fieldcat TYPE lvc_s_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and you are in a loop through your field catalog.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Apr 2010 14:06:42 GMT</pubDate>
    <dc:creator>mike_reader3</dc:creator>
    <dc:date>2010-04-14T14:06:42Z</dc:date>
    <item>
      <title>cl_gui_alv_tree_simple and optimize column width</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-alv-tree-simple-and-optimize-column-width/m-p/6754063#M1460628</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;I'm using cl_gui_alv_tree_simple like i've seen in the program 'BCALV_TREE_SIMPLE_DEMO'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and like in the demo the columns dont apear optimized for the width of it's content.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;edit&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the code we can found this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* optimize column-width
  CALL METHOD tree1-&amp;gt;column_optimize
    EXPORTING
      i_start_column = tree1-&amp;gt;c_hierarchy_column_name
      i_end_column   = tree1-&amp;gt;c_hierarchy_column_name.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it seems to do nothing...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Apr 2010 11:03:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-alv-tree-simple-and-optimize-column-width/m-p/6754063#M1460628</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-14T11:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: cl_gui_alv_tree_simple and optimize column width</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-alv-tree-simple-and-optimize-column-width/m-p/6754064#M1460629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to give the column name of type LVC_FNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD tree1-&amp;gt;column_optimize&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    I_START_COLUMN         = nnnnnnnnnnnnnn&lt;/P&gt;&lt;P&gt;    I_END_COLUMN           = nnnnnnnnnnnn&lt;/P&gt;&lt;P&gt;    I_INCLUDE_HEADING      = 'X'&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    START_COLUMN_NOT_FOUND = 1&lt;/P&gt;&lt;P&gt;    END_COLUMN_NOT_FOUND   = 2&lt;/P&gt;&lt;P&gt;    others                 = 3&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Apr 2010 13:03:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-alv-tree-simple-and-optimize-column-width/m-p/6754064#M1460629</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-14T13:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: cl_gui_alv_tree_simple and optimize column width</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-alv-tree-simple-and-optimize-column-width/m-p/6754065#M1460630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can u be more specific? i dont understant what you mean&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Apr 2010 13:18:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-alv-tree-simple-and-optimize-column-width/m-p/6754065#M1460630</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-14T13:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: cl_gui_alv_tree_simple and optimize column width</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-alv-tree-simple-and-optimize-column-width/m-p/6754066#M1460631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Forget the above post. you need to make the changes in field catalog..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in field catalog set this property.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ls_fieldcatalog-outputlen = '12'.      *12 is the length of that column.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Apr 2010 13:50:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-alv-tree-simple-and-optimize-column-width/m-p/6754066#M1460631</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-14T13:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: cl_gui_alv_tree_simple and optimize column width</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-alv-tree-simple-and-optimize-column-width/m-p/6754067#M1460632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The above post would set the column width to a static width, which, I don't think is what you are looking for. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ls_fieldcat-COL_OPT = 'X'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where  ls_fieldcat is defined as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ls_fieldcat TYPE lvc_s_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and you are in a loop through your field catalog.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Apr 2010 14:06:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-alv-tree-simple-and-optimize-column-width/m-p/6754067#M1460632</guid>
      <dc:creator>mike_reader3</dc:creator>
      <dc:date>2010-04-14T14:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: cl_gui_alv_tree_simple and optimize column width</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-alv-tree-simple-and-optimize-column-width/m-p/6754068#M1460633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;col_opt didtn work...i have no idea why..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so i fixed it hardcoding it with the outputleght field&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Apr 2010 14:37:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-alv-tree-simple-and-optimize-column-width/m-p/6754068#M1460633</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-14T14:37:27Z</dc:date>
    </item>
  </channel>
</rss>

