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

How to convert String date into date

Former Member
0 Likes
645

Hi,

I want to enter the month name into my input field i should convert into date.

Ex; if i enter my input fields JAN to APRIL.

these months should be convert into date format like 01 to 04.

Please help me.

nani

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
620

Hi Nani,

Do it this way:

data:
  w_MNR type t247-MNR.

DATA:
  w_LTX type t247-LTX.

w_MNR = sy-datum+4(2).

select single LTX
  from T247
  into w_LTX
 where spras eq 'E'
   and MNR eq w_MNR.

write:
  w_LTX.

With luck,

Pritam.

Edited by: Pritam Ghosh on Jan 8, 2009 9:12 AM

5 REPLIES 5
Read only

Former Member
0 Likes
620

Hi,

Check this table t247.

Read only

GauthamV
Active Contributor
0 Likes
620

hi,

use this table and write logic accordingly.

T247

fields:

KTX - Month short text

LTX - Month long text

MNR - Month number.

Read only

Former Member
0 Likes
620

Hi,

Please refer this table T247 - Month name and short text

Use these fields MNR Month number

KTX Month short text

LTX Month long text

Regards,

Jyothi CH.

Read only

Former Member
0 Likes
620

Hi,

Check this FM

MONTH_NAMES_GET

Regards,

Omakram.

Read only

Former Member
0 Likes
621

Hi Nani,

Do it this way:

data:
  w_MNR type t247-MNR.

DATA:
  w_LTX type t247-LTX.

w_MNR = sy-datum+4(2).

select single LTX
  from T247
  into w_LTX
 where spras eq 'E'
   and MNR eq w_MNR.

write:
  w_LTX.

With luck,

Pritam.

Edited by: Pritam Ghosh on Jan 8, 2009 9:12 AM