<?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: Problem with data format in the excel attachment in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-format-in-the-excel-attachment/m-p/7532849#M1561690</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;DATA : LV_DATFM_KEY TYPE XUDATFM.&lt;/P&gt;&lt;P&gt;DATA : LV_DATE(12)      TYPE C.&lt;/P&gt;&lt;P&gt;DATA: LV_YYYY   TYPE CHAR4,&lt;/P&gt;&lt;P&gt;      LV_YY     TYPE CHAR2,&lt;/P&gt;&lt;P&gt;      LV_MM     TYPE CHAR2,&lt;/P&gt;&lt;P&gt;      LV_DD     TYPE CHAR2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE&lt;/P&gt;&lt;P&gt;  DATFM&lt;/P&gt;&lt;P&gt;  INTO LV_DATFM_KEY&lt;/P&gt;&lt;P&gt;  FROM USR01&lt;/P&gt;&lt;P&gt;  WHERE BNAME = SY-UNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LV_YYYY = SY-DATUM+0(4).&lt;/P&gt;&lt;P&gt;LV_YY   = SY-DATUM+2(2).&lt;/P&gt;&lt;P&gt;LV_MM   = SY-DATUM+4(2).&lt;/P&gt;&lt;P&gt;LV_DD   = SY-DATUM+6(2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE LV_DATFM_KEY.&lt;/P&gt;&lt;P&gt;  WHEN '1'.&lt;/P&gt;&lt;P&gt;    CONCATENATE LV_DD '.' LV_MM '.' LV_YYYY INTO LV_DATE.&lt;/P&gt;&lt;P&gt;  WHEN '2'.&lt;/P&gt;&lt;P&gt;    CONCATENATE LV_MM '/' LV_DD '/' LV_YYYY INTO LV_DATE.&lt;/P&gt;&lt;P&gt;  WHEN '3'.&lt;/P&gt;&lt;P&gt;    CONCATENATE LV_MM '-' LV_DD '-' LV_YYYY INTO LV_DATE.&lt;/P&gt;&lt;P&gt;  WHEN '4'.&lt;/P&gt;&lt;P&gt;    CONCATENATE LV_YYYY '.' LV_MM '.' LV_DD INTO LV_DATE.&lt;/P&gt;&lt;P&gt;  WHEN '5'.&lt;/P&gt;&lt;P&gt;    CONCATENATE LV_YYYY '/' LV_MM '/' LV_DD INTO LV_DATE.&lt;/P&gt;&lt;P&gt;  WHEN '6'.&lt;/P&gt;&lt;P&gt;    CONCATENATE LV_YYYY '-' LV_MM '-' LV_DD INTO LV_DATE.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE : / LV_DATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Might help you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Thiru&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Jan 2011 04:50:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-01-28T04:50:17Z</dc:date>
    <item>
      <title>Problem with data format in the excel attachment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-format-in-the-excel-attachment/m-p/7532846#M1561687</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 am converting the date into a string with this I have "10/04/2010" that is in the date format (MM/DD/YYYY). After sending the email when I open the excel it converts it to a date and puts it like '10-04-2010'. But I really need that the format stays like it is sended because is the user format. I tried to put a simple quote before but it appear '10/04/2010, I don't want the simple quote I only want the date format. Can anyone help? Thanks'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jan 2011 17:37:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-format-in-the-excel-attachment/m-p/7532846#M1561687</guid>
      <dc:creator>marisa_quaresma</dc:creator>
      <dc:date>2011-01-27T17:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with data format in the excel attachment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-format-in-the-excel-attachment/m-p/7532847#M1561688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you checked the cell format of the Excel file?&lt;/P&gt;&lt;P&gt;This could be the case where date in your program output is correct, but the format for the cell/Column is not correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Remi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jan 2011 04:31:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-format-in-the-excel-attachment/m-p/7532847#M1561688</guid>
      <dc:creator>RemiKaimal</dc:creator>
      <dc:date>2011-01-28T04:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with data format in the excel attachment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-format-in-the-excel-attachment/m-p/7532848#M1561689</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;Instead of converting it to string, convert it to type c (character) with length 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jan 2011 04:40:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-format-in-the-excel-attachment/m-p/7532848#M1561689</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-28T04:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with data format in the excel attachment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-format-in-the-excel-attachment/m-p/7532849#M1561690</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;DATA : LV_DATFM_KEY TYPE XUDATFM.&lt;/P&gt;&lt;P&gt;DATA : LV_DATE(12)      TYPE C.&lt;/P&gt;&lt;P&gt;DATA: LV_YYYY   TYPE CHAR4,&lt;/P&gt;&lt;P&gt;      LV_YY     TYPE CHAR2,&lt;/P&gt;&lt;P&gt;      LV_MM     TYPE CHAR2,&lt;/P&gt;&lt;P&gt;      LV_DD     TYPE CHAR2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE&lt;/P&gt;&lt;P&gt;  DATFM&lt;/P&gt;&lt;P&gt;  INTO LV_DATFM_KEY&lt;/P&gt;&lt;P&gt;  FROM USR01&lt;/P&gt;&lt;P&gt;  WHERE BNAME = SY-UNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LV_YYYY = SY-DATUM+0(4).&lt;/P&gt;&lt;P&gt;LV_YY   = SY-DATUM+2(2).&lt;/P&gt;&lt;P&gt;LV_MM   = SY-DATUM+4(2).&lt;/P&gt;&lt;P&gt;LV_DD   = SY-DATUM+6(2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE LV_DATFM_KEY.&lt;/P&gt;&lt;P&gt;  WHEN '1'.&lt;/P&gt;&lt;P&gt;    CONCATENATE LV_DD '.' LV_MM '.' LV_YYYY INTO LV_DATE.&lt;/P&gt;&lt;P&gt;  WHEN '2'.&lt;/P&gt;&lt;P&gt;    CONCATENATE LV_MM '/' LV_DD '/' LV_YYYY INTO LV_DATE.&lt;/P&gt;&lt;P&gt;  WHEN '3'.&lt;/P&gt;&lt;P&gt;    CONCATENATE LV_MM '-' LV_DD '-' LV_YYYY INTO LV_DATE.&lt;/P&gt;&lt;P&gt;  WHEN '4'.&lt;/P&gt;&lt;P&gt;    CONCATENATE LV_YYYY '.' LV_MM '.' LV_DD INTO LV_DATE.&lt;/P&gt;&lt;P&gt;  WHEN '5'.&lt;/P&gt;&lt;P&gt;    CONCATENATE LV_YYYY '/' LV_MM '/' LV_DD INTO LV_DATE.&lt;/P&gt;&lt;P&gt;  WHEN '6'.&lt;/P&gt;&lt;P&gt;    CONCATENATE LV_YYYY '-' LV_MM '-' LV_DD INTO LV_DATE.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE : / LV_DATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Might help you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Thiru&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jan 2011 04:50:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-format-in-the-excel-attachment/m-p/7532849#M1561690</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-28T04:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with data format in the excel attachment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-format-in-the-excel-attachment/m-p/7532850#M1561691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI marisaq,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is how excel works and has nothing to do with ABAP... &lt;/P&gt;&lt;P&gt;What you will need to is change the format of the cell from General or Date to Text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jovito&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jan 2011 04:54:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-format-in-the-excel-attachment/m-p/7532850#M1561691</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-28T04:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with data format in the excel attachment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-format-in-the-excel-attachment/m-p/7532851#M1561692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, if nothing suggested here solves the problem, here is what you should try:&lt;/P&gt;&lt;P&gt;1. workbench-&amp;gt;Menu-&amp;gt;System-&amp;gt;User Profile-&amp;gt;Own Data: In the 'Defaults' tab page, choose the format that you want the date to be displayed. &lt;/P&gt;&lt;P&gt;2. In the source program, use 'WRITE TO' statement to a string (source = date) (destination = string variable ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This makes sure that the file is output with the user setting chosen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;-Bino.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jan 2011 11:56:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-format-in-the-excel-attachment/m-p/7532851#M1561692</guid>
      <dc:creator>bino_varghese</dc:creator>
      <dc:date>2011-01-28T11:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with data format in the excel attachment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-format-in-the-excel-attachment/m-p/7532852#M1561693</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;The 'WRITE TO' gives an error when I try to pass it to a string variable. It only accepts char.&lt;/P&gt;&lt;P&gt;All the other answers didn't worked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jan 2011 12:27:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-format-in-the-excel-attachment/m-p/7532852#M1561693</guid>
      <dc:creator>marisa_quaresma</dc:creator>
      <dc:date>2011-01-28T12:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with data format in the excel attachment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-format-in-the-excel-attachment/m-p/7532853#M1561694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is what i tried, and this works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_char_format TYPE c LENGTH 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE lv_pack TO lv_char_format NO-GROUPING DECIMALS 2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Jan 2011 12:16:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-format-in-the-excel-attachment/m-p/7532853#M1561694</guid>
      <dc:creator>bino_varghese</dc:creator>
      <dc:date>2011-01-31T12:16:50Z</dc:date>
    </item>
  </channel>
</rss>

