關於F4 Help說明視窗的參數F4METHOD的設定

來源:互聯網
上載者:User

最近由於升級,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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.