‎2007 Apr 18 2:29 PM
Can anybody how to display a date in the format DD-MON-YYYY
(i.e. 18-APR-2007). Is their any functional module available?
‎2007 Apr 18 2:33 PM
You should use this FM <b>MONTH_NAMES_GET</b> Field <b>KTX</b> got what you need -;)
Greetings,
Blag.
‎2007 Apr 18 2:33 PM
You should use this FM <b>MONTH_NAMES_GET</b> Field <b>KTX</b> got what you need -;)
Greetings,
Blag.
‎2007 Apr 18 2:33 PM
hi,
\Look at the Function modules CONVERT_DATE_TO_INTERNAL or CONVERT_DATE_TO_EXTERNAL.
like.....
data: v_date(8) type c.
call function 'CONVERT_DATE_TO_INTERNAL'
exporting
date_external = '12-12-2006'
importing
date_internal = v_date.
write:/ v_date.
If the aboe are not useful, then you need to do it manually. just take date, Month and year in 3 fields and concatenate the same into another date field with the correct format.
Mark the helpful answers
~~Guduri
‎2007 Apr 18 2:35 PM
Date format definition in the user master: DD.MM.YYYY
DATA: INT_DATUM LIKE SY-DATUM VALUE '19940102',
EXT_DATUM(11) TYPE C.
...
CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
EXPORTING
INPUT = INT_DATUM
IMPORTING
OUTPUT = EXT_DATUM.
Result:
EXT_DATUM = 02.JAN.1994
‎2007 Apr 18 2:35 PM
Hi,
Please try this FM
CONVERSION_EXIT_SDATE_OUTPUT
CONVERSION_EXIT_IDATE_OUTPUT
Regards,
Ferry Lianto
‎2007 Apr 18 2:37 PM
Hi,
Use below logic for your requirement. let us say your input date is i_date of type D.
data : e_date_fmt type char11,
gt_247 like t247 occurs 0 with header line.
CLEAR e_date_fmt.
IF gt_247[] IS INITIAL.
SELECT * FROM t247
INTO TABLE gt_247.
SORT gt_247.
ENDIF.
READ TABLE gt_247
WITH KEY spras = sy-langu
mnr = i_date+4(2).
IF sy-subrc <> 0.
READ TABLE gt_247
WITH KEY spras = sy-langu
mnr = i_date+4(2).
ENDIF.
IF sy-subrc <> 0.
READ TABLE gt_247
WITH KEY spras = 'E'
mnr = i_date+4(2).
ENDIF.
IF sy-subrc = 0.
CONCATENATE i_date+6(2)
gt_247-ktx
i_date(4)
INTO e_date_fmt SEPARATED BY space.
ENDIF.
thanks,
sksingh
‎2007 Apr 18 2:40 PM
try the fm
<b>CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
EXPORTING
INPUT = INT_DATUM
IMPORTING
OUTPUT = EXT_DATUM.</b>
‎2007 Apr 18 2:52 PM
Hi Rajesh..
Hi..paste this code..
data: w_dt like sy-datum.
w_dt = p_date. **given date**
w_month = w_dt+4(2).
w_year = w_dt+2(2).
case w_month.
when '01'.
w_mon = 'Jan'.
when '02'.
w_mon = 'Feb'.
when '03'.
w_mon = 'Mar'.
when '04'.
w_mon = 'Apr'.
when '05'.
w_mon = 'May'.
when '06'.
w_mon = 'Jun'.
when '07'.
w_mon = 'Jul'.
when '08'.
w_mon = 'Aug'.
when '09'.
w_mon = 'Sep'.
when '10'.
w_mon = 'Oct'.
when '11'.
w_mon = 'Nov'.
when '12'.
w_mon = 'Dec'.
endcase.
<b>concatenate w_dt6(2) '-' w_mon '-' w_dt0(4) into w_finaldate.</b>
Ram..
‎2007 Apr 18 2:52 PM
hi,
if u have that in u r int table use below format.
declare variable and then send it.
concatenate itab-BUDAT6(2) Y_itab-BUDAT4(2)
itab-BUDAT+0(4) into cdate separated by '-'
Regards.
Praveen