02-06-2009 6:44 AM
Hi,
I have a problem in date format after it is downloaded as a CSV file. In CSV file it is coming as 2/6/2009
but the format i required is 2009/02/06. Im using GUI_UPLOAD FM for file download. In the internal table im having the date in this format YYYY/MM/DD only.
How can i bring the date in CSV file in required format?
Thanks in advance,
Srilakshmi.
02-06-2009 7:18 AM
Hai Frnd,
I got same previously.
I changed the settings -
> control panel -
> regional settings . In Regional settings ---> click customize. in customize ---> changes date settings as u like in dates tab. If worked inform me.
Kiran..
02-06-2009 6:50 AM
hi,
from program goto system>user profile> own data you will be taken to the maintain user profile screen in there goto default tab and give the date format. if this wont work then change the data type of your date to text and convert it to the format your reqired.
thanks,
anupama.
02-06-2009 6:54 AM
take a final internal table itb_final similar to your internal table(which needs to down load ) but in the new internal table you need to give the reference to the date field as char10
and transfer your itab data into final internal table
and pass final internal table to gui_down load
02-06-2009 7:02 AM
The length of date in my internal table is 10. i have tried changing the user settings also. it is not working. any other solutions please ?
02-06-2009 7:18 AM
Hai Frnd,
I got same previously.
I changed the settings -
> control panel -
> regional settings . In Regional settings ---> click customize. in customize ---> changes date settings as u like in dates tab. If worked inform me.
Kiran..
02-06-2009 11:08 AM
Hi Srilashmi,
You question really made me wear thinking cap.
When you populate date in SAP system, it's taken in internal format i.e YYYYMMDD, though you declare date field as DATE, D or SY-DATUM, the issue comes into light, when you got to display it.
1. Import date in internal format i.e. YYYYMMDD,
DATA:
w_date type d.
2. Declare another variable w_date1(10) like C.
3. Goto System-> User Profile -> Own Data -> Defaults -> Date Format. Now, whatever date you have set, it's gonna take the same format.
4. WRITE W_DATE TO W_DATE1, transport imported date to char type w_date1, this makes date appear in format you want it to .
And regarding, saving in CSV format, not always GUI_UPLOAD or GUI_DOWNLOAD works,
TEXT _ CONVERT _ XLS_TO_SAP -> From program to excel sheet
ALSM_EXCEL_TO_INTERNAL_TABLE -> Excel sheet to Program
Hope this helps you.
Thanks: Zahack