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

output for date format

Former Member
0 Likes
580

Hi all,

can you xplain to me how this program be like this??

WRITE: AT sy-colno(ta_ystemp-lengt) <f> NO-GAP.

ta_ystemp-lenght =10

data in database = ta_yseh-endda = <f> = 20061016

how can the output be like this 16102006

which part in the program , change the output ?

from YYYYMMDD to DDMMYYYY

tq

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
558

Hi

Take 3 fields

data : day(2),

mon(2),

year(4),

date(8).

year = sy-datum+0(4).

mon = sy-datum+4(2).

day = sy-datum+6(2).

concatenate day mon year into date.

write : date.

try this code

Regards

Sreeni

Hi all,

can you xplain to me how this program be like this??

WRITE: AT sy-colno(ta_ystemp-lengt) <f> NO-GAP.

ta_ystemp-lenght =10

data in database = ta_yseh-endda = <f> = 20061016

how can the output be like this 16102006

which part in the program , change the output ?

from YYYYMMDD to DDMMYYYY

tq

3 REPLIES 3
Read only

Former Member
0 Likes
558

it is from the user default date format. When you use write to a date field it takes the user date fromat to output

Read only

Former Member
0 Likes
559

Hi

Take 3 fields

data : day(2),

mon(2),

year(4),

date(8).

year = sy-datum+0(4).

mon = sy-datum+4(2).

day = sy-datum+6(2).

concatenate day mon year into date.

write : date.

try this code

Regards

Sreeni

Read only

Former Member
0 Likes
558

Hi,

Please try out for the following :

Y1 = date+0(4).

M1=date+4(2).

D1=date+6(2).

Concatenate D1 M1 Y1 into data in database .

Thanks.