REPORT zharpo_010 NO STANDARD PAGE HEADING.

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'
i_html_height_top = 50 "控制表头栏目的初始高度
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 = cl_dd_document=>SMALL.
** sap_emphasis = cl_dd_document=>EMPHASIS.
CALL METHOD document->add_text
EXPORTING
text = text
* TEXT_TABLE =
* FIX_LINES =
* SAP_STYLE = cl_dd_document=>WARNING
sap_color = cl_dd_document=>list_total_int
sap_fontsize = cl_dd_document=>large
sap_fontstyle = cl_dd_document=>serif
sap_emphasis = cl_dd_document=>emphasis "加粗还是斜体 STRONG是加粗
* STYLE_CLASS =
* CHANGING
* DOCUMENT =
. CALL METHOD document->add_gap
EXPORTING
width = 10.
CALL METHOD document->add_icon
EXPORTING
sap_icon = 'ICON_DATE'.
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.
CALL METHOD document->underline. "Draw an underLine
CALL METHOD document->add_link
EXPORTING
* NAME =
url = 'http://www.87cool.com'
tooltip = '水寒冰居'
text = '87Cool'
* DESTINATION_IN_DOC_SET =
* DESTINATION_IN_DOC_POS =
* TABINDEX =
* HOTKEY =
* IMPORTING
* LINK =
.
ENDFORM. "HTML_TOP_OF_PAGE

Description

Images loaded here from the MIME repository using an API are displayed in two browser controls.

  • The method main1 uses the class CL_GUI_HTML_VIEWER directly. Its method LOAD_DATA is used to provide a URL for the image in the internal table, which is then used on the HTML page.
  • The method main2 uses the class CL_ABAP_BROWSER as a wrapper for the direct use of CL_GUI_HTML_VIEWER and calls of the method LOAD_DATA. A reference, associated with the name used in the HTML page, is passed to the internal table.

See also the example for direct access to objects from the MIME repository using ICF.

SAP 实例 1 Images in HTML的更多相关文章

  1. SAP 实例 8 HTML from the MIME Repository

    REPORT demo_html_from_mime. CLASS mime_demo DEFINITION. PUBLIC SECTION. CLASS-METHODS main. PRIVATE ...

  2. SAP 实例 4 CFW

    *&---------------------------------------------------------------------* *& Report demo_cfw ...

  3. SAP 实例- 下拉框

    效果图 源代码 REPORT rsdemo_dropdown_listbox . DATA init. TABLES scarr. TABLES spfli. TABLES sflight. TABL ...

  4. SAP 实例- 页签tabsrip

    屏幕页签:项目上有一需求,对标准TCODE 一个屏幕增加一个页签.于是做了个例子. 下面屏幕有两个页签. 我们来看一下屏幕结构.100屏幕是主屏幕,101,102是子屏幕,对应页签test1,test ...

  5. SAP 实例 13 Random Grouping with LOOP

    REPORT demo_loop_group_by_random. CLASS demo DEFINITION. PUBLIC SECTION. CLASS-METHODS: main, class_ ...

  6. SAP 实例 12 List Box with Value List from PBO Module

    REPORT demo_dynpro_dropdown_listbox. DATA: name TYPE vrm_id, list TYPE vrm_values, value LIKE LINE O ...

  7. SAP 实例 10 List Box with value list from input help

    *&---------------------------------------------------------------------* *& Report DEMO_DROP ...

  8. SAP 实例 9 Text output

    REPORT demo_show_text. CLASS demo DEFINITION. PUBLIC SECTION. CLASS-METHODS main. ENDCLASS. CLASS de ...

  9. SAP 实例 6 HTML input

    REPORT demo_html_input. CLASS demo DEFINITION. PUBLIC SECTION. CLASS-METHODS main. PRIVATE SECTION. ...

  10. SAP 实例 5 CFW Events

    REPORT demo_custom_control . * Declarations ***************************************************** CL ...

随机推荐

  1. 小天才XTC Z1S开启ADB

    起因 最近入手了Apple Watch,但因系统闭源和国区App Store第三方应用实在是少,所以就开始折腾起安卓表来了.正好家里有块给小孩子用的小天才手表,所以就想到了通过ADB调试安装一些这块表 ...

  2. OSPF 路由协议详解(一)

    (文章目录) ospf 协议是网络层协议 此篇文章适合有一定网络基础的人 ospf 协议最多应用在企业网络中,针对于运营商网络并不是特别的适用,端口号为 89 通过 IP 进行数据的转发 ospf 基 ...

  3. android软件简约记账app开发day04-记账页面条目的代码书写

    android软件简约记账app开发day04-记账页面条目的代码书写 在前三天我们完成了基本的界面展示,从今天开始,我们进入到后台逻辑代码的编写中,今天开发记账条目的代码 我们在主页面点击记一笔图标 ...

  4. C#二次开发BIMFACE系列61 File Management文件管理服务接口二次开发及实战详解

    系列目录     [已更新最新开发文章,点击查看详细] 在我的博客<C#二次开发BIMFACE系列61 File Management文件管理服务接口二次开发及实战详解>最后列出了 Fil ...

  5. Golang Zap日志

    Zap日志解析 Config.yaml zap: level: 'info' #日志级别 format: 'console' #输出的级别,有console和json prefix: '[cateri ...

  6. 我发现 Linux 文档写错了

    作者:小林coding 图解计算机基础网站:https://xiaolincoding.com 大家好,我是小林. 周末的时候,有位读者疑惑为什么 Linux man 手册中关于 netstat 命令 ...

  7. javaScript深拷贝和浅拷贝简单梳理

    在了解深拷贝和浅拷贝之前,我们先梳理一下: JavaScript中,分为基本数据类型(原始值)和复杂类型(对象),同时它们各自的数据类型细分下又有好几种数据类型 基本数据类型 数字Number 字符串 ...

  8. XCTF练习题---WEB---weak_auth

    XCTF练习题---WEB---weak_auth flag:cyberpeace{a9aa5a05f5957a19643640028dbb6946} 解题步骤: 1.观察题目,打开场景 2.观察场景 ...

  9. /proc/meminfo 解释

  10. junethack使用指南

    本文面向有志于参加Nethack六月衍生大赛,且具有一定英文水平的玩家. 首先,在Junethack服务器页面挑一个在线服务器的网站,个人推荐 hardfought.org,因为访问速度较快. 然后, ...