• 获取照片信息


    MODULE DISPLAY_PICTURE OUTPUT.
      DATA: REPID LIKE SY-REPID.
      DATA:L_RESULT TYPE I.
      REPID = SY-REPID.
    
      IF PICTURE IS INITIAL.                                    "TC_0100
        CREATE OBJECT WCL_CONTAINER_PHOTO
          EXPORTING
            CONTAINER_NAME = 'TC_0300'.
    *Object To Create the Custom Container
        CREATE OBJECT PICTURE
          EXPORTING
            PARENT = WCL_CONTAINER_PHOTO.
        CHECK SY-SUBRC = 0.
    *Method To Set Position of Image
    *    CALL METHOD PICTURE->SET_POSITION
    *      EXPORTING
    *        HEIGHT = 47
    *        LEFT   = 610
    *        TOP    = 25
    *        WIDTH  = 70.
      ELSE.
    *Function Module To Reset Image
        CALL FUNCTION 'HR_IMAGE_RESET'
          EXPORTING
            HANDLE         = HANDLE
          EXCEPTIONS
            INVALID_HANDLE = 1
            OTHERS         = 2.
        IF SY-SUBRC <> 0.
        ENDIF.
      ENDIF.
    
      CLEAR:P_CONNECT_INFO,P_CONNECT_INFO[],URL.
    *FUNCTION MODULE TO CHECK EXISTANCE OF IMAGE
      CALL FUNCTION 'HR_IMAGE_EXISTS'
        EXPORTING
          P_PERNR        = <PERNR_PHOTO>
        IMPORTING
          P_CONNECT_INFO = P_CONNECT_INFO
        EXCEPTIONS
          OTHERS         = 2.
      P_DOCUMENT_TYPE = P_CONNECT_INFO-RESERVE.
    *Function Module To Get the URL of Image
      CALL FUNCTION 'SCMS_DOC_URL_READ'
        EXPORTING
          STOR_CAT    = SPACE
          CREP_ID     = P_CONNECT_INFO-ARCHIV_ID
          DOC_ID      = P_CONNECT_INFO-ARC_DOC_ID
          COMP_ID     = 'DATA'
          DP_URL_ONLY = 'X'
        IMPORTING
          URL         = URL
        EXCEPTIONS
          OTHERS      = 10.
      IF SY-SUBRC <> 0.
      ENDIF.
    *Method To Set Display Mode Fit to Container
      CALL METHOD PICTURE->SET_DISPLAY_MODE
        EXPORTING
          DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT.
    *Method To load Image from URL
      CALL METHOD PICTURE->LOAD_PICTURE_FROM_URL_ASYNC
        EXPORTING
          URL = URL.
    
    ENDMODULE.
  • 相关阅读:
    HDU 1002 A + B Problem II
    HDU 2602 Bone Collector WA谁来帮忙找找错
    爬楼梯问题-最大迈两步
    2106 Problem F Shuffling Along 中石油-未提交-->已提交
    2101 Problem A Snake Filled
    2078 Problem H Secret Message 中石油-未提交-->已提交
    有关 时间 空间 以及 数据类型 的总结
    hdu 2510
    hdu 1133 卡特兰 高精度
    hdu 2067
  • 原文地址:https://www.cnblogs.com/ckstock/p/10562118.html
Copyright © 2020-2023  润新知