Date formatting issue when sending excel file via mail

hello People ,
I am facing date issue .
I have inetrnal format of date as yyyymmdd.
I am converting it into  YYYY-MM-DD.
CONCATENATE gs_output-end_date(4)
                    gs_output-end_date+4(2)
                    gs_output-end_date+6(2)
                    INTO lv_date_to SEPARATED BY gc_seperator. " gc_separator = '-'.
        gs_output-end_date = lv_date_to.
I am writing this date and sending an excel file via MAIL . I get date result as MM/DD/YYYY always.
Now if i pass in YYYY.MM.DD and used the same code where gc_separtor = '.'.
I get output as YYYY.MM.DD.
Can any one give me an idea why in format YYYY-MM-DD it is getting overwritten but for yyyy.mm.dd it gives me as yyyy.mm.dd?
Regards,
Abhi..
Edited by: Thomas Zloch on Jul 11, 2011 2:30 PM - subject enhanced

Thanks , Rohit ,
I have change my date format in SU01 settings .
It is now made to [ YYYY-MM-DD] but still '-' is replaced by MM/DD/YYYY.
Also note that when i format in the following way
   CONCATENATE gs_output-rdadate(4)
                    gs_output-rdadate+4(2)
                    gs_output-rdadate+6(2)
                    INTO lv_rda_date.
instead of
   CONCATENATE gs_output-rdadate(4)
                    gs_output-rdadate+4(2)
                    gs_output-rdadate+6(2)
                    INTO lv_rda_date sepearted by '-'.
I get output as YYYYMMDD.
Regards,
Abhishek.

