07-09-2008 5:34 AM
Hi,
Is there a function module to convert month number to month name.Like if the date is 23/10/2007,I want the month number 10 to be printed as october.
07-09-2008 5:37 AM
07-09-2008 5:37 AM
07-09-2008 5:39 AM
Hi,
I have used this FM.If the date is 26/01/2007,after conversion it is displaying 26. january 2007.But I want only month name.How can I get this?
07-09-2008 5:37 AM
07-09-2008 5:39 AM
goto table t247 u can found long text and short text there, even if u use any FM they will do the same inside the fm
07-09-2008 5:41 AM
07-09-2008 5:44 AM
Hi Hema,
Use this Code Snippet.
CALL FUNCTION 'MONTH_NAMES_GET'
TABLES
month_names = t_month
EXCEPTIONS
month_names_not_found = 1
OTHERS = 2.
LOOP AT t_month INTO fs_month WHERE mnr = w_month1.
w_month_name = fs_month-ltx.
ENDLOOP. " loop at t_month...
If Found Help Full Do Reward.
Regards.
Eshwar.
07-09-2008 5:47 AM
Hi,
You can use FM CONVERSION_EXIT_LDATE_OUTPUT.
Here you need to give date as YYYYMMDD format and you will get output as month name date , year.
Then take out the month name frm your ourput.
Hope this helps!
regards,
lalit
07-09-2008 5:50 AM
SELECT mnr ltx FROM t247
INTO TABLE lt_month_names
WHERE spras = 'E'.
if lv_date is int he format yyyymmdd
read table lt_month_names with key mnr = lv_date+4(2).
if sy-subrc = 0.
name = lt_month_names-ltx.
endif.
Thanks,
Shailaja
07-09-2008 5:53 AM
Hello
I distrust that there is such function. Try this:
data: mnr like t247-mnr.
mnr = date+4(2).
select single * from t247 where spras eq sy-langu and mnr eq mnr.
if sy-subrc = 0.
write: t247-ltx.
endif.
07-09-2008 5:53 AM
rather than calling a function module and loading the entire function group in the memory...why don't you just write a CASE...ENDCASE statement as there are only 12 months.
that will be much better from performance perspective
but yes...if you are looking from language tranlation point of view also...the answers given above should be considered
Edited by: Priyank Jain on Jul 9, 2008 12:54 AM