‎2007 Feb 23 6:43 AM
Can anybody say what is the function module used to convert the format of the date which is taken from excel sheet to the sap format. If so pls tell me how to use that function module.
‎2007 Feb 23 8:21 AM
REPORT YCHATEST.
TYPE-POOLS : KCDE.
DATA : V_DATE1 TYPE KCDE_INTERN_VALUE,
V_DATE2 TYPE KCDE_INTERN_VALUE.
V_DATE1 = '23/02/2007'.
CALL FUNCTION 'KCD_EXCEL_DATE_CONVERT'
EXPORTING
EXCEL_DATE = V_DATE1
DATE_FORMAT = 'TMJ'
IMPORTING
SAP_DATE = V_DATE2
EXCEPTIONS
OTHERS = 0.
WRITE : V_DATE2.
here in TMJ , T for day , M for Month and J for for year
if in the excel ur date format is MM/DD/YYYY , the give it as MTJ
‎2007 Feb 23 6:44 AM
‎2007 Feb 23 6:45 AM
Hi,
Use the FM:
<b>DATE_CONV_EXT_TO_INT</b> - user formatted date is converted to system date
Hope this helps.
Reward if helpful.
Regards,
Sipra
‎2007 Feb 23 6:46 AM
Hi
Use the functions modules CONVERT_DATE_TO_EXTERNAL or CONVERT_DATE_TO_INTERNAL to convert the date. When converting to external format, the date format from the user's user profile will be used. When converting to internal format, the result will be in YYYYMMDD format
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
DATE_EXTERNAL = REC_DTL
IMPORTING
DATE_INTERNAL = SPECTRO_ITAB-CAST_DATE
EXCEPTIONS
DATE_EXTERNAL_IS_INVALID = 1
OTHERS = 2.Regards
Sudheer
‎2007 Feb 23 6:57 AM
Currently my date is getting printed in format 05262005.
I want the output as 26 May, 2005.
I have tried using Set date mask option but it is not picking up in the output.
Code:
This code yields as 12 march 2006.
DATA: ZTEMP(9).
CLEAR: ZTEMP, ZDD, ZMMM, ZYYYY.
CALL FUNCTION 'CONVERSION_EXIT_IDATE_OUTPUT'
EXPORTING
INPUT = IS_DLV_DELNOTE-HD_GEN-CREA_DATE
IMPORTING
OUTPUT = ZTEMP.
ZDD = ZTEMP+3(2).
ZMMM = ZTEMP+0(3).
ZYYYY = ZTEMP+5(4).
http://www.sap-img.com/abap/abap-program-output-of-date-format.htm
‎2007 Feb 23 7:02 AM
‎2007 Feb 23 8:17 AM
‎2007 Feb 23 8:21 AM
REPORT YCHATEST.
TYPE-POOLS : KCDE.
DATA : V_DATE1 TYPE KCDE_INTERN_VALUE,
V_DATE2 TYPE KCDE_INTERN_VALUE.
V_DATE1 = '23/02/2007'.
CALL FUNCTION 'KCD_EXCEL_DATE_CONVERT'
EXPORTING
EXCEL_DATE = V_DATE1
DATE_FORMAT = 'TMJ'
IMPORTING
SAP_DATE = V_DATE2
EXCEPTIONS
OTHERS = 0.
WRITE : V_DATE2.
here in TMJ , T for day , M for Month and J for for year
if in the excel ur date format is MM/DD/YYYY , the give it as MTJ
‎2007 Feb 23 9:39 AM
Hi
Use the following function module
'CONVERT_DATE_TO_INTERNAL'
'CONVERT_DATE_TO_EXTERNAL'
Hope this helps.
Regds,
Seema