Dialog programming - How to place a select-option field in a dialog screen
Hi all,
In Dialog Programming, How to place a select-option field in a dialog screen.
Kindly give me some example code...
Thanks,
Jaffer Ali.S
hi Ali,
U can add select-options in ur module pool by using SELECTION-SCREEN BEGIN OF SCREEN <scrn> AS SUBSCREEN command.
check this link for reference.....
http://help.sap.com/saphelp_47x200/helpdata/en/e7/deb237b9a9a968e10000009b38f8cf/frameset.htm
Example Code :
DATA : ok_code TYPE sy-ucomm.
SELECTION-SCREEN BEGIN OF SCREEN 1010 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_rad1 RADIOBUTTON GROUP grp1 DEFAULT 'X',
p_rad2 RADIOBUTTON GROUP grp1,
p_rad3 RADIOBUTTON GROUP grp1.
SELECT-OPTIONS: s_matnr FOR mara-matnr,
s_matkl FOR mara-matkl,
s_mtart FOR mara-mtart.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN END OF SCREEN 1010.
START-OF-SELECTION.
CALL SCREEN 100.
*& Module STATUS_0100 OUTPUT
MODULE status_0100 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
CALL SCREEN 1010 .
ENDMODULE. "status_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
MODULE user_command_0100 INPUT.
CASE ok_code.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
SCREEN 100 ****************
PROCESS BEFORE OUTPUT.
MODULE status_0100.
CALL SUBSCREEN sub_1010 INCLUDING sy-repid '1010'.
<b>***** where sub_1010 is name of sub-screen area</b>
PROCESS AFTER INPUT.
CALL SUBSCREEN sub_1010.
MODULE user_command_0100.
<<< REMOVED BY MODERATOR >>>
Harimanjesh AN
Edited by: Marcelo Ramos on Dec 17, 2008 7:54 PM
Similar Messages
-
How to hide the select-options fields on radiobutton select in webdynpro
hi
Could you please help how to hide the select-option fields in webdynpro
there are four radio buttons
for every radiobutton there is corresponding the select_option filed is associated to it
user as only provision select one radio button and reset of the select-option fileds should be hidden
which ever the radio button is selected corresponding the select-options fileld should be displayed
please find the attachement belowHi Nine,
To hide select options you should use interface method REMOVE_SELECTION_SCREEN_ITEM of IF_WD_SELECT_OPTIONS.
Sample code :
Write the below code in the Event handler of Radio Button.
DATA lv_r_helper_class TYPE REF TO if_wd_select_options.
lv_r_helper_class = lo_interfacecontroller->init_selection_screen(
lv_r_helper_Class->REMOVE_SELECTION_SCREEN_ITEM(exporting i_id = 'Select_option1_id1').
This will hide first select option of your screen.Similarly pass select_option_id2 to hide it and so on.
Regards,
Ravikiran.k -
How to create the select option for the Plant in screen (Module pool)
HI,
I am developing one module pool program and I have below requirement,
currently plant is acting like PARAMETER and the now it should be changed to select option.
how to create the select option in the screen
Thanks and regarding,
Malla
Moderator message - Cross post locked
Edited by: Rob Burbank on Dec 16, 2009 1:41 PMSteps to get SELECT-OPTIONS in module pool programs.
1.Start one dialog program with SAPMZ_001.
Place the below code in the TOP include of the dialog program.
TABLES marc.
SELECTION-SCREEN BEGIN OF SCREEN 3200 AS SUBSCREEN.
SELECT-OPTIONS: werks FOR marc-werks.
SELECTION-SCREEN END OF SCREEN 3200.
2 .Create one screen 3000.
Go to Layout of the screen and Define subscreen area on the screen and Name it as l_subscreen.
Place the below code in the Flow logic of the screen.
PROCESS BEFORE OUTPUT.
CALL SUBSCREEN l_subscreen INCLUDING 'SAPMZ_001' '3200'.
PROCESS AFTER INPUT.
CALL SUBSCREEN l_subscreen.
Activate all.
Create Transaction code for the dialog program .
Execute the transaction code. You will see the select-option for werks how we see on Selection-screen. -
How to validate a select-option field on the selection- screen
Hi,
I need to validate a selection-option field in the selection-screen.
Requirement is : i need to read each of customer number one by one and validateCan you please me in achieving this.
Best Regards
Mamatha.Bhi,
chk this sample code.
SELECT-OPTIONS : s_kunnr for kna1-kunnr.
AT SELECTION-SCREEN.
if 'S_KUNNR-HIGH' = "condition
"put your required validation here
endif.
rgds
Anver
Message was edited by:
Anversha s -
Select-option field on module pool screen
hi all,
Can anyone pls let me know, how to design and use a field like a select-option field on a Module-pool screen i.e. how can i get that multiple selections tab after the high field of the select-options.
thanks in advance,
vinnyAll you need to do is define your selection screen and then embed it in a subscreen area of your dynpro(screen). Here is a sample program.
report zrich_0006 .
tables: mara.
* Custom Selection Screen 1010
<b>selection-screen begin of screen 1010 as subscreen.</b>
selection-screen begin of block b1 with frame title text-001.
parameters: p_rad1 radiobutton group grp1 default 'X',
p_rad2 radiobutton group grp1,
p_rad3 radiobutton group grp1.
select-options: s_matnr for mara-matnr,
s_matkl for mara-matkl,
s_mtart for mara-mtart.
selection-screen end of block b1.
selection-screen end of screen 1010.
start-of-selection.
call screen 100.
*& Module STATUS_0100 OUTPUT
module status_0100 output.
* SET PF-STATUS 'xxxxxxxx'.
* SET TITLEBAR 'xxx'.
endmodule.
*& Module USER_COMMAND_0100 INPUT
module user_command_0100 input.
endmodule.
<b>* Screen screen 100 with a subscreen area called "subscreen_1010"
* Screen Flow Logic follows
*process before output.
* module status_0100.
* call subscreen subscreen_1010 including sy-repid '1010'.
*process after input.
* call subscreen subscreen_1010 .
* module user_command_0100.</b>
Regards,
Rich Heilman -
How to change the select-options fields length to long
Dear friends:
I had develop a program for sent email,and it have a field for fill mail address as below:
data: lmail like adr6-smtp_addr.
select-options: mailadd for lmail no intervals.
my customer complain that the field is too short,but I can not change it to longer,the select-options component limit the visible length , how can i do for this problem!Dear All:
I had realized this function.
I defined a parameter and a pushbutton to replace the select-option componet,
the code share as below.
data: lmail like adr6-smtp_addr.
SELECTION-SCREEN BEGIN OF LINE.
parameters: mailCopy like lmail.
selection-screen:pushbutton 64(5) pubu user-command mailButt.
SELECTION-SCREEN END OF LINE.
select-options: mailadd for lmail NO INTERVALS no-display.
at selection-screen output.
CLEAR l_count.
DESCRIBE TABLE mailadd LINES l_count.
IF l_count > 1.
write ICON_DISPLAY_MORE as icon to pubu.
ELSE.
write ICON_ENTER_MORE as icon to pubu.
ENDIF.
at selection-screen.
CLEAR l_count.
DESCRIBE TABLE mailadd LINES l_count.
IF NOT mailCopy IS INITIAL AND mailadd[] IS INITIAL.
MailAdd-low = mailCopy.
Append mailadd.
ENDIF.
IF l_count = 1 and mailCopy IS INITIAL.
refresh mailadd.
clear mailadd.
endif.
if sy-ucomm = 'MAILBUTT'.
perform show_box.
endif.
* FORM show_box *
FORM show_box.
TYPE-POOLS aqadh .
DATA: tab_and_field TYPE rstabfield.
tab_and_field-tablename = 'ADR6'.
tab_and_field-fieldname = 'SMTP_ADDR'.
CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
EXPORTING
TEXT = 'SET E-Mail To '
tab_and_field = tab_and_field
TABLES
range = MAILADD
EXCEPTIONS
no_range_tab = 1
cancelled = 2
internal_error = 3
OTHERS = 4.
IF NOT MAILADD[] IS INITIAL.
READ TABLE MAILADD INDEX 1.
MAILCopy = MAILADD-LOW.
ELSE.
CLEAR MAILCopy.
ENDIF.
ENDFORM. -
Problem in creating a Select-option im a module pool screen
I've been searching how to do a select option in a module pool screen, I've found this neat tutorial http://sample-code-abap.blogspot.com/2008/06/select-option-in-module-pool-screen.html
but I'm having trouble to replicate it...
I've created this conde in my TOP include
SELECTION-SCREEN BEGIN OF SCREEN 201 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
SELECT-OPTIONS: s_matnr FOR mara-matnr.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN END OF SCREEN 201.
and this is my screen flow code
PROCESS BEFORE OUTPUT.
MODULE status_0100.
MODULE pbo_200.
PROCESS AFTER INPUT.
MODULE pai.
MODULE user_command_0200.
in the screen 200 I have a subscreen area named subs
but when I do this:
MODULE pbo_200 OUTPUT.
CALL subscreen subs including sy-repid '0201'.
ENDMODULE. " pbo_200 OUTPUT
it doesn't "compile"
it gives me this error:
""." or "ID ... FIELD ..." expected after "SUBSCREEN"."
what am I missing? it seems its not recognising the "CALL SUBSCREEN" command...you can't use CALL SUBSCREEN... in any ABAP section. It is reserved to dynpro flow logic. Just add it after PROCESS BEFORE OUTPUT (and also after PROCESS AFTER INPUT).
-
How can I define select options fields as import paramter at Function Modules ?
Because I intend to pass select options fields to a FM in order to implement the below shown
code .
FUNCTION xyz
importing
ID
DESCRIPTION
CHANGING
REFERENCE(ZSC_INFO) TYPE SC_INFO
select * from SC_INFO into corresponding fields of table ZSC_INFO
where
ID in so_id and
DESCRIPTION in so_des and
ENDFUNCTIONHi,
The question is not completely clear to me but if you want to use the value of the select option and use it as an import parameter in a function module then some tips can be:
1. The value of the select option can be singles values or a range. Need to pick up the right values.
2. The import parameter and the variable you want to use must be of the same type.
DATA: tp_id TYPE <data type from the import parameter of the FM TEST>.
tp_id = so_vkorg-low "select option vkorg, you can use so_vkorg-high also for single values
CALL FM 'TEST'
IMPORT
ID = tp_id
EXPORT
DESCRIPTION = tp_description.
I hope that this is what you are looking for.
Best regards,
Guido Koopmann -
Select-option field leveln validation
Hi folks.
can you please tell me how to do a select-option field leveln validation, i know how to do incase the filed is defined as parameter. here my field is defined as select-option.
SELECT-OPTIONS: C_CTLPC FOR KNKK-CTLPC.
here i need to check for both low, high intervals?
please help me, thanks in advance.
regards
priyaHi again,
1. so i need to validate that filed should contatin '01' not '1'
U can validate like this.
2. Data : myval like knkk-ctlpc.
myval = '01'.
if myval in c_ctlpc.
else.
*----- code for error message
endif.
regards,
amit m. -
How to get dynamic select options from logical database?
Hi,
in one of my extended reports (means - overwritten standard SAP functionality in Z-namespace) I'm using LDB 'DDF'. I've been requested to validate some of the dynamic selection options (for example - field HKONT at Document level) and to split the logic depending on the particular value(s).
Tracking what is happened in the LDB program I found that this select option is added as dynamic WHERE clause to the SELECT statement - in a way:
WHERE bukrs = p_burks AND ... AND
(where_tab)
Is there a way to get values of these LDB dynamic select options into my report and if yes - how?
Thanks in advance.
Regards,
Ivaylo Mutafchiev
Senior SAP Abap ConsultantHi,
Try to use the following fm in your report and check
call function 'RS_REFRESH_FROM_DYNAMICAL_SEL'
exporting
curr_report = sy-cprog
mode_write_or_move = 'M'
importing
p_trange = gt_dyn_trange
exceptions
not_found = 1
wrong_type = 2
others = 3.
PS please make a whereused of this fm , how it has been used in LDB's to get dynmic selection values
a® -
How to create the select option in the screen
HI,
I am developing one module pool program and I have below requirement,
currently plant is acting like PARAMETER and the now it should be changed to select option.
how to create the select option in the screen
Thanks and regarding,
Malla
Moderator message - Please search before asking - post locked
Edited by: Rob Burbank on Dec 16, 2009 1:41 PMTry RANGES.
The RANGES has same structure as that of select-options. -
Freely Programed Help for select-option field
Hi,
how can i set freely programmed help for select option field, i mean while adding selection field what are the parameters that are important for freely programmed help.
i have implemented iwd_value_help in one component comp1 and declared the usage of comp1 in comp2 where i actually defined the usage of select-option component.
i used parameter i_value_help_type = if_wd_value_help_handler=>co_prefix_appldev while adding selection field, however when i presss F4 icon, the following message is coming
View WD_VALUE_HELP does not exist within the component WDR_SELECT_OPTIONS
Please suggest where i am doing wrong??
Edited by: kranthi kumar on Dec 29, 2010 6:19 PM>
kranthi kumar wrote:
> Hi,
>
> how can i set freely programmed help for select option field, i mean while adding selection field what are the parameters that are important for freely programmed help.
>
> i have implemented iwd_value_help in one component comp1 and declared the usage of comp1 in comp2 where i actually defined the usage of select-option component.
>
> i used parameter i_value_help_type = if_wd_value_help_handler=>co_prefix_appldev while adding selection field, however when i presss F4 icon, the following message is coming
>
> View WD_VALUE_HELP does not exist within the component WDR_SELECT_OPTIONS
>
> Please suggest where i am doing wrong??
>
> Edited by: kranthi kumar on Dec 29, 2010 6:19 PM
Hi Kranthi,
Please help me to understand your design.
Why would you like to create a Freely programmed value help for select-option?. why not use wdr_select_option directly ? -
In BI how to filter the selection options based on inputs on top field
Hi Friends,
In BI, How to filter the selection options based on inputs on top field.
The system should automatically filter the lower level drop downs based on the selection of a higher level.
For e.g. :
If a user selects a Country then the States drop down should only display the State's belongs to the Country. Similarly when a State is selected, the District drop down should display only those District's belongs to the State.
Thanks in Advance.
Regards
Jayaram MHi Anil,
Thanks for reply but I couldn't use Compounding Characteristic here. Need some other solution.
Regards
Jayaram M -
How can i decleare select-options in module pool table control?
Hi everybody!!
Can anyone tell me how can I decleare select-options in module pool table control screen?. I have declared it in a screen with a table control but a dump is triggered due to an error when generating the selection screen.
Regards...My suggestion will be try to use fm
call function 'FREE_SELECTIONS_DIALOG'
Please search this forum you can find lot of threads related to this.
a® -
How to set a select option's item as invisible (using a method code)
Hi there,
I need to hide parameters and select option fields, but Iu2019m using the select_option component to add all items to the layout using just one View Container Element.
I could use to hide the View Container Element setting the property visible, but I need to hide fields with certain conditions. I also could add one View Container Element for each select option, but I have many... I wish I could make in other way.
Iu2019ve checked the Definitions of the Interface IF_WD_SELECT_OPTIONS and the Ulli Hoffmannu2019s book and I have found no help at all.
Thanks in advance,
Filipe Torres
Edited by: Filipe Torres on Sep 15, 2008 12:34 AMThank you, this helps but will solve just part of my problem. I'm using many views and to pass the values from those select options and parameters I just declare them in the first view... The other answer helps me more that shows how to remove one element. I was looking for a hide feature and not remove, but seems that I have to remove.
Maybe you are looking for
-
Baseline date for payment due date.
Hi, In FB60 and Miro, Baseline date for calculating due date for payment is taken as default as document date, as per setting in payment terms. But I want to take this date as date of GR/SE. Can we do this. I also want to make it gray and dont want u
-
FBB1 - field payment term is missing
Dear Guru, When i post vendor invoice in FB01, field payment term is appear as usual. But if we post with FBB1 (same posting key [31] and same customer number without special G/L), field payment term is missing. Could you please suggest, how can we a
-
Support tel. number 080027752775 doesn't work
Hi! I am in Switzerland, talked to a support agent (presumably stationed in Ireland) and he gave me the above number to contact him by phone. However, neither does this number work directly, nor with the country codes 0049 (Germany) or 0035 (Ireland)
-
Access my web.xml data source via a class
Hi - I've gone ahead and set up a datasource in my web.xml according to the steps provided here by the good folks at Netbeans. I know my db works and my data source is set up correctly because I'm able to get results back from something using the fol
-
hi all im totally new to this forums and im learning active directory im using 2008 version of AD with more than 60 clients computer member of this ad domain everything works fine including gpo but i have a big problem. in accounting department they