- 浏览: 169084 次
- 性别:
- 来自: 成都
文章分类
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 5721. Goto-> Attributes->Pus ... -
Handy SAP function module to automate user events
2013-11-28 09:49 694*Begin-Auto triggers ENTER comm ... -
set Billing block to blank for Sals Order
2013-04-17 15:16 738FM: SD_WF_ORDER_DEL_BILLING_BLO ... -
set Billing block to blank for Sals Order
2013-04-17 15:16 710FM: SD_WF_ORDER_DEL_BILLING_BLO ... -
Unpermitted combination of business object BUS2032 and sales doc. category H
2013-01-25 14:20 4046Q: create New Sales Order using ... -
Function Module: get all users who have specific role
2013-01-25 14:16 585CALL 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 791FORM compute_2date_diff. DAT ... -
Retrieving Domain fixed values
2012-02-16 11:13 782source:http://www.saptechnical. ... -
If 1 equals 2, what’s the purpose?
2012-02-16 10:59 793source:http://sapport.blogspot. ... -
get status name for batch input session
2012-01-31 14:47 884Line 601 in program SAPMSBDC_CC ... -
create zip folder with cl_abap_zip
2011-12-05 18:11 1173REPORT ztest. DATA: gv_file ... -
MIRO
2011-11-29 10:39 2027from: http://help-sap.blogspot. ... -
Create Vendor or Customer_master Data
2011-11-23 16:22 2844To Create or Change Vendor_mast ... -
Pay attention to the following points when using append structures
2011-10-27 13:43 1271You cannot create append str ... -
Help Views
2011-10-20 10:46 689source:http://help.sap.com/saph ... -
What is the Different Types and Usage of Views
2011-10-19 23:06 808source:http://www.sap-img.com/a ... -
Upload a Comma Delimited CSV file that contains commas in data
2011-09-23 17:22 2185source:http://wiki.sdn.sap.com/ ... -
What is the difference between SET SCREEN and CALL SCREEN ?
2011-09-19 21:50 697source:http://www.saptechies.co ... -
cl_gui_frontend_services=>file_open_dialog
2011-09-09 09:21 1373CALL METHOD cl_gui_frontend_ser ...
相关推荐
藏经阁-insecurity-In-Building-Automation-How-To-Create-Dark-Buildin
mac book AIfred workflow 创建新文件,mac book AIfred workflow 创建新文件,
react-native-create-module 使用单个命令创建React Native库的工具。你为什么需要这个? 如果您要为React Native创建本机模块,则需要为要支持的每个平台提供一些本机代码,然后需要一些JavaScript代码将其绑定在...
create-ssl-certificate 创建自签名SSL证书的命令行工具
创建React本机模块 使用单个命令创建React Native库模块或本机视图组件的工具。 请参阅下面的命令行用法,无视图示例和具有非常简单的本机视图的示例。 该工具基于 ,具有工作示例回调,可选的本机视图以及和其他...
10-create-a-ten-year-strategy-for-your-ciso
create-a-ten-year-strategy-for-your-ciso.pdf
Create a List-Driven SharePoint Site Notification System源代码
This demonstrates how to create a short-cut to a specific file.
iOS游戏应用源代码——funkyboy-How-To-Create-a-Rotating-Wheel-Control.zip
编译时报 Looking for pthread_create - not found 的解决办法 linux gcc 编译时报Looking for pthread_create - not found 其解决办法是...
Create a Process-Driven Composite Application with CE 7.2 - Introduction.pdf
开源项目-hnlq715-goroutine-pool.zip,A simple goroutine pool which can create and release goroutine dynamically, inspired by fasthttp.
These articles are a selection of the best from Smashing Magazine in 2009 and 2010 dealing with creating e-commerce websites. The articles have been carefully edited and prepared as a PDF version ...
Brandstetter-insecurity-In-Building-Automation-How-To-Create-Dark-Buildings-With-Light-Speed
how to create oracle create table command
# npmnpm install create-pull-request --global# yarnyarn add create-pull-request --global用法// in the terminal in your project folder (default browser)create-pull-request// opens the URL in a ...
us-17-Brandstetter-insecurity-In-Building-Automation-How-To-Create-Dark-Buildings-With-Light-Speed
SELECT --从数据库表中检索数据行和列 INSERT --向数据库表添加新数据行 DELETE --从数据库表中删除数据行 UPDATE --更新数据库表中的数据 --数据定义 CREATE TABLE --创建一个数据库表 DROP TABLE --从数据库...