‎2007 Jul 23 2:13 PM
In the flat file suppose the date is in format yyyy/mm/dd while uploading the value that is transferred is to be in the format dd/mm/yyyy and vice-versa.then what is the procedure
‎2007 Jul 23 2:17 PM
change the settings ,
goto control panel-->regional settings -->date tab and change the settings accordingly before uploading the file
‎2007 Jul 23 2:17 PM
change the settings ,
goto control panel-->regional settings -->date tab and change the settings accordingly before uploading the file
‎2007 Jul 23 2:17 PM
Hi sandeep,
1. u can use offset concept.
2. eg.
concatenate dt(4) dt5(2) dt8(2) into mydate.
regards,
amit m.
‎2007 Jul 23 2:17 PM
Hi Sandeep,
You have to use FM's <b>CONVERT_DATE_TO_INTERNAL</b> and <b>CONVERT_DATE_TO_EXTERNAL</b>.
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
date_external = wrk_edate "EG: 20.05.2005
* ACCEPT_INITIAL_DATE =
IMPORTING
DATE_INTERNAL = wrK_idate
EXCEPTIONS
DATE_EXTERNAL_IS_INVALID = 1
OTHERS = 2
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
EXPORTING
DATE_INTERNAL = SY-DATUM "eg:04.07.2008
IMPORTING
DATE_EXTERNAL = wrk_edate
EXCEPTIONS
DATE_INTERNAL_IS_INVALID = 1
OTHERS = 2
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards
Aneesh.
‎2007 Jul 23 2:18 PM
hi,
use FM : CONVERT_DATE_TO_INTERNAL.
and then use FM : CONVERT_DATE_TO_EXTERNAL....
and if you r aploding data in sap thru BDC.. then it will be automatically converted...no requre thif FMs....
Regards,
Shardul Shah
‎2007 Jul 23 2:18 PM
you can change that in your user interface check with basis persons.
otherwise you have to use FM for convert date format.
if not use separate format for uploading template.
Rewards If Useful.
‎2007 Jul 23 2:30 PM
CONVERT_DATE_TO_EXTERNAL.
CONVERT_DATE_TO_INTERNAL.
DATE_STRING_CONVERT
Function Modules related to Date and Time Calculations
CALCULATE_DATE : Calculates the future date based on the input .
DATE_TO_DAY : Returns the Day for the entered date.
DATE_COMPUTE_DAY : Returns weekday for a date
DATE_GET_WEEK : Returns week for a date
DAY_ATTRIBUTES_GET : Returns attributes for a range of dates specified
MONTHS_BETWEEN_TWO_DATES : To get the number of months between the two dates.
END_OF_MONTH_DETERMINE_2 : Determines the End of a Month.
HR_HK_DIFF_BT_2_DATES : Find the difference between two dates in years, months and days.
FIMA_DAYS_AND_MONTHS_AND_YEARS : Find the difference between two dates in years, months and days.
MONTH_NAMES_GET : Get the names of the month
WEEK_GET_FIRST_DAY : Get the first day of the week
HRGPBS_HESA_DATE_FORMAT : Format the date in dd/mm/yyyy format
SD_CALC_DURATION_FROM_DATETIME : Find the difference between two date/time and report the difference in hours
L_MC_TIME_DIFFERENCE : Find the time difference between two date/time
HR_99S_INTERVAL_BETWEEN_DATES : Difference between two dates in days, weeks, months
LAST_DAY_OF_MONTHS : Returns the last day of the month
or
simple use:
WRITE date to ext_date MMDDYYYY.
date is in YYYYMMDD for mat type d
and ext_date(8) type c
or
data: l_date(10) type c.
write: sy-datum to date.
write : date.
regards,
srinivas
<b>*rewards for useful answers*</b>