工作生活与爱好

工作中的记录; 生活中的记忆; 业余爱好的记载。

2007-01-24

 

How to make ALV header like this?

Header long text 1 Header long text 2 Header long text 3
Col_1 Col_2 Col_3 Col_4 Col_5 Col_6 Col_7 Col_8 Col_9
----------------------- Cell conents -------------------------------
----------------------- Cell conents -------------------------------
----------------------- Cell conents -------------------------------
----------------------- Cell conents -------------------------------
----------------------- Cell conents -------------------------------

You could try:
data: gt_list_top_of_page type slis_t_listheader. " Top of page text.

Initialization.
perform comment_build using gt_list_top_of_page[].

form top_of_page.
* Note to self: the gif must be loaded into transaction OAOR with
* classname 'PICTURES' AND TYPE 'OT' to work with ALV GRID Functions.
* I Loaded NOVALOGO2 into system.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
* I_LOGO = 'NOVALOGO2'
* i_logo = 'ENJOYSAP_LOGO'
it_list_commentary = gt_list_top_of_page.

endform. " TOP_OF_PAGE

form comment_build using e04_lt_top_of_page type slis_t_listheader.
data: ls_line type slis_listheader.
clear ls_line.
ls_line-typ = 'A'.
ls_line-info = 'Special'(001).
fgrant = xgrant.
concatenate ls_line-info fgrant
'Stock Option Report to the board'(002)
into ls_line-info separated by space.
condense ls_line-info.
append ls_line to e04_lt_top_of_page.

endform. " COMMENT_BUILD

How to implement a footer in alv grid programming? What is the procedure and the code regarding to create a footer?

Use following syntex for footer print in alv:

* For End of Page

form END_OF_PAGE.

data: listwidth type i,

ld_pagepos(10) type c,

ld_page(10) type c.

write: sy-uline(50).
skip.
write:/40 'Page:', sy-pagno .

endform.

* For End of Report

form END_OF_LIST.

data: listwidth type i,

ld_pagepos(10) type c,
ld_page(10) type c.
skip.
write:/40 'Page:', sy-pagno .

endform.


Comments: 发表评论



<< Home

Archives

1990年1月15日   2007年1月14日   2007年1月15日   2007年1月16日   2007年1月17日   2007年1月18日   2007年1月19日   2007年1月20日   2007年1月22日   2007年1月23日   2007年1月24日   2007年1月25日   2007年1月26日   2007年1月27日   2007年1月29日   2007年1月30日   2007年1月31日   2007年2月1日   2007年2月2日   2007年2月3日   2007年3月13日   2007年5月15日   2007年5月16日   2007年6月2日  

This page is powered by Blogger. Isn't yours?