Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

time inTOP-OF-PAGE

can anyone provide me code for adding time at TOP-OF-PAGE with header name and date.the code which i have written is as follows

*********************************

Form top-of-page.

*ALV Header declarations

data: t_header type slis_t_listheader,

wa_header type slis_listheader,

t_line like wa_header-info,

ld_lines type i,

ld_linesc(10) type c.

  • Title

wa_header-typ = 'H'.

wa_header-info = 'DELIVERY INFORMATION'.

append wa_header to t_header.

clear wa_header.

  • Date

wa_header-typ = 'S'.

wa_header-key = 'Date: '.

CONCATENATE sy-datum+6(2) '.'

sy-datum+4(2) '.'

sy-datum(4) INTO wa_header-info. "todays date

append wa_header to t_header.

clear: wa_header.

*Time

call function 'REUSE_ALV_COMMENTARY_WRITE'

exporting

it_list_commentary = t_header.

endform.

Tags:
Former Member
Former Member replied

wa_header-typ = 'S'.

wa_header-key = 'Date: '.

CONCATENATE sy-datum+6(2) '.'

sy-datum+4(2) '.'

sy-datum(4) INTO wa_header-info. "todays date

append wa_header to t_header.

clear: wa_header.

*Time

wa_header-typ = 'S'.

wa_header-key = 'Time: '.

CONCATENATE sy-uzeit+0(2) ':'

sy-uzeit2(2) ':' sy-uzeit4(2) INTO wa_header-info.

append wa_header to t_header.

clear: wa_header.

call function 'REUSE_ALV_COMMENTARY_WRITE'

exporting

it_list_commentary = t_header.

endform.

regards

shiba dutta

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question