Skip to Content
0
Former Member
Nov 13, 2006 at 04:43 AM

How to display current day(13-nov-06) in selection screen-its very urgent

17 Views

hi all,

iam sending code to change the date from mm/dd/yyyy to dd-mon-yy(10-nov-06).my requirement is i have to keep a parameter and when iam executing thid report say p_text1 is a parameter when iam executing this report in selection screen it has to show 12-nov-06 say current date.any body can suggest me how to do and please send me the sample code.

iam sending the code to change the date format as below.

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 = sy-datum+6(2).

MONTH = sy-datum+4(2).

YEAR = sy-datum+0(4).

DAY = sy-datum+6(2).

YEAR = sy-datum+0(4).

select SINGLE * from t247 into itab where mnr = month

AND SPRAS = 'E'.

APPEND ITAB.

CONCATENATE DAY ITAB-KTX YEAR+2(2)

INTO FINAL SEPARATED BY '-'.

WRITE: FINAL.

thanks,

maheedhar.T