Chinaunix首页 | 论坛 | 博客
  • 博客访问: 203384
  • 博文数量: 54
  • 博客积分: 2056
  • 博客等级: 大尉
  • 技术积分: 568
  • 用 户 组: 普通用户
  • 注册时间: 2007-07-25 12:07
文章分类

全部博文(54)

文章存档

2014年(1)

2013年(1)

2012年(1)

2011年(2)

2010年(1)

2009年(11)

2008年(28)

2007年(9)

我的朋友

分类:

2008-04-24 14:46:46

*&---------------------------------------------------------------------*
*& Report  Z14841_TEST41
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT  z14841_test41.
TABLES : t001.
TYPE-POOLS: slis.
DATA : w_repid LIKE sy-repid.
TYPES : BEGIN OF ty_comp.
        INCLUDE STRUCTURE t001.
TYPES : END OF ty_comp.
DATA: wa_layout  TYPE slis_layout_alv.
DATA: it_fieldcat TYPE slis_t_fieldcat_alv,
      wa_fieldcat TYPE slis_fieldcat_alv.
DATA : it_comp TYPE TABLE OF ty_comp.
INITIALIZATION.
  w_repid = sy-repid.
START-OF-SELECTION.
  SELECT * FROM t001 INTO TABLE it_comp.
END-OF-SELECTION.
  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
      i_program_name         = w_repid
      i_internal_tabname     = 'IT_COMP'
      i_structure_name       = 'T001'
      i_inclname             = w_repid
    CHANGING
      ct_fieldcat            = it_fieldcat[]
    EXCEPTIONS
      inconsistent_interface = 1
      program_error          = 2
      OTHERS                 = 3.
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_callback_program          = w_repid
      i_callback_html_top_of_page = 'HTML_TOP_OF_PAGE'
      is_layout                   = wa_layout
      it_fieldcat                 = it_fieldcat
    TABLES
      t_outtab                    = it_comp
    EXCEPTIONS
      program_error               = 1
      OTHERS                      = 2.

*&---------------------------------------------------------------------*
*&      Form  html_top_of_page
*&---------------------------------------------------------------------*
FORM html_top_of_page USING document TYPE REF TO cl_dd_document.
  DATA: text TYPE sdydo_text_element.
  text =  'Company Code Data'.
  CALL METHOD document->add_text
    EXPORTING
      text      = text
      sap_style = 'HEADING'.
  CALL METHOD document->new_line.
  CALL METHOD document->new_line.
  text = 'User Name : '.
  CALL METHOD document->add_text
    EXPORTING
      text         = text
      sap_emphasis = 'Strong'.
  CALL METHOD document->add_gap
    EXPORTING
      width = 2.
  text = sy-uname.
  CALL METHOD document->add_text
    EXPORTING
      text      = text
      sap_style = 'Key'.
  CALL METHOD document->add_gap
    EXPORTING
      width = 10.

  text = 'Date : '.
  CALL METHOD document->add_text
    EXPORTING
      text         = text
      sap_emphasis = 'Strong'.
  CALL METHOD document->add_gap
    EXPORTING
      width = 2.
  text = sy-datum.
  CALL METHOD document->add_text
    EXPORTING
      text      = text
      sap_style = 'Key'.
  CALL METHOD document->add_gap
    EXPORTING
      width = 10.
  text = 'Time : '.
  CALL METHOD document->add_text
    EXPORTING
      text         = text
      sap_emphasis = 'Strong'.
  CALL METHOD document->add_gap
    EXPORTING
      width = 2.
  text = sy-uzeit.
  CALL METHOD document->add_text
    EXPORTING
      text      = text
      sap_style = 'Key'.
  CALL METHOD document->new_line.
ENDFORM.                    "HTML_TOP_OF_PAGE
阅读(997) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~