<?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: data in Excel sheet in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-in-excel-sheet/m-p/3836474#M922569</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Twinkal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in that FM there is parameter called 'FILE TYPE'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pass the value for it as 'DBF'&lt;/P&gt;&lt;P&gt;it will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data : begin of it_heading occurs 0,
line(30) type c,
end of it_heading.
 
it_heading-line = 'ABC'.
append it_headING.
it_headING-line = 'XYZ'.
append it_headING.
 
call function 'WS_DOWNLOAD'
exporting
* BIN_FILESIZE = ' '
* CODEPAGE = ' '
filename = p_file
&amp;lt;b&amp;gt;filetype = 'DBF'&amp;lt;/b&amp;gt;
mode = ' '
* WK1_N_FORMAT = ' '
* WK1_N_SIZE = ' '
* WK1_T_FORMAT = ' '
* WK1_T_SIZE = ' '
* COL_SELECT = ' '
* COL_SELECTMASK = ' '
* NO_AUTH_CHECK = ' '
* IMPORTING
* FILELENGTH =
tables
data_tab = it_data
fieldnames = it_heading
exceptions
file_open_error = 1
file_write_error = 2
invalid_filesize = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
others = 10
.
if sy-subrc eq 0.
 
 
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Change all the fields not to be truncated, into character type in the internal table and then download it. &lt;/P&gt;&lt;P&gt;Also use Function Module: CONVERSION_EXIT_ALPHA_INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 26 Jul 2008 12:44:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-26T12:44:38Z</dc:date>
    <item>
      <title>data in Excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-in-excel-sheet/m-p/3836470#M922565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi abapers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have extracted data into excel sheet,in which i have field MARD-LGORT. its having values for storage location like 0001,0002 etc.but in excel sheet i get values like 1,2 etc.it truncates leading zeros.but i want zeros in excel sheet also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want this values without setting of excel sheet.&lt;/P&gt;&lt;P&gt;plz help me.will reward points.&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Twinkal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2008 06:59:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-in-excel-sheet/m-p/3836470#M922565</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-12T06:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: data in Excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-in-excel-sheet/m-p/3836471#M922566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friend , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) if u r getting the values 0001 in the report and 1 in excel sheet , &lt;/P&gt;&lt;P&gt;    then no problem with the field value , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the problem is with ur Excel sheet settings , change the excel sheet settings it will work , I guess no other alternate for this . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) If it is value 1 in excel sheet and ur downloading the value from excel sheet to the report , then the problem arises , when processing tht particular value MARD-LGORT it is char 4 , the system will check it for '0001' , but ur passing only ' 1 ' , here if we use conversion routine , the problem will b solved ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2008 07:10:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-in-excel-sheet/m-p/3836471#M922566</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-12T07:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: data in Excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-in-excel-sheet/m-p/3836472#M922567</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;You cant download the data in required format i.e. with leading zeroes into the excel sheeet without settings. Instead you can download the contents to the tab delimited file and then can save the same to excel sheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards,&lt;/P&gt;&lt;P&gt;Prakash Ghantasala&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2008 07:13:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-in-excel-sheet/m-p/3836472#M922567</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-12T07:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: data in Excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-in-excel-sheet/m-p/3836473#M922568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Add " ' " at the begining of the the value before downloading it to excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Excel identifies any value with a single quote at the begining as a character value or else it treats it as a numeric value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex: &lt;/P&gt;&lt;P&gt;Data: Lv_lgort(5) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate '''' MARD-LGORT into lv_lgort.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2008 07:14:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-in-excel-sheet/m-p/3836473#M922568</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-12T07:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: data in Excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-in-excel-sheet/m-p/3836474#M922569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Twinkal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in that FM there is parameter called 'FILE TYPE'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pass the value for it as 'DBF'&lt;/P&gt;&lt;P&gt;it will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data : begin of it_heading occurs 0,
line(30) type c,
end of it_heading.
 
it_heading-line = 'ABC'.
append it_headING.
it_headING-line = 'XYZ'.
append it_headING.
 
call function 'WS_DOWNLOAD'
exporting
* BIN_FILESIZE = ' '
* CODEPAGE = ' '
filename = p_file
&amp;lt;b&amp;gt;filetype = 'DBF'&amp;lt;/b&amp;gt;
mode = ' '
* WK1_N_FORMAT = ' '
* WK1_N_SIZE = ' '
* WK1_T_FORMAT = ' '
* WK1_T_SIZE = ' '
* COL_SELECT = ' '
* COL_SELECTMASK = ' '
* NO_AUTH_CHECK = ' '
* IMPORTING
* FILELENGTH =
tables
data_tab = it_data
fieldnames = it_heading
exceptions
file_open_error = 1
file_write_error = 2
invalid_filesize = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
others = 10
.
if sy-subrc eq 0.
 
 
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Change all the fields not to be truncated, into character type in the internal table and then download it. &lt;/P&gt;&lt;P&gt;Also use Function Module: CONVERSION_EXIT_ALPHA_INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Jul 2008 12:44:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-in-excel-sheet/m-p/3836474#M922569</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-26T12:44:38Z</dc:date>
    </item>
  </channel>
</rss>

