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

Date Problem.....

Former Member
0 Likes
1,009

Hi,

Everybody

i had coded the date as like this

CONCATENATE wa_insp-cdate6(2) wa_insp-cdate4(2) wa_insp-cdate+0(4)

INTO wa_insp-fdate SEPARATED BY '/'.

but i am nt getting the value in to wa_insp-fdate that too in the following format (dd/mm/yyyy)

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
978

hi,

check the length of wa_insp-fdate.i think it should b of length 10.

Debug this statment because here its working fine.

DATA : dt(2) TYPE c,

mon(2) TYPE c,

yr(4) TYPE c,

dat TYPE sy-datum,

dat_l(10) TYPE c,

dat_h(10) TYPE c,

yr_l(4) TYPE c,

yr_h(4) TYPE c,

datt(10) TYPE c.

SELECT-OPTIONS: date FOR datt.

INITIALIZATION.

dat = sy-datum.

CONCATENATE dat6(2) dat4(2) dat+0(4)

INTO dat_l SEPARATED BY '/'.

date-low = dat_l.

  • date-high = dat_h.

date-sign = 'I'.

date-option = 'BT'.

APPEND date.

10 REPLIES 10
Read only

Former Member
0 Likes
978

Hi Ram,

Try to use edit mask statement instead of concatenate.

regards,

Santosh Thorat

Read only

Former Member
0 Likes
978

and how do you get it then in wa_insp_fdate ?? and is that field of type string or char ?? it can't be of type date ofcourse

Read only

0 Likes
978

i declared it like that

cdate type d,

fdate(10) type c

Read only

0 Likes
978

HI RAM

PDATE TYPE SY-DATUM

PDATE1 TYPE SY-DATUM

concatenate P_DATE0(4) '/' P_DATE4(2) '/' P_DATE+6(2) INTO P_date1.

WRITE : / P_DATE1

LIKE DO THAT

IT WILL COME

KK.

Read only

Former Member
0 Likes
979

hi,

check the length of wa_insp-fdate.i think it should b of length 10.

Debug this statment because here its working fine.

DATA : dt(2) TYPE c,

mon(2) TYPE c,

yr(4) TYPE c,

dat TYPE sy-datum,

dat_l(10) TYPE c,

dat_h(10) TYPE c,

yr_l(4) TYPE c,

yr_h(4) TYPE c,

datt(10) TYPE c.

SELECT-OPTIONS: date FOR datt.

INITIALIZATION.

dat = sy-datum.

CONCATENATE dat6(2) dat4(2) dat+0(4)

INTO dat_l SEPARATED BY '/'.

date-low = dat_l.

  • date-high = dat_h.

date-sign = 'I'.

date-option = 'BT'.

APPEND date.

Read only

Former Member
0 Likes
978

Hi,

Try using WRITE wa_insp-fdate DD/MM/YYYY.

regards,

JLN

Read only

Former Member
0 Likes
978

u cannot use / in date field.

USe charcter field of required length to do thius.

Pls reward if helpful.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
978

Use a WRITEstatement with option:

WRITE date DD/MM/YYYY TO text.

(I gave the fields the name text, cause i suppose it is char or string field, of course)

You may have to replace '.' by '/' twice

  REPLACE '.' WITH '/' INTO text.

Regards

Read only

varma_narayana
Active Contributor
0 Likes
978

Hi..

here the target field should be 10 characters.

do this way..

data : v_Date(10).

CONCATENATE wa_insp-cdate6(2) wa_insp-cdate4(2) wa_insp-cdate+0(4)

INTO v_Date SEPARATED BY '/'.

WRITE:/ V_date.

REWARD IF HELPFUL.

Read only

Former Member
0 Likes
978

hi ram make use of following FM: CONVERSION_EXIT_D3DAT_OUTPUT