<?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 List  Display  , column width in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-list-display-column-width/m-p/4727727#M1109794</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;           I apretiate your response, Is there a way other than LAYOUT-colwidth_optimize, because if I use LAYOUT-colwidth_optimize = ' '. then the report dosent fit into a single page to print.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Nov 2008 08:28:23 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-11T08:28:23Z</dc:date>
    <item>
      <title>Alv List  Display  , column width</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-list-display-column-width/m-p/4727723#M1109790</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;          I am using ALV List display for a report, Now my issue is the column width keeps changing based on the line size, please advise how to calculate the width of each column. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg: for particular date range   , the Description width is small ,                    &lt;/P&gt;&lt;P&gt;__________________________               &lt;/P&gt;&lt;P&gt;&lt;U&gt;|  Name |``````     Descreption       `````` |&lt;/U&gt;                &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for some different date range it changes to more wider,&lt;/P&gt;&lt;P&gt; ____________________________________________________ &lt;/P&gt;&lt;P&gt;&lt;U&gt;|  Name |  ``````````````` ``````````` Descreption  `````````` ````````````````|&lt;/U&gt;     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; so how should calculate the column width.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: soyunee on Nov 11, 2008 1:39 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 08:08:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-list-display-column-width/m-p/4727723#M1109790</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T08:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: Alv List  Display  , column width</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-list-display-column-width/m-p/4727724#M1109791</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;There is an option in the LAYOUT of the alv,,,,, While setting the layout......... use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
v_alv_layout-colwidth_optimize = 'x'.

This Will optimize the width of all the columns in your alv list display
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Saurabh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 08:15:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-list-display-column-width/m-p/4727724#M1109791</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T08:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: Alv List  Display  , column width</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-list-display-column-width/m-p/4727725#M1109792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;u wont be able to calculate the column width....but can find the length of the ;'Description' in itab by the statement STRLEN( fld_name ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and if u set the LAYOUT-colwidth_optimize = 'X'. then the output will take the length of the longest field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and if u set LAYOUT-colwidth_optimize = ' '. then the output width will take the length u specify in FIELDCATALO-OUTPUTLEN.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 08:15:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-list-display-column-width/m-p/4727725#M1109792</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T08:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: Alv List  Display  , column width</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-list-display-column-width/m-p/4727726#M1109793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Soyunee,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are talking about Normal ALV:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you need to use the &lt;/P&gt;&lt;P&gt;LAYOUT-COLWIDTH-OPTIMIZE = 'X' . &lt;/P&gt;&lt;P&gt;and the layout structure you need to pass it to layout parameter of ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you are talking about ALV OO:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you need to use the &lt;/P&gt;&lt;P&gt;LAYOUT-CWIDTH_OPT = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will adjust your column length according to its values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nitin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 08:19:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-list-display-column-width/m-p/4727726#M1109793</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T08:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: Alv List  Display  , column width</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-list-display-column-width/m-p/4727727#M1109794</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;           I apretiate your response, Is there a way other than LAYOUT-colwidth_optimize, because if I use LAYOUT-colwidth_optimize = ' '. then the report dosent fit into a single page to print.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 08:28:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-list-display-column-width/m-p/4727727#M1109794</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T08:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: Alv List  Display  , column width</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-list-display-column-width/m-p/4727728#M1109795</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;If you don't want to LAYOUT-COL_WIDTH_OPTIMIZE,,, Then In your field-catalog specify the OUTPUT-length for each field......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for ex.....&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
fieldcat-outputlen = m_len.

In this case you can specify your own length for each field,specify the length accordingly so that it can fix in your papaer...........

still if it doesn't fit in your page......
Then while giving the print-out increase your page width... There is standard format provided by sap that is 'X_SPOLLER',,, THAT IS 65x255 ROWS YOU CAN CREATE YOUR OWN FORMAT AND THEN GIVE PRINTOUT,,  THEN IT WILL WORK....
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tHANKS&lt;/P&gt;&lt;P&gt;sAURABH&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 08:38:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-list-display-column-width/m-p/4727728#M1109795</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T08:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: Alv List  Display  , column width</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-list-display-column-width/m-p/4727729#M1109796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Soyunee,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following are the few options related to heading:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  seltext_l (long field label)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· seltext_m (medium field label)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· seltext_s (short field label)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· reptext_ddic(header) Analogous to the Data element main header&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· Ddictxt (specify text) : You can specify with values 'L', 'M', and 'S', the keyword that should always be used as column header. If the column width changes, no attempt is made in this case to find an appropriate header for the new output width.&lt;/P&gt;&lt;P&gt;Value set: SPACE, 'L', 'M', and &amp;#145;S&amp;#146;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can set DDICTXT as S, then it will take short text seltext_s by default. This can reduce the width of your report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nitin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 08:43:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-list-display-column-width/m-p/4727729#M1109796</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T08:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: Alv List  Display  , column width</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-list-display-column-width/m-p/4727730#M1109797</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;         When using Colwidth_optimize = 'X', if I am not wrong , it takes the width of the field which has largest characters,  and sets the column width as 'Y' (eg).    &lt;/P&gt;&lt;P&gt;         How do i know what is the value of 'Y' , which it sets as width.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2008 03:10:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-list-display-column-width/m-p/4727730#M1109797</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-12T03:10:58Z</dc:date>
    </item>
  </channel>
</rss>

