‎2008 Dec 29 10:21 AM
Hi All,
I have a problem with Date Format while downloading to Excel. I have tried Set Mask as well as Concatenation Method to convert the Internal Date to DD.MM.YYYY format. I am storing the new formatted date into a Variable ( type Char length 10) . Now when I am downloading this to Excel and sorting it. It is sorted taking them as characters not date.
I am using the link to download List -> Export -> Spreadsheet -> Table -> Microsoft Excel. Please suggest me any solution through this link.
‎2008 Dec 29 10:27 AM
Hi,
Try to download with function module GUI_DOWNLOAD
Try populating the paramter DAT_MODE with 'X'.It should work.
‎2008 Dec 29 10:27 AM
Hi,
Try to download with function module GUI_DOWNLOAD
Try populating the paramter DAT_MODE with 'X'.It should work.
‎2008 Dec 29 10:34 AM
‎2008 Dec 29 11:07 AM
Yes, I have tried to format the cell in Excel. Problem still persists.
‎2008 Dec 29 10:44 AM
Hi,
Try to use the Function Module CONVERSION_EXIT_SDATE_OUTPUT to convert the date in the required format.
Thanks,
saipriya
‎2008 Dec 29 10:49 AM
Use following call:
call function 'GUI_DOWNLOAD'
exporting
filename = fullpath
filetype = 'ASC'
tables
data_tab = asc_file[]
exceptions
file_write_error = 01
no_batch = 04
unknown_error = 05
others = 99.
where ASC_FILE will be flat table having concatenated table column values separated by horizontal tab.
Thanks
Amol Lohade
‎2008 Dec 29 10:59 AM
Hi,
After Downloading the output into spread sheet select that perticular column as the date type field and then sort it.
To change as date type select the column and press right click u will be getting an option as formmat
press on it in that numbers-> select date and arrange as ur format.
if u want to download as such not change these things every time u need to use the ole_excel properties to it.
check in ABAPLOVERS.BLOGSPOT.COM for the excel properties for automaictcally changes to the excel properties.
Regards,
Naresh
‎2008 Dec 29 11:18 AM
Hi,
Use offset to get the correct format and concatenate the field with the separators(. or / ) to display in the date format.
Hope this give you a clue.
Best Wishes
‎2008 Dec 29 12:08 PM
Hi Nibha,
you have not posted in what format you need your final date to be.
howvere suppose if you want your date to be DD/MM/YYYY,
1. get date in internal format.
2. write below logic:
SAP Internal fomet always irrespective of user format : YYYYMMDD
*Posting date
CONCATENATE wa_regup-budat+6(2)
wa_regup-budat+4(2)
wa_regup-budat+0(4) INTO wa_final-budat SEPARATED BY '/'.
here you will get date as DD/MM/YYYY.
to convert the user format date to internal format: use FM Convert_date_to_internal.
then pass the date to excel , it will remain as a date.
hope this helps.