‎2008 Sep 23 12:50 PM
Hi ,
i want to know the function module for date.
I.e when i enter the two digits of a month then i shuld get the
text for the month.
ex: If i enter '02' then i should get FEB.
REGARDS,
SATYA
‎2008 Sep 23 12:52 PM
Hi,
DATA: I_DATE TYPE SY-DATUM,
MONTHNAME TYPE T247-LTX.
CALL FUNCTION 'MONTH_NAMES_GET'
EXPORTING
language = sy-langu
IMPORTING
return_code = return
TABLES
month_names = month_names
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 month_names.
if month_names-mnr = i_date+4(2).
monthname = month_names-ltx.
endif.
endloop.
thanx.
Edited by: Dhanashri Pawar on Sep 23, 2008 1:54 PM
‎2008 Sep 23 12:54 PM
‎2008 Sep 23 1:00 PM
write select statement this way...
select KTX into t247-ktx
from T247
where spras = 'EN'
and mnr = '02". <Here you need to specify the month value>
‎2008 Sep 23 1:02 PM
Hi,
Check :
DATA month TYPE fcktx.
SELECT SINGLE ktx FROM t247
INTO month
WHERE spras = sy-langu
AND mnr = '02'.
Also check the FM : MONTH_NAMES_GET to get the List of months
Cheers,
Remi
‎2008 Sep 23 1:16 PM
hi
this will solve your problem.
DATA:
w_date like T247-KTX.
CALL FUNCTION 'ISP_GET_MONTH_NAME'
EXPORTING
language = sy-langu
MONTH_NUMBER = '02'
IMPORTING
SHORTTEXT = w_date.
WRITE: w_date.
Regards
Adil
‎2008 Sep 23 1:25 PM
Hi ,
use this fM CONVERSION_EXIT_SDATE_OUTPUT.
Just goto se37 and execute this function Module. Here give the input as 20080923 and the output will be 23.SEP.2008Regards,
Srinivas
‎2011 Feb 03 12:58 PM