‎2006 Jan 06 11:59 AM
hello
i need a function module which will give o/p like may 2006 when i enter 5 2006.
thanks in advance
sarangan r
‎2006 Jan 06 12:04 PM
use FM MONTH_NAMES_GET
after u get the the values in then table ,u can write ur logic by looping in the table and getting the value of month.
loop at itab.
if itab-ktx = 'MAY'.
l_month = itab-mn.
endif.
endloop.
l_month will store the value of 5
‎2006 Jan 06 12:02 PM
Hi
You should used fm MONTH_NAMES_GET to find out the the name of the month.
Max
Message was edited by: max bianchi
‎2006 Jan 06 12:11 PM
Hi use this FM,
MONTH_NAMES_GET
pass the language and date+0(2)
thanks
vijay
‎2006 Jan 06 12:03 PM
Hi,
Use function Module MONTH_NAMES_GET
to get month name.
Read month name using month number from the above table.
Concatenate month name with year.
Thanks,
Ramakrishna
‎2006 Jan 06 12:04 PM
use FM MONTH_NAMES_GET
after u get the the values in then table ,u can write ur logic by looping in the table and getting the value of month.
loop at itab.
if itab-ktx = 'MAY'.
l_month = itab-mn.
endif.
endloop.
l_month will store the value of 5
‎2006 Jan 06 12:05 PM
Hi,
You can write your own code..to get month name from the month number entered and then use <b>concatenate</b> statement to get your output.
Regards,
Raj
‎2006 Jan 06 12:06 PM
‎2006 Jan 06 12:07 PM
Hi,
REPORT abc.
DATA : mname(10) TYPE c.
PARAMETER : d TYPE sy-datum.
PERFORM getmonth USING d mname.
write 😕 mname.
&----
*& Form getmonth
&----
text
----
-->M text
-->MNAME text
----
FORM getmonth USING d mname.
DATA : month_names LIKE t247 OCCURS 0 WITH HEADER LINE.
DATA : m(2) TYPE c.
m = d+4(2).
CALL FUNCTION 'MONTH_NAMES_GET'
EXPORTING
LANGUAGE = SY-LANGU
IMPORTING
RETURN_CODE =
TABLES
month_names = month_names
EXCEPTIONS
month_names_not_found = 1
OTHERS = 2
.
READ TABLE month_names INDEX m.
IF sy-subrc = 0.
mname = month_names-ltx.
ENDIF.
ENDFORM. "getmonth
Regards,
Amit Mittal
‎2006 Jan 06 12:14 PM
Hi,
Check this...
You will get all month names.. depending on the month you get in the date..you can get the month name from this function module..from the table parameter..MONTH_NAMES..
MONTH_NAMES_GET
Thanks,
Sreekanth G