- 浏览: 173866 次
- 性别:
- 来自: 成都
文章分类
source:http://abap-explorer.blogspot.com/2008/08/create-select-options-in-module-pool.html
Create a SELECT-OPTIONS in module pool screen using two methods as shown.
Method 1
a) Create a subscreen area in your screen layout where you want to create the select options.
b) In the top include of your module pool program declare a selection screen as a subscreen e.g.
c) In the PBO and PAI of the main screen where the select options needs to be created do a call subscreen of the above screen (100).
CALL SUBCREEN sub_area INCLUDING <program> <screen>
This CALL SUBSCREEN statement is necessary for transport of values between screen and program.
Note: All validations of the selection screen fields e.g. the s_matnr field created above should be done in selection screen events like AT SELECTION-SCREEN etc and not in PAI. These selection screen validations etc should be done in the top include only.
Method 2
a) Create 2 separate fields in your screen layout - one for the low value and one for the high value. Insert an icon beside the high value which will call the multiple selections popup screen on user command. Use function module COMPLEX_SELECTIONS_DIALOG to achieve this.
You can use the return table rng_kunnr to populate your own internal range table with the values entered by the user. Basically here you are just simulating the work of a select-options parameter by module pool screen elements.
Create a SELECT-OPTIONS in module pool screen using two methods as shown.
Method 1
a) Create a subscreen area in your screen layout where you want to create the select options.
b) In the top include of your module pool program declare a selection screen as a subscreen e.g.
SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN. select-options s_matnr for mara-matnr. SELECTION-SCREEN END OF SCREEN.
c) In the PBO and PAI of the main screen where the select options needs to be created do a call subscreen of the above screen (100).
CALL SUBCREEN sub_area INCLUDING <program> <screen>
This CALL SUBSCREEN statement is necessary for transport of values between screen and program.
Note: All validations of the selection screen fields e.g. the s_matnr field created above should be done in selection screen events like AT SELECTION-SCREEN etc and not in PAI. These selection screen validations etc should be done in the top include only.
Method 2
a) Create 2 separate fields in your screen layout - one for the low value and one for the high value. Insert an icon beside the high value which will call the multiple selections popup screen on user command. Use function module COMPLEX_SELECTIONS_DIALOG to achieve this.
struc_tab_and_field-fieldname = con_cust. " 'KUNNR' struc_tab_and_field-tablename = con_kna1. " 'KNA1'. CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG' EXPORTING * TITLE = ' ' text = g_titl1 " 'Customers' tab_and_field = struc_tab_and_field TABLES RANGE = rng_kunnr EXCEPTIONS NO_RANGE_TAB = 1 CANCELLED = 2 INTERNAL_ERROR = 3 INVALID_FIELDNAME = 4 OTHERS = 5. IF NOT rng_kunnr[] IS INITIAL. * Read the very first entry of the range table and pass it to * dynpro screen field READ TABLE rng_kunnr INDEX 1. IF sy-subrc = 0. g_cust = rng_kunnr-low. ENDIF. ENDIF.
You can use the return table rng_kunnr to populate your own internal range table with the values entered by the user. Basically here you are just simulating the work of a select-options parameter by module pool screen elements.
发表评论
-
DISABLE button(FCODE) from the GUI-Status
2014-08-04 15:54 6291. Goto-> Attributes->Pus ... -
Handy SAP function module to automate user events
2013-11-28 09:49 747*Begin-Auto triggers ENTER comm ... -
set Billing block to blank for Sals Order
2013-04-17 15:16 813FM: SD_WF_ORDER_DEL_BILLING_BLO ... -
set Billing block to blank for Sals Order
2013-04-17 15:16 740FM: SD_WF_ORDER_DEL_BILLING_BLO ... -
Unpermitted combination of business object BUS2032 and sales doc. category H
2013-01-25 14:20 4133Q: create New Sales Order using ... -
Function Module: get all users who have specific role
2013-01-25 14:16 663CALL FUNCTION 'RSRA_USERS_O ... -
Converting OTF data from script to Spool Request
2012-03-06 17:25 0source:http://forums.sdn.sap.co ... -
Calculate the days, months and years between 2 dates.
2012-02-21 16:14 833FORM compute_2date_diff. DAT ... -
Retrieving Domain fixed values
2012-02-16 11:13 808source:http://www.saptechnical. ... -
If 1 equals 2, what’s the purpose?
2012-02-16 10:59 830source:http://sapport.blogspot. ... -
get status name for batch input session
2012-01-31 14:47 922Line 601 in program SAPMSBDC_CC ... -
create zip folder with cl_abap_zip
2011-12-05 18:11 1205REPORT ztest. DATA: gv_file ... -
MIRO
2011-11-29 10:39 2062from: http://help-sap.blogspot. ... -
Create Vendor or Customer_master Data
2011-11-23 16:22 2915To Create or Change Vendor_mast ... -
Pay attention to the following points when using append structures
2011-10-27 13:43 1303You cannot create append str ... -
Help Views
2011-10-20 10:46 734source:http://help.sap.com/saph ... -
What is the Different Types and Usage of Views
2011-10-19 23:06 845source:http://www.sap-img.com/a ... -
Upload a Comma Delimited CSV file that contains commas in data
2011-09-23 17:22 2230source:http://wiki.sdn.sap.com/ ... -
What is the difference between SET SCREEN and CALL SCREEN ?
2011-09-19 21:50 759source:http://www.saptechies.co ... -
cl_gui_frontend_services=>file_open_dialog
2011-09-09 09:21 1415CALL METHOD cl_gui_frontend_ser ...
相关推荐
项目经过测试均可完美运行! 环境说明: 开发语言:java jdk:jdk1.8 数据库:mysql 5.7+ 数据库工具:Navicat11+ 管理工具:maven 开发工具:idea/eclipse
项目经过测试均可完美运行! 环境说明: 开发语言:java jdk:jdk1.8 数据库:mysql 5.7+ 数据库工具:Navicat11+ 管理工具:maven 开发工具:idea/eclipse
基于java的网吧管理系统答辩PPT.pptx
基于java的基于SSM架构的网上书城系统答辩PPT.pptx
tornado-6.1-cp37-cp37m-win32.whl
c语言气泡排序、插入排序、选择排序、快速排序、希尔排序、堆排序、合并排序_SortAlgorithm.zip
Keyboard Maestro 11.0.3_macwk.dmg
基于微信小程序的鲜花销售微信小程序答辩PPT.pptx
项目经过测试均可完美运行! 环境说明: 开发语言:java jdk:jdk1.8 数据库:mysql 5.7+ 数据库工具:Navicat11+ 管理工具:maven 开发工具:idea/eclipse
tornado-6.2b1-cp39-cp39-musllinux_1_1_x86_64.whl
项目经过测试均可完美运行! 环境说明: 开发语言:java jdk:jdk1.8 数据库:mysql 5.7+ 数据库工具:Navicat11+ 管理工具:maven 开发工具:idea/eclipse
tornado-6.1b2-cp38-cp38-manylinux2014_aarch64.whl
基于java的土家风景文化管理平台答辩PPT.pptx
jira安装包
基于java的机场网上订票系统答辩PPT.pptx
小区物业管理系统 SSM毕业设计 附带论文 启动教程:https://www.bilibili.com/video/BV1GK1iYyE2B
yolo算法-金属-纸张-硬纸板垃圾数据集-13409张图像带标签-金属-纸张-硬纸板-塑料-其他-烟蒂-食物-玻璃.zip;yolo算法-金属-纸张-硬纸板垃圾数据集-13409张图像带标签-金属-纸张-硬纸板-塑料-其他-烟蒂-食物-玻璃.zip;yolo算法-金属-纸张-硬纸板垃圾数据集-13409张图像带标签-金属-纸张-硬纸板-塑料-其他-烟蒂-食物-玻璃.zip
项目介绍: 系统模块主要包括;用户、考试信息、考场信息、试卷、试题、考试等管理功能 环境说明: 开发语言:java jdk:jdk1.8 数据库:mysql 5.7+ 数据库工具:Navicat11+ 管理工具:maven 开发工具:idea/eclipse
项目经过测试均可完美运行! 环境说明: 开发语言:java jdk:jdk1.8 数据库:mysql 5.7+ 数据库工具:Navicat11+ 管理工具:maven 开发工具:idea/eclipse
Python脚本运行环境搭建所需要的资源包