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