<?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: FM for printing variable data in excel sheet. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-printing-variable-data-in-excel-sheet/m-p/7510774#M1559534</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Namdev,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can print excel using below FM:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   CALL FUNCTION 'EXCEL_OLE_STANDARD_DAT'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        file_name                       = p_xlfile&lt;/P&gt;&lt;P&gt;     TABLES&lt;/P&gt;&lt;P&gt;        data_tab                        = it_final&lt;/P&gt;&lt;P&gt;        fieldnames                      = it_fieldnames&lt;/P&gt;&lt;P&gt;     EXCEPTIONS&lt;/P&gt;&lt;P&gt;       file_not_exist                  = 1&lt;/P&gt;&lt;P&gt;       filename_expected               = 2&lt;/P&gt;&lt;P&gt;       communication_error             = 3&lt;/P&gt;&lt;P&gt;       ole_object_method_error         = 4&lt;/P&gt;&lt;P&gt;       ole_object_property_error       = 5&lt;/P&gt;&lt;P&gt;       invalid_filename                = 6&lt;/P&gt;&lt;P&gt;       invalid_pivot_fields            = 7&lt;/P&gt;&lt;P&gt;       download_problem                = 8&lt;/P&gt;&lt;P&gt;       OTHERS                          = 9&lt;/P&gt;&lt;P&gt;              .&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;     MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;    ENDIF.&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;Regards,&lt;/P&gt;&lt;P&gt;Venkat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Nov 2010 13:18:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-11-17T13:18:06Z</dc:date>
    <item>
      <title>FM for printing variable data in excel sheet.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-printing-variable-data-in-excel-sheet/m-p/7510773#M1559533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guru,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here i stuck with one problem, i need to print dara in excel sheet which having 255 char length, my data length is more than that is there any FM to match this requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Namdev.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Nov 2010 12:59:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-printing-variable-data-in-excel-sheet/m-p/7510773#M1559533</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-17T12:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: FM for printing variable data in excel sheet.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-printing-variable-data-in-excel-sheet/m-p/7510774#M1559534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Namdev,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can print excel using below FM:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   CALL FUNCTION 'EXCEL_OLE_STANDARD_DAT'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        file_name                       = p_xlfile&lt;/P&gt;&lt;P&gt;     TABLES&lt;/P&gt;&lt;P&gt;        data_tab                        = it_final&lt;/P&gt;&lt;P&gt;        fieldnames                      = it_fieldnames&lt;/P&gt;&lt;P&gt;     EXCEPTIONS&lt;/P&gt;&lt;P&gt;       file_not_exist                  = 1&lt;/P&gt;&lt;P&gt;       filename_expected               = 2&lt;/P&gt;&lt;P&gt;       communication_error             = 3&lt;/P&gt;&lt;P&gt;       ole_object_method_error         = 4&lt;/P&gt;&lt;P&gt;       ole_object_property_error       = 5&lt;/P&gt;&lt;P&gt;       invalid_filename                = 6&lt;/P&gt;&lt;P&gt;       invalid_pivot_fields            = 7&lt;/P&gt;&lt;P&gt;       download_problem                = 8&lt;/P&gt;&lt;P&gt;       OTHERS                          = 9&lt;/P&gt;&lt;P&gt;              .&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;     MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;    ENDIF.&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;Regards,&lt;/P&gt;&lt;P&gt;Venkat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Nov 2010 13:18:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-printing-variable-data-in-excel-sheet/m-p/7510774#M1559534</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-17T13:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: FM for printing variable data in excel sheet.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-printing-variable-data-in-excel-sheet/m-p/7510775#M1559535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using FM TABLE_COMPRESS &amp;amp; TABLE_DECOMPRESS we can solve this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create internal table with 1000 lines which is shown below,&lt;/P&gt;&lt;P&gt;types: begin of ty_file,&lt;/P&gt;&lt;P&gt; line(2000) TYPE c,&lt;/P&gt;&lt;P&gt;     end of ty_file.&lt;/P&gt;&lt;P&gt; DATA: it_file type STANDARD TABLE OF ty_file,&lt;/P&gt;&lt;P&gt;       wa_file like line of it_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and define two tables for compress and decompress purpose like below shown.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: itab_comp type standard table of soli,&lt;/P&gt;&lt;P&gt;      wa_comp like line of itab_comp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: itab_unco type standard table of soli,&lt;/P&gt;&lt;P&gt;      wa_unco like line of itab_unco.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After that use both function module ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'TABLE_COMPRESS'&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      in  = it_file&lt;/P&gt;&lt;P&gt;      out = itab_comp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'TABLE_DECOMPRESS'&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      in  = itab_comp&lt;/P&gt;&lt;P&gt;      out = itab_unco.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR T_ATTACHMENT.&lt;/P&gt;&lt;P&gt;REFRESH T_ATTACHMENT.&lt;/P&gt;&lt;P&gt;T_ATTACHMENT[] = itab_unco[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pass this in internal table which is going to attachent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its work Fine..........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Nov 2010 10:51:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-printing-variable-data-in-excel-sheet/m-p/7510775#M1559535</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-22T10:51:57Z</dc:date>
    </item>
  </channel>
</rss>

