阅读文章

How to make ALV header like this?

[日期:2006-10-18] 来源:sap-img  作者:sapsky [字体: ]
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.



阅读:
录入:sapsky

评论 】 【 推荐 】 【 打印
上一篇:Line Color in ALV Example
下一篇:Sample ALV: Heading in ALV
相关文章      
本文评论       全部评论
发表评论


点评: 字数
姓名:

  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款