‎2007 Jan 18 11:24 AM
Hi,
i have a condition that that Dates will be converted into the format of YYYYMMDD, If user can give any format we can change it as YYYYMMDD.
i have function module CONVERT_DATE_TO_INTERN_FORMAT'.but it is converting the MMDDYYYY---YYYYMMDD.
But if the user give DDMMYYYY.How can we fullfill both condition..?
i.e MMDDYYYY & DDMMYYYY----YYYYMMDD.how can we proceed for this conditipn.
tHANKS
‎2007 Jan 18 11:48 AM
Hi ,
For example .
<b>parameters : p_date like sy-datum.</b>
<b>Now you can give the date only in one format
this will be as per ur default settings in tcode SU3.
so either MMDDYYYY or DDMMYYYY jsut one of them is possible which is in equivalent with su3 settings .</b>
<b>The user cannot enter two formats at a single shot .</b>
An error is triggered at the selection screen itself .
In case if he is trying to do the same then you need to convert it to Su3 defalut format and then to internal format as YYYYMMDD
regards,
vijay.
‎2007 Jan 18 11:25 AM
‎2007 Jan 18 11:32 AM
Hi SKK ,
This is a bit tricky if the user gived data in both the format MMDDYYYY and DDMMYYYY , because if we get a date like 11122006 , how do we determine in which format has he given because in both the cases they are valid.
If it is only one format then we can surely find a solution to it.
Regards
Arun
‎2007 Jan 18 11:34 AM
Hi SKK,
use this FM
<b>CONVERSION_EXIT_IDATE_INPUT</b>
<b>If user has option to give any of format ie,
mmddyyyy or ddmmyyyy and convert to yyyymmdd
it will be difficult for us to do.
suppose if user want to give march 05 2007
he has option to give 03052007 or 05032007.
by coding also we cannot know whether first two digits represents day or month</b>
‎2007 Jan 18 11:43 AM
use formatting options... this is suggession
WRITE sy-datum DDMMYY
... DD/MM/YY | MM/DD/YY
| DD/MM/YYYY | MM/DD/YYYY
| DDMMYY | MMDDYY | YYMMDD
‎2007 Jan 18 11:48 AM
Hi ,
For example .
<b>parameters : p_date like sy-datum.</b>
<b>Now you can give the date only in one format
this will be as per ur default settings in tcode SU3.
so either MMDDYYYY or DDMMYYYY jsut one of them is possible which is in equivalent with su3 settings .</b>
<b>The user cannot enter two formats at a single shot .</b>
An error is triggered at the selection screen itself .
In case if he is trying to do the same then you need to convert it to Su3 defalut format and then to internal format as YYYYMMDD
regards,
vijay.
‎2007 Jan 18 12:11 PM
hI Vijay,
if one user fill the excel sheet with MMDDYYYY,another user give as YYYYMMDD,3rd user going to give as DDMMYYYY.then excel sheet will be convert all the date formats as <b>YYYYMMDD</b>.
How it possible.
Thanks.
‎2007 Jan 18 12:38 PM
hi sk,
You mean to say from sap r/3 if i download the same or is it the reverse you are saying . i didnt get you ?
is the upload or download i was not clear on the same .
//--then excel sheet will be convert all the date formats as YYYYMMDD.
No this is not possible in excel even only one format at a time is entertained for date format.
User cannot enter MMDDYYYY OR DDMMYYYY OR YYYYMMDD ALL AT A SINGLE INSTANCE.
regards,
vijay
at the time of download