‎2012 Jan 09 9:34 AM
HI ALL,
I export data from SAP (standard report) to spreadsheet (excel 2007). and in the posting date column appears number. i have to change the format used to date manually first, so that the number changed to date.
is there a way so that it can be done automatically ? i mean when i export data the column posting date contains date not number.
Thanks & best regards,
Saiful arif
‎2012 Jan 09 9:50 AM
Hi Arif,
How are you passing data from SAP to spreadsheet?
which FM?
‎2012 Jan 09 10:15 AM
‎2012 Jan 09 11:03 AM
Hi declare a variable type string in your final internal table.
now concatenate the date field into that string variable in your final loop and pass this value.
So that you will get your desired output.
" in you final internal tab
types: begin of itab,
.
.
date type string.
end of itab.
loop at itab.
concatenate itab-budat+6(2) '/' itab-budat+4(2) '/' itab-budat+0(4) into date.
" now use this date field to your gui_download
endloop.
regards,
koolspy.
‎2012 Jan 09 12:29 PM
Hi,
convert the posting date to date format first and then append it to the final internal table which can be sent to excel sheet.
try like this....
data: lv_date type string.
constants: lc_slash type c value '/'.
lv_date = posting date...(assign posting date here)
CONCATENATE lv_date+4(2)
lc_slash lv_date+6(2)
lc_slash lv_date+0(4)
INTO lv_date.
gs_final-date = lv_date.
append gs_final to gt_final.
hope this will help.
Regards
Karuna