08-23-2007 10:04 AM
my report writes in dd.mm.yyyy when it is writing a report.
in debugging it shows me in yyyymmdd.
it also downloads in yyyymmdd format in excel sheet.
the issue is want the ddmmyyyy format in the date column in excel sheet.
how can we do this thru abap code?
08-23-2007 10:09 AM
Hi Shahid,
If you want always the date formate ddmmyyy in the excel sheet... then while moving the date value use like below
date10(2) = date6(2).
date12(2) = date4(2).
date14(4) = date0(4).
or if you want the user setting format then use the write while moving the data to excel.
Regards,
Satya.
08-23-2007 10:06 AM
08-23-2007 10:10 AM
08-23-2007 10:08 AM
Hi,
SAP stores date variables in yyyymmdd format internally. So, while debugging also it displayed in internal format only.
According to u r settings external date format is dd.mm.yyyy. So u r report output is in that format.
As ur downloading the internal data into excel sheet date field is downloading in internal format it self.,
Regards,
Sankar
08-23-2007 10:09 AM
Hi Shahid,
If you want always the date formate ddmmyyy in the excel sheet... then while moving the date value use like below
date10(2) = date6(2).
date12(2) = date4(2).
date14(4) = date0(4).
or if you want the user setting format then use the write while moving the data to excel.
Regards,
Satya.
08-23-2007 10:11 AM
Hi,
Write:/ wa_sdate -editmask yyyymmdd.
Rewards points if it is helpful
08-23-2007 10:15 AM
Hello,
Please check the following code
Consider
BLDAT = sy-datum = 20070823 (yyyymmdd)
With the following code you can convert it to (ddmmyyyy ) format
DATA : L_TEMP TYPE SY-DATUM.
L_TEMP0(2) = WA_DATA-BLDAT6(2). "passed date
L_TEMP2(2) = WA_DATA-BLDAT4(2). "passed Month
L_TEMP4(4) = WA_DATA-BLDAT0(4). "passed year
BLDAT = L_TEMP.
now BLDAT /L_temp contains date as 23082007 which can be passed to the table passing data to your excel sheet
Also with excel sheet..right click on any cell in an excel sheet and go to ->format cells -> number Tab -> click on date and you can see various types of date format..but this can be used after being downloaded as a formatting procedure manually
as an alternative use available function modules too
Go to SE37 and write Date / press F4 and see if some function modules are available for converting the format
Hope if gave some idea
Reward if useful
Regards
Byju
08-23-2007 10:16 AM
HI,
Try using the function module <b>'convershion_exit_pdate_output'</b> before you try down loading into Excell format.
Regards,
Murthy
08-23-2007 10:17 AM
use write to ........... using edit mast '__/__/____'
statement.
sameer
08-23-2007 10:17 AM
using edit mask
data : dat type sy-datum.
dat = '20070823'.
write 😕 dat using edit mask '__/__/____'.
08-23-2007 10:18 AM
hI SYED
LOOP AT ITAB.
date10(2) = ITAB-date6(2).
date12(2) = ITAB-date4(2).
date14(4) = ITAB-date0(4).
ITAB-DATE = DATE1.
MODIFY ITAB INDEX SY-TABIX.
ENDLOOP.
reward points to all helpful answers
kiran.M
08-23-2007 10:26 AM
Hi Syed,
U can ues the function module
<b>CONVERT_DATE_TO_EXTERNAL
CONVERT_DATE_TO_INTERNAL</b>.
To change the date formate depends on the requirment.
If u have any doubt on this u can ask me.
<b>If helpfull reward</b>
If u want to change standard setting of date formate u can do wiht the following path
SAP easy excess... system-> User profile -> Own data-> Default tab -> Date formate.
Reward if helpfull.
Anees
9886358645
Message was edited by:
anees jawad
08-23-2007 11:20 AM