登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

原来为了你

我的人生就是要一次次的超越

 
 
 

日志

 
 
 
 

带HEAD Commentary的ALV  

2011-01-07 16:08:31|  分类: ALV |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

type-poolsslis.
datalt_cat type slis_t_fieldcat_alv with header line.

datalt_spfli type spfli occurs with header line.

datalt_header type slis_t_listheader with header line,
      wa_header 
like line of lt_header.

datalength type i,
      length_c
(10),
      t_line
(50).

start
-of-selection.

  
select into corresponding fields of table lt_spfli from spfli.
  
perform create_field_catlog.
  
perform display_data.
*&---------------------------------------------------------------------*
*&      Form  create_field_catlog
*&---------------------------------------------------------------------*
form create_field_catlog .
  
call function'REUSE_ALV_FIELDCATALOG_MERGE'
  
exporting
    i_program_name 
sy-repid
    i_internal_tabname 
'IT_SPFLI'
    i_inclname 
sy-repid
    i_bypassing_buffer 
'X'
    i_buffer_active 
''
    
changing
      ct_fieldcat 
lt_cat[].
endform.                    " CREATE_FIELD_CATLOG
*&---------------------------------------------------------------------*
*&      Form  DISPLAY_DATA
*&---------------------------------------------------------------------*
form display_data .
  
call function 'REUSE_ALV_GRID_DISPLAY'
    
exporting
      i_callback_program     
sy-repid
      i_callback_top_of_page 
'FRM_WRITE_HEADER'
      it_fieldcat            
lt_cat[]
    
tables
      t_outtab               
lt_spfli.
endform.                    " DISPLAY_DATA
*&---------------------------------------------------------------------*
*&      Form  frm_write_header
*&---------------------------------------------------------------------*
form frm_write_header .
  wa_header
-typ 'H'."HEADER
  wa_header
-info 'SPFLI Table Report'.
  
append wa_header to lt_header.
  
clear wa_header.

  wa_header
-typ 'S'."selection
  wa_header
-key 'Date:'.
  
concatenate
  sy
-datum+6(2)'.'
  sy
-datum+4(2)'.'
  sy
-datum(4into wa_header-info.
  
append wa_header to lt_header.
  
clear wa_header.

  
describe table lt_spfli lines length.
  length_c 
length.
  
concatenate 'Total No. of Records Selected:'
  length_c 
into t_line separated by space .
  wa_header
-typ 'A'."active
  wa_header
-info t_line.
  
append wa_header to lt_header.
  
clearwa_headert_line.

  
call function 'REUSE_ALV_COMMENTARY_WRITE'
    
exporting
      it_list_commentary 
lt_header[]
      i_logo             
'ENJOYSAP_LOGO'.
endform.                    " FRM_WRITE_HEADER

  评论这张
 
阅读(339)| 评论(0)

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018