美文网首页
双击打开网页

双击打开网页

作者: Mmm_余安 | 来源:发表于2020-05-15 11:27 被阅读0次

    双击事件


    GUI状态
    PAI事件
    FORM get_field_fj .
    DATA:fid(20).
      DATA:fid_line TYPE i.
      GET CURSOR FIELD fid.
      GET CURSOR LINE fid_line.
    
        DATA: BEGIN OF url_table OCCURS 10,
                l(4096),
              END OF url_table.
     "   fid_line = fid_line + top_line - 1.
        READ TABLE ET_FJURLS INTO ES_FJURLS INDEX fid_line.
        CLEAR :lv_string.
        lv_string = ES_FJURLS-url.
    *Modified by chenhao 20180115 begin.
    *Added by chenhao 20180226 begin.
    *URL变量作为URL地址跳转
        READ TABLE ET_FJURLS INTO ES_FJURLS  INDEX fid_line.
        IF sy-subrc = 0.
          REPLACE '@2K@' INTO ES_FJURLS-url  WITH space. "added by Jingtong01 on 20180725 显示图标标识链接已打开过
          CONDENSE ES_FJURLS-url NO-GAPS.
          url_table-l = ES_FJURLS-url.
        ENDIF.
    
        CONDENSE url_table-l.
        APPEND url_table.
    
        READ TABLE url_table.
        CALL FUNCTION 'WS_EXECUTE'
          EXPORTING
            program        = 'C:\Program Files\Internet Explorer\IEXPLORE.EXE'
            commandline    = url_table
    *       COMMANDLINE    = 'http://www.baidu.com'
            inform         = ''
          EXCEPTIONS
            prog_not_found = 1.
        IF sy-subrc <> 0.
          WRITE:/ 'Cannot find program to open Internet'.
        ENDIF.
    
        ES_FJURLS-url = |@2K@{ ES_FJURLS-url }|.  "added by Jingtong01 on 20180725 显示图标标识链接已打开过
        MODIFY Et_FJURLS FROM ES_FJURLS INDEX fid_line    .
    
    ENDFORM.
    
    双击就可以调取IE

    相关文章

      网友评论

          本文标题:双击打开网页

          本文链接:https://www.haomeiwen.com/subject/uuxonhtx.html