Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Function Module to convert month in number to month in words.

Former Member
0 Kudos

Hi,

How do I convert month in number to month in words? Is there any Function Module for this?

Please do reply.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Function module ISP_GET_MONTH_NAME

Import parameters Value

DATE

LANGUAGE EN

MONTH_NUMBER 01

Export parameters Value

LANGU_BACK EN

LONGTEXT January

SHORTTEXT JAN

Regards

Shiva

22 REPLIES 22

Former Member
0 Kudos

Hi,

Function module ISP_GET_MONTH_NAME

Import parameters Value

DATE

LANGUAGE EN

MONTH_NUMBER 01

Export parameters Value

LANGU_BACK EN

LONGTEXT January

SHORTTEXT JAN

Regards

Shiva

Former Member
0 Kudos

hi,

I tried using this function module, but i am getting an error. Can you tell me more clearly of how this function module can be used.

0 Kudos

Hi

Function Module ISP_GET_MONTH_NAME

Pass blank to Date - space

and language as sy-langu / EN

and month number 01

Import parameters Value

DATE

LANGUAGE EN

MONTH_NUMBER 01

Export parameters Value

LANGU_BACK EN

LONGTEXT January

SHORTTEXT JAN

regards

Shiva

0 Kudos

use FM MONTH_NAMES_GET

Former Member
0 Kudos

Hi,

The function module ISP_GET_MONTH_NAME is not existing in SAP version 4.6C. Are there any other function modules that can be used?

0 Kudos

HI

Use the table T015M and pass the lang month Noo to it

Regards

Shiva

Former Member
0 Kudos

HI,

Use this function module

CONVERSION_EXIT_IDATE_OUTPUT

 INPUT                           20071212
 OUTPUT                       12DEC2007

after that output+2(3)

u can get month.

Former Member
0 Kudos

Hi,

Can I get more details of how to use the table T015M, I cant use CONVERSION_EXIT_IDATE_OUTPUT, because i need month in expansion,not only three characters. please help.

0 Kudos

Hi

data : v_monam type t015m-monam.

Select single MONAM

from T015M

into v_MONAM

where spras = sy-langu

and Monum= p_monum.

V_MONAM will have the month name.

write : v_monam.

regards

Shiva

Former Member
0 Kudos

Hi,

I need some details of how to use the function module MONTH_NAMES_GET.Please help.

Former Member
0 Kudos

Hi,

Use the funtion module IDWT_READ_MONTH_TEXT.

Former Member
0 Kudos

Hi,

Check the following code,you can meet ur requirement.

data: date1(15),

date2(15).

CALL FUNCTION 'CONVERSION_EXIT_IDATE_OUTPUT'

EXPORTING

input = sy-datum

IMPORTING

OUTPUT = date1

.

write:/ date1.

concatenate date10(2) date12(3) date1+5 into date2 separated by space.

write:/ date2.

Reward,if it is useful.

Thanks,

Chandu

Former Member
0 Kudos

Hi,

Check the below code.

data: wa_t247 like t247,

v_month like t247-MNR.

v_month = sy-datum+4(2).

CALL FUNCTION 'IDWT_READ_MONTH_TEXT'

EXPORTING

langu = 'E'

month = v_month

IMPORTING

T247 = wa_t247.

write:/5 'Month name = ', wa_t247-ltx.

Former Member
0 Kudos

Hi,

The table T015M is maintained in both english and spanish, but I need in french also, Could you help me out , which Function module or table can be used which is maintained all three languages (english,french,spanish).

0 Kudos

Hi,

Call the function module IDWT_READ_MONTH_TEXT three times with diffrent languages.

Former Member
0 Kudos

HI,

You can use the FM "MONTH_NAMES_GET". It gives you all the months at once.

Once you get the data into an internal table. Read that table with the month you need. you will get the equivalent month in words.

Revert for any clarifications..

happy coding..

Regards,

SJ

Former Member
0 Kudos

Check the FM MONTH_NAMES_GET.

sample code:


*Get month names
  CALL FUNCTION 'MONTH_NAMES_GET'
   EXPORTING
     language                    = sy-langu
*     IMPORTING
*       RETURN_CODE                 =
    TABLES
      month_names                 = gc_months
   EXCEPTIONS
     month_names_not_found       = 1
     OTHERS                      = 2.

You can also see the table T150M for the month and their names.

Hope this helps.

Thanks,

Balaji

Former Member
0 Kudos

Hi,

Ya i have tried using the function module MONTH_NAMES_GET, but there are no entries in french language. Please help .... its urgent requirement.

Former Member
0 Kudos

Hi

IDWT_READ_MONTH_TEXT, this function module does not exist in SAP version 4.6C.

Please let me kow the function module which exists in 4.6C.

0 Kudos

Unless you maintain entries in T150M table for French lang, you will not be able to get the month names for French using any of the FMs mentioned in this thread.

Hope this helps.

Thanks,

Balaji

0 Kudos

check in table T247 for Month names ...

Former Member
0 Kudos

Thank you