Similar Messages

  • Pdf extension changes to .dat when send a file via e-mail from adobe acrobat 9

    to convert a file from microsoft word 2007 to PDF and send as an attachment via e-mail from adobe 9, the file is received with the extension changed to. dat, so recipients can not open it.
    Can anyone help me with this.

    What is the OS of the sending computer?
    What mail client?
    I receive plenty of files on my PC as .dat files, which come from Mac user(s), rename the extension to what I think they ought to be and have no further problem. (I cannot change the senders email settings where the problem originates)
    If the receiver knows it is a pdf file, they can drag it into Acrobat, but renaming the extension serves future use.

  • "Open method of Workbooks class failed" when opening Excel file via Internet Explorer

    (apologies, I posted this first to the general Office 2010 forum, but then realized this was probably a better spot to post)
    We have an Excel COM add-in installed on users' PCs.  This add-in responds to workbook open events by opening a particular XLA file (also deployed to the PC) to make certain features available.  This process works flawlessly when Excel files are
    opened locally - but when a user attempts to open an Excel file from an IE link, we get the following error: "Open method of Workbooks class failed".  This is happening on the line that is trying to open the XLA file.  This only happens
    when launching an Excel link from IE - works fine in Chrome or Firefox.
    I have found several posts on this topic, but no solutions:
    1. This post (https://social.msdn.microsoft.com/forums/office/en-US/73c96005-84af-4648-b103-32b677205be3/open-method-of-workbooks-class-failed)
    is the closest to our problem.  In this case, the "answer" was that the user may not have access to the 2nd workbook being opened.  But in our case, we're opening an XLA that is on the local machine, and I've confirmed that it is not
    corrupt and accessible (read & write, just in case!) to Everyone.
    2. This (very old) post (http://www.pcreview.co.uk/forums/open-method-workbooks-fails-excel-hosted-ie-t965608.html)
    seems similar, but is talking about opening Excel inside of IE.  This is not what we're doing - the link is supposed to (and does) open Excel outside of IE.  Interestingly, Excel.exe is being launched with the "-embedded" flag, even
    though it isn't running in the IE window.  When launching Excel by opening the file locally, Excel.exe is run with the "/dde" flag instead.  Clearly the "-embedded" mode is what is causing the problem.  I could change the
    links on the web page to use some JavaScript to open Excel differently... unfortunately, the links are actually generated by SharePoint (the Excel files are in a SP repository), so this is not really an option.
    3. This Microsoft KB article (http://support.microsoft.com/kb/268016) talks about problems opening an XLA directly from IE... but this is the case of a link pointing
    directly to an XLA file, not opening a regular workbook that in turn opens an XLA, as is my case.  In fact, this article specifically points out in the "More Information" section that "End users do not normally open XLAs; instead they open
    an XLS that (if needed) loads one or more XLAs during startup." ==> precisely what I'm trying to do that is giving me the error!
    I've replicated the situation with a very simple COM add-in (created in VS2010 using VB.Net) and a very simple XLA file (does nothing, just pops up a message in auto_open).  For anyone wanting to try it out, here is the exact test case:
    1. In Excel, create a simple XLA file containing only the following code, and save it in C:\TEMP\dummy.xla:
    Sub Auto_Open()
    MsgBox "Auto Open fired"
    End Sub
    2. In Visual Studio, create a new Excel 2010 Add-In.  I created mine via Visual Basic, but I doubt the choice of language matters.  Place the following code in ThisAddin.vb:
    Public Class ThisAddIn
    Private Sub ThisAddIn_Startup(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Startup
    AddHandler Me.Application.WorkbookOpen, AddressOf Application_WorkbookOpen
    End Sub
    Private Sub ThisAddIn_Shutdown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shutdown
    End Sub
    Sub Application_WorkbookOpen(ByVal workbook As Excel.Workbook)
    On Error GoTo ErrHandler
    If (Not workbook.Name.Contains("dummy.xla")) Then
    MsgBox("Workbook open")
    Application.Workbooks.Open("C:\temp\dummy.xla")
    Application.Workbooks("dummy.xla").RunAutoMacros(Excel.XlRunAutoMacro.xlAutoOpen)
    End If
    Exit Sub
    ErrHandler:
    MsgBox(Err.Description)
    End Sub
    End Class
    3. Build & publish this add-in and install it on the same machine as the XLA created in step 1.
    4. Create and save an empty Excel workbook (I called mine WayneTest1.xlsx) - save it locally (on your desktop), and put a copy somewhere on your web server (I put mine directly in c:\inetpub).
    5. Create an HTML file with a link to that workbook, saving it to the same web server location - here is mine:
    <html>
    <body>
    <a href="WayneTest1.xlsx">Link to Excel file</a>
    </body>
    </html>
    6. Double click the workbook on your desktop (from step 4) - opens fine, I get the "workbook open" message, following by the "Auto Open fired" message.
    7. In Internet Explorer, navigate to the HTML file specified in step 5 and click on the link - when prompted, select "Open" - I get the "workbook open" message, following by the error message "Open method of Workbooks class failed".
    Here are a few things I've ruled out / tried so far:
    - Unchecked all the "Protected View" settings in Excel, made no difference
    - Unchecked all the "File block settings" in Excel, made no difference
    - Made sure dummy.xla was open for read & write to Everyone
    - Made sure the web page was in Trusted sites and set the security level to Low for those sites in IE
    - Tried making the local desktop file (step 6) readonly, made no difference (i.e. launching it locally still worked fine)
    - Tried using Excel 2013 - made no difference
    Any ideas / suggestions?

    Hello Wayne,
    Apologies for the delay.
    I went through your post and tried to reproduce the issue. I was able to reproduce it. Based
    on its complexity and as it requires more in-depth analysis, your question falls into the paid support category which requires a more in-depth level of support.
    Please visit the below link to see the various paid support options that are
    available to better meet your needs. http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone
    Thanks,
    Anush

  • Formating fonts when placing excel files.

    I need some help. I am creating a catalouge for my business and we use a "proprietary font". We are using an excel spread sheet to link our data to the ID file, as our prices change a couple of times a year and I don't want to keep having to change the cataloge one line at a time. When I place the excel file and change the font and do the set up all is good. It is only when I change a price in the excel file and update the ID (cs5) file that ID changes my font to Times New Roman. Is there a way to have ID keep the font formating so I don't have to change the font everything every time I update the excel file?
    Thanks
    David

    Thanks Bob.. I knew someone would know this. Though I felt silly asking the question in the first place. I do love forums.
    David

  • Get different format error when opening excel file

    Hi,
    In 10g form, I use CLIENT_OLE2 to generate an excel file on the client machine. Every time, I open the excel file, I get the error message, 'The file you are trying to open, 'my1.xls', is in a different format than specified by the file extension....'. However, I still can open the excel file. I am using excel 2007.
    Could somebody please explain what the problem is? How should I solve this problem?
    Thanks for your help.
    neemin

    I don't know that off the top of my head. When I have developed OLE code in Forms I found it very useful to make a Excel macro that did what I wanted to accomplish and the translate that to OLE code in Forms.
    I encourage you to create a new forum entry for this second issue. Maybe someone else has done it and can give you a quick answer.

  • Cannot send eps file via mail. Just crashes.

    Everytime I try and attach an eps to a message
    the spinning wheel appears and mail does not respond.
    I have to force quit mail everytime.

    Size doesn't matter. It just will not send eps files.
    Thre are two macs of the same spec in department
    where I work. The other has no problem whatsoever.
    I think it is something to do with the actual email application
    rather than the files. Other than re-installing mail I was just wondering
    if anyone knew of any workaround such as deleting preference files etc.

  • Date formatting issue in Generated Excel

    Hi All,
    I'm generating a report by getting the values from the query and looping over it.
    This is my code.
    <cfheader name="Content-Disposition" value="inline; filename=testReport.csv">
            <cfcontent type="text/x-excel-csv"><cfoutput><cfloop index="i" list="#columnstrings#">"#i#",</cfloop></cfoutput>
            <cfoutput QUERY="downloadquery">#chr(13)#<cfloop index="i" list="#columnstrings#">"#replace(evaluate('#i#'),'"',"'","ALL")#",</cfloop></cfoutput>
    All the columns are coming perfectly, but the date column is showing 0:00:00 in the generated excel.
    The user has to do a manual formatting for the date columns.
    We are using coldfusion 9 and Oracle 10G
    Any help would be appreciated.
    When i check the dump the query, the date columns are coming correctly.
    Only the excel does not know that its a date column.

    Try prepending an apostrophe.

  • Extra spaces in attachment when sending a file via SO_DOCUMENT_SEND_API1

    Hello
    help please
    Sending attachment (a binary form) function SO_DOCUMENT_SEND_API1
    give the description of the file in ls_mail_data, lt_packing_list and lt_attach - Fail in binary form,
    including transferred file size (the length of the text)
    example the length of the text of 887 characters
    consequently, the last line in lt_attach zero-padded to 255 characters.
    here should be used properties of a file (its length) to the final fail.csv not contain spaces. if I'm wrong and popravte me please
    the problem is that Fail eventually contain spaces, if I'm right and the function should work as described above may have some notes to fix the problem with spaces

    what is the document type of attachment? is it excel?

  • Can't send the file via Mail app!

    Google says it's dangerous type of file! The same problem with Skype. When I'm trying to drag the file on the skype dialog it shows the text with the name of file.

    Nothing really.  The screen simply reverts back to the photo I tried to send.  Then when I go to the message app and pull up that person's thread, the photo has not been sent.  I CAN send photos from the message app - just not the camera app.
    Also, I just confirmed that I can post to twitter from the camera app.  Strange....

  • SOFFICEINTEGRATION 898 error message when trying to send excel file to

    Hi,
    I am trying to send excel file from sap dp planning book using macro with document function to outlook mail.
    when i am running the macro online its sending the file to my mail
    but when i am scheduling a background job and executing its giving me SOFFICEINTEGRATION error 898
    can you please help?
    do i need to do any setting any where
    Thanks

    Hello,
    Programs that run in the background cannot address controls on the frontend. This is why you are not able to run a Program using SAP Office Integration which is a Frontend Control and can be used only with the SAP Gui. Since background process cannot make use of UI screens or actions hence it's not possible use SAP Office Integration in background processing. The reason for this is explained in note 674060. Therefore sending emails using a batch macro is not supported.
    Best regards
    Rico Frenzel

  • I am facing issue when opening flash files in Flash CC. (error:- This file was created with a later release of Flash Professional and might contain new features that would be lost when saved in the current format.)

    I am facing issue when opening flash files in Flash CC. (error:- This file was created with a later release of Flash Professional and might contain new features that would be lost when saved in the current format.)

    Wow. Okay...
    I'll let the real veterans in this forum tackle your issues one after the other. But, I can tell you, all will be well.
    My only comment would be re: your computer specs:
    BJReis wrote:
    .  This may be due to somewhat older equipment:
    GHz Intel Core Duo MacBook Pro with a 4GB memory computer with Ddr3 running OSX 10.8.4
    To be completely honest, FCPX is a RAM hog. It just is. But, RAM is relatively cheap, and the pay-off is good.
    4GB is right on the edge, IMHO. 16G is ideal.
    I wish you luck, hang in there, and standby for more help.

  • Upload data from multiple worksheets of excel file into SAP by using MIME?

    Hi all,
    I'm trying to getting the data from a multiple worksheet excel file by usin the MIME Repository.
    First of all i realizied it like [here|http://abap-explorer.blogspot.com/2008/12/upload-data-from-multiple-worksheets-of.html] in a normal ABAP Report.
    By trying to transfer the code to a WebDynpro Component, i get problems.
    With this part of code, because ActiveX is not allowed in our Webbrowser. So i have to find another solution to get the data from the excel file.
    CALL METHOD c_oi_container_control_creator=>get_container_control
    IMPORTING
    control = iref_control
    error   = iref_error
    I tried to rebuild this solution in webdynpro. But it dont works.
    So my next step was trying to Read the Excel sheet directly from MIME by getting the Content (XString).
    But there is no useful information Just a mix out of '######' and other symbols.
    By converting it into String the same problem.
    Maybe someone has an idea how to rebuild [this code|http://abap-explorer.blogspot.com/2008/12/upload-data-from-multiple-worksheets-of.html] in Webdynpro that it works correctly.
    Currently Im Using the Fileupload UI Element. All Works fine. I can Upload the Excel file to MIME Repository and i can open it from there.
    But i cant get the same clear informationen from the file, to write it later in a Database, like before without webdynpro.
    i hope someone can help me.
    Edited by: Sascha Baumann on Apr 20, 2009 4:28 PM

    You can't read the native binary Excel Format in server side ABAP.  The functions and classes that did this in Classic Dynpro used OLE Automation via the SAPGUI Control Framework to remotely control Excel to read the data.  Because in the browser you have no connection to the SAPGUI or are sandboxed inside the browser; the same functionality is not possible. 
    I would suggest that you look into saving the Excel file as a open, text format.  You might be able to use XML (although the Excel XML format can be complex) to support multiple sheets. You would have to build the logic yourself (using XSLT or the iXML parser) to process the XML format back into ABAP data.

  • Changes in date format while creating/downloading the file

    Hi All,
    Can any one let me know how does the system determines which date format should it apply while creating/downloading the file.
    Issue :
    When I create/download the file generated by report RTXWCF02 using unix level acess the Date format of a field in file is DD.MM.YYYY where as in user profile i can see its in MM/DD/YYYY.
    I dont understand how system determines the date format and How we can change it. Please suggest.
    Regards,
    Ravi Kasnale

    I would suggest you to use ALV_XXL_CALL if your want to keep your data formats intact.
    like this -   CALL FUNCTION 'ALV_XXL_CALL'
           EXPORTING
                i_tabname           = 'T_GRID'   " Name of your internal table
                it_fieldcat         = t_fcatk[]      "Your LAV grids catalog.
           TABLES
                it_outtab           = t_grid         "Internal table itself
           EXCEPTIONS
                fatal_error         = 1
                no_display_possible = 2
                OTHERS              = 3.
      IF sy-subrc <> 0.
        MESSAGE e806(bk).
      ENDIF.
    hope it helps.

  • How can I send a PDF via mail without it becoming an attached file?

    Hi All!
    I need to know how I am able to send a PDF file via mail, without it becoming an attached file. This means when the receiver opens the mail, he automatically sees the PDF without first having to read the normal mail text and scroll down to open the attached PDF file. Just like a spam newsletter
    Also I want to know - I want some illustrations in my portfolio to be a hyperlink to a website, is this possible on a picture (not on an URL) - and if so - How?
    Hope you can help me out here!
    ** I use Adobe Acrobat Reader Pro X 10.1.10 on a Macbook Pro 10.8.5**
    Thanks,
    Carlinsky

    Carlinsky wrote:
    Hi All!
    I need to know how I am able to send a PDF file via mail, without it becoming an attached file. This means when the receiver opens the mail, he automatically sees the PDF without first having to read the normal mail text and scroll down to open the attached PDF file. Just like a spam newsletter
    Not possible with Adobe Reader or Adobe Acrobat.

  • Please tell me How to send   excel file content  to   MAILBOX

    Hello ,
    Can anybody tell me how to send  Excel  file  data to  Mailbox

    Hi,
    Check this sample code.
    INITIALIZATION .
    CLASS cl_abap_char_utilities DEFINITION LOAD.
    gf_etb = cl_abap_char_utilities=>horizontal_tab. "For horrizontal tab
    gf_cr = cl_abap_char_utilities=>cr_lf. "For enter
    gf_lf = cl_abap_char_utilities=>newline. "For new line
    Declaration
      DATA:    lwa_hd_change TYPE sood1,
               lt_objcont    TYPE STANDARD TABLE OF soli,
               lwa_objcont   TYPE soli,
               lt_receivers  TYPE STANDARD TABLE OF soos1,
               lwa_receivers TYPE soos1 ,
               lt_att_cont   TYPE STANDARD TABLE OF soli,
               lwa_att_cont  TYPE soli,
               lt_packing    TYPE STANDARD TABLE OF soxpl,
               lwa_packing   TYPE soxpl,
               lf_sent       TYPE sonv-flag,
               lf_size       TYPE i.
      CONSTANTS: lc_obj(11)  TYPE c VALUE 'BOMSouthco',
                 lc_desc(20) TYPE c VALUE 'BOM Download',
                 lc_lang(1)  TYPE c VALUE 'E',
                 lc_raw(3)   TYPE c VALUE 'RAW',
                 lc_net(1)   TYPE c VALUE 'U',
                 lc_mail(4)  TYPE c VALUE 'MAIL',
                 lc_xls(3)   TYPE c VALUE 'XLS',
                 lc_ext(3)   TYPE c VALUE 'EXT'.
    Passing values to the strutures used in SO_OBJECT_SEND function module
      lwa_hd_change-objla      = lc_lang.
      lwa_hd_change-objnam     = lc_obj.
      lwa_hd_change-objdes     = lc_desc.
      lwa_hd_change-objlen     = 255.
      lwa_objcont-line = text-t29.
      APPEND lwa_objcont TO lt_objcont.
      CLEAR lwa_objcont.
      lwa_receivers-recextnam  = text-t31.
      lwa_receivers-recesc     = lc_net.
      lwa_receivers-sndart     = lc_mail.
      lwa_receivers-sndex      = 'X'.
      lwa_receivers-sndpri     = 1.
      lwa_receivers-mailstatus = 'E'.
      APPEND lwa_receivers TO lt_receivers.
      CLEAR lwa_receivers.
      lwa_receivers-recextnam  = text-t30.
      lwa_receivers-recesc     = lc_net.
      lwa_receivers-sndart     = lc_mail.
      lwa_receivers-sndex      = 'X'.
      lwa_receivers-sndpri     = 1.
      lwa_receivers-mailstatus = 'E'.
      APPEND lwa_receivers TO lt_receivers.
      CLEAR lwa_receivers.
    Passing values for the attachment file
      LOOP AT gt_output INTO gwa_output.
        CONCATENATE gf_lf  gwa_output-matnr  gf_etb  gwa_output-idnrk  gf_etb
                    gwa_output-type   gf_etb  gwa_output-menge   gf_etb
                    gwa_output-meins  gf_etb  gwa_output-comp    gf_etb
          INTO lwa_att_cont-line.
        APPEND lwa_att_cont TO lt_att_cont.
        CLEAR lwa_att_cont.
      ENDLOOP.
      CHECK lt_att_cont IS NOT INITIAL.
      DESCRIBE TABLE lt_att_cont LINES lf_size.
      lwa_packing-transf_bin = ' '.
      lwa_packing-head_start = 1.
      lwa_packing-head_num   = 0.
      lwa_packing-body_start = 1.
      lwa_packing-body_num   = lf_size.
      lwa_packing-file_ext   = lc_xls.
      lwa_packing-objlen     = lf_size * 255.
      lwa_packing-objtp      = lc_ext.
      lwa_packing-objdes     = lc_desc.
      lwa_packing-objnam     = lc_obj.
      APPEND lwa_packing TO lt_packing.
      CLEAR lwa_packing.
      CHECK gf_error IS NOT INITIAL. "Check if unix file is written
    FM to send email to the intended recipients
      CALL FUNCTION 'SO_OBJECT_SEND'
        EXPORTING
          object_hd_change           = lwa_hd_change
          object_type                = lc_raw
        IMPORTING
          sent_to_all                = lf_sent
        TABLES
          objcont                    = lt_objcont
          receivers                  = lt_receivers
          packing_list               = lt_packing
          att_cont                   = lt_att_cont
        EXCEPTIONS
          active_user_not_exist      = 1
          communication_failure      = 2
          component_not_available    = 3
          folder_not_exist           = 4
          folder_no_authorization    = 5
          forwarder_not_exist        = 6
          note_not_exist             = 7
          object_not_exist           = 8
          object_not_sent            = 9
          object_no_authorization    = 10
          object_type_not_exist      = 11
          operation_no_authorization = 12
          owner_not_exist            = 13
          parameter_error            = 14
          substitute_not_active      = 15
          substitute_not_defined     = 16
          system_failure             = 17
          too_much_receivers         = 18
          user_not_exist             = 19
          originator_not_exist       = 20
          x_error                    = 21
          OTHERS                     = 22.
      IF sy-subrc = 0.
        MESSAGE s004 WITH text-t34.
      ENDIF.
      COMMIT WORK.
    Reward if helpful.
    Regards,
    Ramya

Maybe you are looking for

  • Problem in Stock Report

    Dear Sir, I am facing problem in MB5B, two months before i use this TCode and report are like this Opening Stock              27,179.437  MT                59,705,114.71  INR total value of Receipts 65,473.815  MT               132,382,668.98  INR to

  • What is this Icon on the homepage??

    I just bought my BB Curve and have read through all of the documentation. There is a small, black icon that looks like cross-hairs with two lines on the right side (to indicate sound I guess). I have looked through everything and cannot find what thi

  • Throw "java.util.Vector" exception?

    In my servlet, I got catch(Throwable t), t.getMessage() is java.util.Vector. Can anyone tell me where I should look into for this problem?

  • Looking for the Grails ,o)

    Has anyone tried the new Groovy on Grails framework for Java programming? References: http://groovy.codehaus.org/ http://grails.org/

  • Ipod Color (60gig Photo) - Unexplaned Shutdowns

    Im a sad panda. Just this weekend, my iPod is acting goofy, and its killing me. Heres the deal: Any movement of the iPod and the screen will fade out to grey (then fade out all together) then i will get the Apple logo as it reboots. Even if the Apple