ABAP 如何显示图片

来源:互联网 发布:ftp站点怎么绑定域名 编辑:程序博客网 时间:2024/05/29 08:40

见标准示例程序: SAP_PICTURE_DEMO

 

程序运行效果:

 

核心代码:

 

     data picture_control_1 type ref to cl_gui_picture .

     data container_1 type ref to cl_gui_custom_container.

   

     create object container_1
      exporting container_name = 'PICTURE_CONTROL_1'.

 

        CREATE OBJECT PICTURE_CONTROL_1 exporting parent = container_1.

 

     CALL METHOD PICTURE_CONTROL_1->LOAD_PICTURE_FROM_URL
           exporting url = url
           importing result = return.
      call method cl_gui_cfw=>flush.
      if return = 0.
        url = text-000.
      endif.