08-31-2007 10:09 AM
Hi Experts,
How to display date in DD-MMM-YYYY format .
ex todays date 31/08/2007 in 31 AUG 2007
Regards,
Kali Pramod
08-31-2007 10:13 AM
Hi kali,
1. simple
2. use the FM - CONVERSION_EXIT_SDATE_OUTPUT
regards,
amit m.
08-31-2007 10:13 AM
Hi kali,
1. simple
2. use the FM - CONVERSION_EXIT_SDATE_OUTPUT
regards,
amit m.
08-31-2007 10:16 AM
08-31-2007 10:16 AM
hi,
u have to select ktx from t247 (DDIC Table) .
SELECT SINGLE ktx INTO mon FROM t247 WHERE mnr = date+4(2) AND spras = 'E'.
and concatenate this mon to new dfate field.
08-31-2007 10:24 AM
data zdate type sy-datum.
data dat(2) type c.
data: zmn(2) type c, zmonth(15) type c, zyear(4) type c.
data zstring(25) type c.
dat = sy-datum+6(2).
zmn = sy-datum+4(2).
zyear = sy-datum+0(4).
data zmonth_int type table of t247 with header line.
CALL FUNCTION 'MONTH_NAMES_GET'
EXPORTING
LANGUAGE = SY-LANGU
IMPORTING
RETURN_CODE =
TABLES
MONTH_NAMES = zmonth_int
EXCEPTIONS
MONTH_NAMES_NOT_FOUND = 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.
loop at zmonth_int.
if zmonth_int-mnr = zmn.
zmonth = zmonth_int-ktx.
endif.
endloop.
concatenate dat zmnth zyear into zstring.
plz reward if it helps
08-31-2007 10:36 AM
Hi,
Its simple
use the FM - CONVERSION_EXIT_SDATE_OUTPUT .
Ok,
reward if useful.
08-31-2007 10:37 AM
Hi,
To my knowledge, we can't directly display the value as 31 AUG 2007. One way is to extract month value alone in your case '08'. Use case statement, in that assign if 08 = 'AUG'. Then display in write statement.
Also, try in ABAPHELP tcode, for the date formats using the following steps.
ABAP - The SAP Programming Language
ABAP - By Theme
User Dialogs
Lists
Create Lists
WRITE - int_format_options
Try and reward points if found useful.