<?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 Headers  are truncating while export to excel sheet in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-headers-are-truncating-while-export-to-excel-sheet/m-p/11143890#M1906395</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN style="color: #333333; font-size: 12px;"&gt;Ashish,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The option you are using is a Local file download and is not download the file as an Excel file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see that you are using SALV to display ALV. In that case, you get the option to download the ALV as an actual spreadsheet through this menu path. &lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/741775" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this option and see if you still face issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Juwin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Jul 2015 13:51:13 GMT</pubDate>
    <dc:creator>Juwin</dc:creator>
    <dc:date>2015-07-07T13:51:13Z</dc:date>
    <item>
      <title>ALV Headers  are truncating while export to excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-headers-are-truncating-while-export-to-excel-sheet/m-p/11143888#M1906393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am exporting output of my report in an excel sheet, but column headings are truncating in the excel as shown in the below screenshot.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/741637" height="118" width="690" /&gt;&lt;/P&gt;&lt;P&gt;the output is displayed as:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/741638" height="166" width="359" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as I have used the solution"&lt;SPAN style="color: #333333; font-size: 11.818181991577148px;"&gt;&lt;STRONG style="font-size: 12pt;"&gt;wa_fieldcat-ddictxt = 'L'&lt;/STRONG&gt;.&lt;/SPAN&gt;" But this is also not working as i am using the &lt;STRONG&gt;factory&lt;/STRONG&gt; methods to display the ALV as shown below.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/741640" height="225" width="292" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help and thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ashish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2015 11:42:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-headers-are-truncating-while-export-to-excel-sheet/m-p/11143888#M1906393</guid>
      <dc:creator>ashish_goyal2</dc:creator>
      <dc:date>2015-07-07T11:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Headers  are truncating while export to excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-headers-are-truncating-while-export-to-excel-sheet/m-p/11143889#M1906394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashish,&lt;/P&gt;&lt;P&gt;The requirement is not very clear to me.Still I would suggest - please check the separator that you are using.&lt;/P&gt;&lt;P&gt;Can you try using&amp;nbsp; cl_abap_char_utilities&lt;SPAN class="L0S70"&gt;=&amp;gt;&lt;/SPAN&gt;horizontal_tab&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shiwali&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2015 12:10:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-headers-are-truncating-while-export-to-excel-sheet/m-p/11143889#M1906394</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-07-07T12:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Headers  are truncating while export to excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-headers-are-truncating-while-export-to-excel-sheet/m-p/11143890#M1906395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN style="color: #333333; font-size: 12px;"&gt;Ashish,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The option you are using is a Local file download and is not download the file as an Excel file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see that you are using SALV to display ALV. In that case, you get the option to download the ALV as an actual spreadsheet through this menu path. &lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/741775" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this option and see if you still face issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Juwin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2015 13:51:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-headers-are-truncating-while-export-to-excel-sheet/m-p/11143890#M1906395</guid>
      <dc:creator>Juwin</dc:creator>
      <dc:date>2015-07-07T13:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Headers  are truncating while export to excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-headers-are-truncating-while-export-to-excel-sheet/m-p/11143891#M1906396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Juwin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;But I want to export my output using this Local file download only in the excel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2015 14:43:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-headers-are-truncating-while-export-to-excel-sheet/m-p/11143891#M1906396</guid>
      <dc:creator>ashish_goyal2</dc:creator>
      <dc:date>2015-07-07T14:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Headers  are truncating while export to excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-headers-are-truncating-while-export-to-excel-sheet/m-p/11143892#M1906397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check output length in fieldcatalog, heading passed to fieldcatalog&lt;SPAN class="L0S70"&gt;-seltext_L &lt;/SPAN&gt;&amp;amp; if you creating fieldcatalog from internal table, then check length of columns in final internal table structure.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S70"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S70"&gt;If not working post your fieldcatalog.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ajinkya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 10:09:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-headers-are-truncating-while-export-to-excel-sheet/m-p/11143892#M1906397</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-07-08T10:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Headers  are truncating while export to excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-headers-are-truncating-while-export-to-excel-sheet/m-p/11143893#M1906398</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;ashish.goyal2&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;I read you thread and solve the problem like this:&lt;/P&gt;&lt;P&gt;- I Set the column optimize;&lt;/P&gt;&lt;P&gt;- After getting the column data as in your code, I set the short and midium text with empty value;&lt;/P&gt;&lt;P&gt;-Then I used the method set_fixed_header_text to make a similar efect as the "&lt;STRONG&gt;wa_fieldcat-ddictxt = 'L'", &lt;/STRONG&gt;but thinking right now I made so many tests that I am not sure that this part is realy necessary, please try without it and check if you get the excel with the complete text of the header.&lt;/P&gt;&lt;P&gt;I hope this helps you.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*** columns settings
    lo_columns = lo_alv-&amp;gt;get_columns( ).
    lo_columns-&amp;gt;set_optimize(  ).  

    lo_col_ref = lo_columns-&amp;gt;get( ).

    LOOP AT lo_col_ref ASSIGNING &amp;lt;fs_col_ref&amp;gt;.
          &amp;lt;fs_col_ref&amp;gt;-r_column-&amp;gt;set_short_text( '' ).
          &amp;lt;fs_col_ref&amp;gt;-r_column-&amp;gt;set_medium_text( '' ).

      CALL METHOD &amp;lt;fs_col_ref&amp;gt;-r_column-&amp;gt;set_fixed_header_text
        EXPORTING
          value = 'L'.
    ENDLOOP.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Feb 2021 02:13:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-headers-are-truncating-while-export-to-excel-sheet/m-p/11143893#M1906398</guid>
      <dc:creator>lucilacon</dc:creator>
      <dc:date>2021-02-09T02:13:34Z</dc:date>
    </item>
  </channel>
</rss>

