




已阅读5页,还剩2页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
关于search help Exit和样例 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 HelpThe 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. Dont 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
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年劳动者的合同权益与责任解析
- 常熟中学模拟考试题目及答案
- 常德美术教师考试题目及答案
- 曹县中考模拟考试题目及答案
- 现代山水创作题目及答案
- 2025借款合同样本
- 2025合作代理合同协议书模板
- 2025汽车租赁合同范本「中介」
- 2025年中小学体育教师招聘考试专业基础知识考试题库及答案(共380题)
- 2025年国际物流模考试题(含参考答案)
- GB/T 328.13-2007建筑防水卷材试验方法第13部分:高分子防水卷材尺寸稳定性
- GB/T 2480-2022普通磨料碳化硅
- 茶叶实践报告3篇
- 细胞生物学实验课件:细胞组分的分级分离
- 胸腔穿刺术thoracentesis课件
- 合理选择影像检查方法课件
- 欣旺集团种禽养殖管理制度手册
- Q∕SY 05129-2017 输油气站消防设施及灭火器材配置管理规范
- 企业微信私域流量运营方案
- 中职学校《机械基础》第二学期全套电子教案(含教学进度计划)(配套教材:高教版中职统编)云天课件
- 《重性精神疾病管理治疗工作规范》综合解读
评论
0/150
提交评论