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

table

Former Member
0 Likes
439

Can anybody tell me table for date to month conversion?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
409

t247 - table for date to month -> sample code -

data : d1(8) value '20051215',

c1(2),

c2(10).

c1 = d1+3(2).

select ktx into x_ktx from T247 where spras = 'E'.

concatenate d16(2) x_ktx d10(4) into c2.

write c2.

3 REPLIES 3
Read only

Former Member
0 Likes
409

check <b>t247</b>

EX-

parameters: date like sy-datum.

data: begin of itab occurs 0,

SPRAS type SPRAS,

MNR LIKE T247-MNR,

KTX LIKE T247-KTX,

LTX LIKE T247-LTX,

end of itab.

DATA : month LIKE T247-MNR.

DATA: YEAR(4).

DATA: FINAL(18).

DATA: DAY(2).

DAY = DATE+6(2).

MONTH = DATE+4(2).

YEAR = DATE+0(4).

select SINGLE * from t247 into itab where mnr = month

AND SPRAS = 'E'.

APPEND ITAB.

CONCATENATE DAY ITAB-LTX YEAR INTO FINAL SEPARATED BY '-'.

WRITE: FINAL.

kishan negi

Read only

Former Member
0 Likes
409

try table T247

amit

Read only

Former Member
0 Likes
410

t247 - table for date to month -> sample code -

data : d1(8) value '20051215',

c1(2),

c2(10).

c1 = d1+3(2).

select ktx into x_ktx from T247 where spras = 'E'.

concatenate d16(2) x_ktx d10(4) into c2.

write c2.