一個完整ALV(常見問題包括top-of-page等)
阿新 • • 發佈:2019-01-11
form frm_top_of_page.
data: lt_header type slis_t_listheader,
wa_header type slis_listheader,
e_date type char10.
call function 'CONVERT_DATE_TO_EXTERNAL'
exporting
date_internal = p_kydat
importing
date_external = e_date
exceptions
date_internal_is_invalid = 1
others = 2
.
if p_duedt = 'X'. "Base on due date
concatenate text-044 e_date into wa_header-info separated by space.
elseif p_bldat = 'X'. "Base on document date
concatenate text-045 e_date into wa_header-info separated by space.
elseif p_budat = 'X'. "Base on Posting Date
concatenate text-046 e_date into wa_header-info separated by space.
elseif p_zfbdt = 'X'. "Base on Baseline Date
concatenate text-047 e_date into wa_header-info separated by space.
endif .
wa_header-typ = 'H'.
append wa_header to lt_header.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = lt_header.
endform. "frm_top_of_page
data: lt_header type slis_t_listheader,
wa_header type slis_listheader,
e_date type char10.
call function 'CONVERT_DATE_TO_EXTERNAL'
exporting
date_internal = p_kydat
importing
date_external = e_date
exceptions
date_internal_is_invalid = 1
others = 2
.
if p_duedt = 'X'. "Base on due date
concatenate text-044 e_date into wa_header-info separated by space.
elseif p_bldat = 'X'. "Base on document date
concatenate text-045 e_date into
elseif p_budat = 'X'. "Base on Posting Date
concatenate text-046 e_date into wa_header-info separated by space.
elseif p_zfbdt = 'X'. "Base on Baseline Date
concatenate text-047 e_date into wa_header-info separated by space.
endif
wa_header-typ = 'H'.
append wa_header to lt_header.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = lt_header.
endform. "frm_top_of_page