Application Development and Automation 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: 
Read only

Func.Module to get month

Former Member
0 Likes
1,490

Dear All

I need a function module to get the name of the Month. For eg: if i am giving '01' as input i should get 'April' . Like that 02 for May and so on... Please tell me if any function modules are there like that....

Thanks

1 ACCEPTED SOLUTION
Read only

Pawan_Kesari
Active Contributor
0 Likes
1,471

select single ltx
into <field_name>
from t247
where spras = sy-langu
and mnr = '01' .

Message was edited by:

Pawan Kesari

Dear All

I need a function module to get the name of the Month. For eg: if i am giving '01' as input i should get 'April' . Like that 02 for May and so on... Please tell me if any function modules are there like that....

Thanks

13 REPLIES 13
Read only

varma_narayana
Active Contributor
0 Likes
1,471

This message was moderated.

Read only

0 Likes
1,471

Hi

I know this, but my requirment is bit different so i need to know whether any Function Modules are there for this....

Read only

Former Member
0 Likes
1,471

MONTH_NAMES_GET

Read only

0 Likes
1,471

In MONTH_NAMES_GET there is no provisiuon to give an input..plz read the question before answering..

thanks

Read only

0 Likes
1,471

Hi Scorpio,

It seems that your requirement is related with FI.

'01' can correspond to 'April' when we talk about Fiscal periods. But it not always true.

This relation can itself depends on 'Fiscal Year Variant'. To get the actual relation between your period.. i.e. '01' and month ..i.e. 'April' goto table T009C and select record for given 'Fiscal Year Variant' and Language you will get corresponding period and month.

In that case you won't have to write CASE statement.

Read only

Former Member
0 Likes
1,471

This message was moderated.

Read only

Pawan_Kesari
Active Contributor
0 Likes
1,472

select single ltx
into <field_name>
from t247
where spras = sy-langu
and mnr = '01' .

Message was edited by:

Pawan Kesari

Read only

Former Member
0 Likes
1,471

normally all function modules give data as if it is <b>'01'</b> as <b>Jan</b>. But ur requirement is a peculiar one. There are no such function modules which gives u <b>'01'</b> as <b>April</b>. So, u need to write the code as such like when it is '01', April & '02', May and so..on

Reward Points..

Read only

former_member194669
Active Contributor
0 Likes
1,471

This message was moderated.

Read only

Former Member
0 Likes
1,471

This message was moderated.

Read only

vallamuthu_madheswaran2
Active Contributor
0 Likes
1,471

Hi,

may i know your Requirement.

Thanks & Regards,

Vallamuthu.M

Read only

Former Member
0 Likes
1,471

solved by own