• 关于F4 Help帮助窗口的参数F4METHOD的设置


    最近由于升级,sap的F4 Help对话框变成了MODAL对话框,以前编写的程序出现一些问题(DYNP_VALUES_UPDATE和F4IF_INT_TABLE_VALUE_REQUEST) 。解决办法如下:

    1、用sap *用户登录系统,点击菜单HELP->Settings...->F4 Help的Display选择Control方式。该参数将存在USR05表中,将影响F4GMETHOD参数。

    2、用新的登录用户登录 ,点击菜单HELP->Settings...->F4 Help的Display选择Control或者System Defaults方式。该参数将存在USR05表中,将影响F4METHOD参数。

    3、修改F4IF_INT_TABLE_VALUE_REQUEST代码如下:
    * immer modal laufen
    *{   INSERT         PRDK900023                                        1
      IF dynp_update = space OR return_tab IS REQUESTED or
         callcontrol-pvalues ne 'D'.
    *}   INSERT
      CLEAR: ocx_help_info-dynpprog, ocx_help_info-dynpro.
    *{   INSERT         PRDK900023                                        2
    endif.
    *}   INSERT
    就可将Modal窗口变为非Modaless窗口。

    4、对F4METHOD和F4GMETHOD访问的SAP标准代码
    FORM CHECK_OCX_SWITCHED_ON
              CHANGING ACTIVEX.
      DATA: ASK_ACTIVEX(10).
      statics: is_webgui, is_mozilla.
    * L鋟ft der GUI im ITS?

      CALL FUNCTION 'ITS_PING'
           EXCEPTIONS
                ITS_NOT_AVAILABLE = 1
                OTHERS            = 2.
      IF SY-SUBRC = 0.
    *   ITS l鋟ft.
        data: oldservice(128) type c.
        types: begin of struc,
               oldservice(128) type c,
              end   of struc.
        data: oldservice_tab type table of struc with header line.
    *   Do we have a webgui service
        if is_webgui is initial.
          call function 'ALEWEB_GET_CONTEXT'
            EXPORTING
              fieldname  = '~WEBGUI'
              fieldindex = 1
            TABLES
              DATA_TAB                    = oldservice_tab
           EXCEPTIONS
             INVALID_INDEX               = 1
             SYSTEM_FAILURE              = 2
             ITS_NOT_AVAILABLE           = 3
             COMMUNICATION_FAILURE       = 4
             OTHERS                      = 5.
          IF SY-SUBRC <> 0.
          endif.
          if oldservice_tab eq '1'.
            is_webgui = 'Y'.
          else.
            is_webgui = 'N'.
          endif.
        endif.
    *   the search help control support for Mozilla starts with Rel. 700
        if is_mozilla is initial.
          CALL FUNCTION 'ALEWEB_GET_CONTEXT'
            EXPORTING
              FIELDNAME                   = '~USERAGENTTYPE'
              FIELDINDEX                  = 1
            TABLES
              DATA_TAB                    = oldservice_tab
           EXCEPTIONS
             INVALID_INDEX               = 1
             SYSTEM_FAILURE              = 2
             ITS_NOT_AVAILABLE           = 3
             COMMUNICATION_FAILURE       = 4
             OTHERS                      = 5.
          IF SY-SUBRC <> 0.
          ENDIF.
          if oldservice_tab eq 'msiexplorer'.
            is_mozilla = 'N'.
          else.
            is_mozilla = 'Y'.
          endif.
        endif.
    *   Is it an EWT
        data: is_ewt.
        call function 'NAVIGATION_CHECK_TCODE_TYPE'
          EXPORTING
            transaction_code     = sy-tcode
            WITH_MESSAGE               = ' '
          EXCEPTIONS
            EASY_WEB_TRANSACTION       = 1
            NOT_HTML_ENABLED           = 2
            OTHERS               = 3.
        if sy-subrc eq 1.
          is_ewt = 'X'.
        endif.
        IF SY-SUBRC <> 0.
        endif.
        if is_mozilla eq 'Y' and is_webgui eq 'Y'.
          clear activex. exit.
        endif.
        if is_webgui ne 'Y' or not is_ewt is initial.
          activex = 'X'. exit.
        endif.
      ENDIF.
      GET PARAMETER ID 'F4GMETHOD' FIELD ASK_ACTIVEX.
      IF SY-SUBRC NE 0.
        PERFORM GETSYSTEMACTIVEXSETTINGS CHANGING ASK_ACTIVEX.
        SET PARAMETER ID 'F4GMETHOD' FIELD ASK_ACTIVEX.
      ENDIF.
      IF ASK_ACTIVEX EQ 'ActiveX'.         " Its the system default
        ACTIVEX = 'X'.
        GET PARAMETER ID 'F4METHOD' FIELD ASK_ACTIVEX.
        IF SY-SUBRC EQ 0.
          IF ASK_ACTIVEX EQ 'NoActiveX'. CLEAR ACTIVEX. ENDIF.
        ENDIF.
      ELSE.                                " Old style is the default
        GET PARAMETER ID 'F4METHOD' FIELD ASK_ACTIVEX.
        IF SY-SUBRC EQ 0.
          IF ASK_ACTIVEX EQ 'ActiveX'. ACTIVEX = 'x'. ENDIF.
        ENDIF.
      ENDIF.
    endform.                    "CHECK_OCX_SWITCHED_ONxiang

    相关连接:http://blog.csdn.net/CompassButton/archive/2007/01/24/1492229.aspx

  • 相关阅读:
    SPF(poj 1523) 割点入门
    从一个例子讲解拷贝构造函数与return
    还是引用
    引用的实质
    const
    三目运算符
    关于C语言链表的学习
    CS2013调试DLL
    fread与fwrite的自我理解
    可见字符与不可见字符
  • 原文地址:https://www.cnblogs.com/xiaomaohai/p/6157393.html
Copyright © 2020-2023  润新知