1、 search help Exit是用于对标准帮助进行扩充,以提供更好的灵活性。
2、search help Exit何时被调用
Before Displaying the Dialog Box for Selecting the Required Search Path.
It is only called for collective search helps. Using the search help exit, the set of elementary search helps available can for example be restricted depending on the context.
Before Starting the F4 Process for the Elementary Search Help
The call is triggered independent of whether the dialog window for entering the search conditions appears or whether the selection is executed immediately (for example, because in the Hot key of the elementary search help Immediate value display is set).
Before Displaying the Dialog Box for Entering Search Conditions.
You can either influence the dialog for entering search conditions or skip it altogether here. You can also influence how the selection screen looks. The call is triggered only if there is no direct selection (that is, if in the Hot key of the elementary search help Immediate value display is not set).
Before Selecting Data.
The data selection can be partly or completely copied from the search help exit. This can become necessary if the data selection cannot be implemented with a SELECT statement for a table or a view.
Before Displaying the Hit List.
You can influence the display of the hit list in this step with the search help exit. You can reduce the number of values displayed here. For example, you can display only values for which the person calling the input help has authorization. You can also copy the complete hit list from the search help exit.
Before Returning the Values Selected by the User to the Input Template.
It could be advisable to intervene at this time if control of the further transaction flow should depend on the value selected. A typical example is setting set/get parameters.
3、search help Exit的函数模板(F4IF_SHLP_EXIT_EXAMPLE )程序员就可以拷贝该函数进行改编,已达到适合自己企业的应用。
function f4if_shlp_exit_example.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" TABLES
*" SHLP_TAB TYPE SHLP_DESCT
*" RECORD_TAB STRUCTURE SEAHLPRES
*" CHANGING
*" VALUE(SHLP) TYPE SHLP_DESCR
*" VALUE(CALLCONTROL) LIKE DDSHF4CTRL STRUCTURE DDSHF4CTRL
*"----------------------------------------------------------------------
* EXIT immediately, if you do not want to handle this step
if callcontrol-step <> 'SELONE' and
callcontrol-step <> 'SELECT' and
" AND SO ON
callcontrol-step <> 'DISP'.
exit.
endif.
*"----------------------------------------------------------------------
* STEP SELONE (Select one of the elementary searchhelps)
*"----------------------------------------------------------------------
* This step is only called for collective searchhelps. It may be used
* to reduce the amount of elementary searchhelps given in SHLP_TAB.
* The compound searchhelp is given in SHLP.
* If you do not change CALLCONTROL-STEP, the next step is the
* dialog, to select one of the elementary searchhelps.
* If you want to skip this dialog, you have to return the selected
* elementary searchhelp in SHLP and to change CALLCONTROL-STEP to
* either to 'PRESEL' or to 'SELECT'.
if callcontrol-step = 'SELONE'.
* PERFORM SELONE .........
exit.
endif.
*"----------------------------------------------------------------------
* STEP PRESEL (Enter selection conditions)
*"----------------------------------------------------------------------
* This step allows you, to influence the selection conditions either
* before they are displayed or in order to skip the dialog completely.
* If you want to skip the dialog, you should change CALLCONTROL-STEP
* to 'SELECT'.
* Normaly only SHLP-SELOPT should be changed in this step.
if callcontrol-step = 'PRESEL'.
* PERFORM PRESEL ..........
exit.
endif.
*"----------------------------------------------------------------------
* STEP SELECT (Select values)
*"----------------------------------------------------------------------
* This step may be used to overtake the data selection completely.
* To skip the standard seletion, you should return 'DISP' as following
* step in CALLCONTROL-STEP.
* Normally RECORD_TAB should be filled after this step.
* Standard function module F4UT_RESULTS_MAP may be very helpfull in this
* step.
if callcontrol-step = 'SELECT'.
* PERFORM STEP_SELECT TABLES RECORD_TAB SHLP_TAB
* CHANGING SHLP CALLCONTROL RC.
* IF RC = 0.
* CALLCONTROL-STEP = 'DISP'.
* ELSE.
* CALLCONTROL-STEP = 'EXIT'.
* ENDIF.
exit. "Don't process STEP DISP additionally in this call.
endif.
*"----------------------------------------------------------------------
* STEP DISP (Display values)
*"----------------------------------------------------------------------
* This step is called, before the selected data is displayed.
* You can e.g. modify or reduce the data in RECORD_TAB
* according to the users authority.
* If you want to get the standard display dialog afterwards, you
* should not change CALLCONTROL-STEP.
* If you want to overtake the dialog on you own, you must return
* the following values in CALLCONTROL-STEP:
* - "RETURN" if one line was selected. The selected line must be
* the only record left in RECORD_TAB. The corresponding fields of
* this line are entered into the screen.
* - "EXIT" if the values request should be aborted
* - "PRESEL" if you want to return to the selection dialog
* Standard function modules F4UT_PARAMETER_VALUE_GET and
* F4UT_PARAMETER_RESULTS_PUT may be very helpfull in this step.
if callcontrol-step = 'DISP'.
* PERFORM AUTHORITY_CHECK TABLES RECORD_TAB SHLP_TAB
* CHANGING SHLP CALLCONTROL.
exit.
endif.
endfunction.
4、样例代码(参考sap的实例SFLIGHT)
SFLIGHT(SE11)中设置了search help exit SAPBC_GLOBAL_F4_SFLIGHT 。代码如下:
function sapbc_global_f4_sflight.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" TABLES
*" SHLP_TAB TYPE SHLP_DESCT
*" RECORD_TAB STRUCTURE SEAHLPRES
*" CHANGING
*" VALUE(SHLP) TYPE SHLP_DESCR
*" VALUE(CALLCONTROL) LIKE DDSHF4CTRL STRUCTURE DDSHF4CTRL
*"----------------------------------------------------------------------
* The scope of this search help exit is decribed in the documentation.
* Note that SAPBC_GLOBAL_F4_SFLIGHT_MIN_FR provides a more complex
* example of a serch help exit.
data: begin of seatinfo occurs 0, " parallel table to
seatsmax type sflight-seatsmax, " record_tab containing
seatsocc type sflight-seatsocc, " the information about
seatsfre type s_seatsfre, " the seats
end of seatinfo.
if callcontrol-step = 'SELECT'.
* The search help parameters SEATSMAX and SEATSOCC are not displayed on
* the list of possible entries. Hence, provided they are not connected
* to dynpro fields, the F4 processor might consider it not to be
* necessary to select the contents of these fields.
* But this exit needs these contents in order to compute the number of
* free seats. Thus, the space for this contents is allocated by the
* following two calls. This automatically forces the F4 processor to
* fill this space with the contents of these fields.
call function 'F4UT_PARAMETER_ALLOCATE'
exporting
parameter = 'SEATSMAX'
tables
shlp_tab = shlp_tab
record_tab = record_tab
changing
shlp = shlp
callcontrol = callcontrol.
call function 'F4UT_PARAMETER_ALLOCATE'
exporting
parameter = 'SEATSOCC'
tables
shlp_tab = shlp_tab
record_tab = record_tab
changing
shlp = shlp
callcontrol = callcontrol.
endif.
check callcontrol-step = 'DISP'.
* This Exit only has to do something before the list of possible values
* is displayed. At that moment it has to compute the number of free
* seats for each row and attach it to the result of the selection
* process
* First fill the seatsmax-Info from the selected data. Note that there
* are two ways of using F4UT_PARAMETER_VALUE_GET described in the
* documetation of that function module. Here the second one is used.
call function 'F4UT_PARAMETER_VALUE_GET'
exporting
parameter = 'SEATSMAX'
" Reference to search help parameter
fieldname = 'SEATSMAX'
" Reference to field of Seatinfo
tables
shlp_tab = shlp_tab
record_tab = record_tab
results_tab = seatinfo
changing
shlp = shlp
callcontrol = callcontrol.
* Now do the same with the seatsocc-Info:
call function 'F4UT_PARAMETER_VALUE_GET'
exporting
parameter = 'SEATSOCC'
" Reference to search help parameter
fieldname = 'SEATSOCC'
" Reference to field of Seatinfo
tables
shlp_tab = shlp_tab
record_tab = record_tab
results_tab = seatinfo
changing
shlp = shlp
callcontrol = callcontrol.
* Now compute the number of free seats:
loop at seatinfo.
if seatinfo-seatsocc < seatinfo-seatsmax.
seatinfo-seatsfre = seatinfo-seatsmax - seatinfo-seatsocc.
else.
clear seatinfo-seatsfre.
endif.
modify seatinfo transporting seatsfre.
endloop.
* Finally transport the computed numbers into the search help data.
call function 'F4UT_PARAMETER_RESULTS_PUT'
exporting
parameter = 'SEATSFRE'
" Reference to search help parameter
fieldname = 'SEATSFRE'
" Reference to field of Seatinfo
tables
shlp_tab = shlp_tab
record_tab = record_tab
source_tab = seatinfo
changing
shlp = shlp
callcontrol = callcontrol.
endfunction.
具体处理流程如图:
分享到:
相关推荐
"以下代码示例展示了如何使用`search help Exit`进行自定义扩展 在使用标准搜索帮助时,`search help Exit`提供了一种增强功能的方法,以适应更灵活的需求。它在几个关键点被调用: 1. 在显示选择所需搜索路径的...
在企业级软件开发中,尤其是SAP ABAP环境下,搜索帮助(SEARCH HELP)是提高用户界面友好性、数据输入准确性和效率的关键工具之一。本文将深入探讨如何对标准的ABAP搜索帮助进行增强,以满足更复杂的数据展示需求。 ...
通过 Search Help Exit,用户可以自定义 Search Help 的行为,例如,自定义搜索结果的排序、过滤和显示。Search Help Exit 通常用于实现复杂的搜索逻辑或与其他系统集成。 实现 Search Help Exit 要实现 Search ...
4. **查阅官方文档**:参考SAP官方文档,了解有关Search Help的详细信息和技术支持。 #### 六、总结 Search Help 是SAP ABAP中一项非常实用的功能,能够显著提高用户的输入效率和准确性。通过合理的设计和配置,...
3. **交互逻辑**:在 `ZFP_PROVIDER` 中,还需要实现与值帮助相关的其他方法,如 `INITIALIZE`, `EXIT` 等,以确保值帮助窗口的正确显示和关闭。 #### 示例代码 ```abap * 在 ZFP_PROVIDER 的组件控制器中 DATA: ...
SAP搜索帮助的创建; eixt for search help
1. **API参考**:HTML Help Workshop SDK 包含了关于HTML Help API的详细文档,这是开发者在程序中调用.chm文件的关键。这些API函数,如`HtmlHelp()`,允许程序打开、搜索和导航.chm文件。 2. **编译器和编辑器**:...
helpdrop.sql是删除help表和HELP_TEMP_VIEW视图的脚本 helpus.sql是安装的帮助信息。 不过oracle自带的help和?的解释太少,如果自己找到其它更全的脚本也放到这个目录下,便于管理。 安装oracle自带的help(安装...
HTML Help Workshop是一款由微软开发的工具,主要用于创建和编辑CHM(Compiled HTML Help)文件,这是一种常见的Windows平台上的帮助文档格式。CHM文件是通过将HTML文档、图像和其他相关资源组合到一起,并进行编译...
help_help_help_help_help
【Microsoft Help Viewer】是微软为开发者提供的一款离线帮助系统,它允许用户在不联网的情况下查阅Visual Studio相关的技术文档和教程。此安装包是从Visual Studio 2019的完整安装包中提取出来的独立组件,版本号为...
HTML Help Workshop集成了所有必要的组件,包括HTML编辑器、编译器和索引工具,使得开发者能够轻松地为应用程序或网站构建互动式的帮助系统。 HTML是一种超文本标记语言,广泛应用于网页制作。然而,当需要为软件或...
2. **使用说明.txt**:这个文件很可能是提供给用户关于如何正确使用和安装压缩包内文件的指南,可能包含了恢复“Help”功能的步骤,例如将文件复制到系统目录、注册相关dll文件或者修改系统设置等。 3. **Help** ...
【VS2017HelpViewer 2.3 中文版 MSDN 可下载】这个标题表明,这是一个关于Visual Studio 2017帮助查看器(Help Viewer)的中文版本,它允许用户离线查看MSDN(Microsoft Developer Network)文档。MSDN是微软提供的...
HTMLHelp Workshop是一款由微软开发的工具,用于创建和编译HTML格式的帮助系统,常用于Windows应用程序的在线帮助文档制作。这款软件提供了丰富的功能,包括索引、搜索、书签等,使得用户能够方便地访问和查找相关...
- `exit` 和 `quit`:退出MySQL客户端。 3. **输出到文件**:使用`tee`命令可以将MySQL命令及其输出结果保存到文件中。例如: ```sql mysql> tee mysql_help.txt ``` 这样所有的输入和输出都会被记录到`mysql_...
5. **HelpViewer**:内置的帮助查看器允许用户在Windows环境中无缝地浏览和搜索帮助内容。 在实际应用中,Microsoft HTML Help Workshop的使用步骤通常包括以下几个阶段: 1. **规划**:确定文档的结构,设计目录...
HFSS 2020是该系列软件的一个版本,其帮助文档(HFSS Help)为用户提供了详尽的使用指南和技术支持。 HFSS Help文档涵盖了HFSS软件的各种功能和操作流程,包括但不限于以下关键知识点: 1. **几何建模**:HFSS支持...
Microsoft HTML Help Workshop V4.03汉化版是一款由微软公司推出的工具,专门用于创建、编辑和编译HTML格式的帮助文件,通常以CHM(Compiled HTML Help)格式呈现。这款软件在IT行业内对于开发人员和文档撰写者而言...