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.
Similar Messages
-
How can i used pai in screen 1000 to change the select-options field?
hi,all.
I want used pai to change the select-options field,but it can't works.
the mainly code is:
REPORT ZTEST99.
TABLES :MARA,MAKT,MARC.
SELECTION-SCREEN BEGIN OF BLOCK B0 WITH FRAME TITLE TITLE0 .
select-options:s_matnr for mara-matnr,
s_werks for marc-werks MODIF ID ID1.
SELECTION-SCREEN END OF BLOCK B0.
parameters:p_flag as checkbox.
at selection-screen OUTPUT.
LOOP AT SCREEN.
IF P_FLAG = 'X' .
IF screen-group1 = 'ID1'.
screen-input = '0'.
ELSE.
screen-input = '1'.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
START-OF-SELECTION.
CALL SCREEN 1000.
when i click p_flag,then i want to change s_werks from OBLIGATORY to no OBLIGATORY.
how can i realized?
Thanks for all.
SunHi ,
change your code like this.
Change in your code:
SELECTION-SCREEN BEGIN OF SCREEN 100.
SELECT-OPTIONS : s_matnr for mara-matnr,
s_werks for marc-werks MODIF ID ID1.
SELECTION-SCREEN END OF SCREEN 100 .
At selection-screen.
if sy-dynnr = '100'.
IF P_FLAG = 'X' .
LOOP AT SCREEN.
IF screen-group1 = 'ID1'.
screen-required = '0'.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
else.
LOOP AT SCREEN.
IF screen-group1 = 'ID1'.
screen-required = 1.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
my code :
REPORT Z50871_SELECTOPS_DYNAMIC.
PARAMETERS : CH_EBELN AS CHECKBOX,
CH_VBELN AS CHECKBOX.
DATA: V_EBELN TYPE EKKO-EBELN,
V_VBELN TYPE VBAK-VBELN.
SELECTION-SCREEN BEGIN OF SCREEN 100.
SELECT-OPTIONS : EBELN FOR V_EBELN MODIF ID G1,
VBELN FOR V_VBELN MODIF ID G2.
SELECTION-SCREEN END OF SCREEN 100 .
AT SELECTION-SCREEN OUTPUT.
IF SY-DYNNR = 100.
IF CH_EBELN = 'X' AND
CH_VBELN = ''.
LOOP AT SCREEN.
IF SCREEN-GROUP1 EQ 'G1'.
SCREEN-ACTIVE = '1'.
ELSE.
SCREEN-ACTIVE = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSEIF CH_VBELN = 'X' AND
CH_EBELN = '' .
LOOP AT SCREEN.
IF SCREEN-GROUP1 EQ 'G2'.
SCREEN-ACTIVE = '1'.
ELSE.
SCREEN-ACTIVE = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSEIF CH_EBELN = 'X' AND CH_VBELN = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 EQ 'G1'
OR SCREEN-GROUP1 EQ 'G2' .
SCREEN-ACTIVE = '1'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
ENDIF.
AT SELECTION-SCREEN.
IF SY-DYNNR = 1000.
IF CH_EBELN = 'X' OR CH_VBELN = 'X'.
CALL SELECTION-SCREEN 100.
ELSE.
MESSAGE I000(Z50871MSG) WITH 'Please select atleast one checkbox'.
ENDIF.
ENDIF.
regards
Sandeep Reddy -
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 change the select options selection text dynamically in webdynpro abap ?
I am using standard interface WDR_SELECT_OPTIONS.... i want to change the Selection text dynamically in my select options.I.E. if the select option is for VBELN field than i want to change its description SALES ORDER Number through Code to some other text.
If anyone can please help me in this.Hi,
You can achieve your requirement as below
Get the range table of your selection field as below
data lt_range_table type ref to data.
wd_this->m_handler->GET_RANGE_TABLE_OF_SEL_FIELD(
exporting
i_id = 'VBELN'
receiving
rt_range_table = lt_range_table ).
Update the selection field with new description - 'Your New Text'
wd_this->m_handler->UPD_SELECTION_FIELD(
exporting
I_ID = 'VBELN'
I_DESCRIPTION = 'Your New text'
I_IS_AUTO_DESCRIPTION = abap_false
IT_RESULT = lt_range_table ).
You can also pass the other parameters as per your requirement
Hope this helps you.
Regards,
Rama -
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 to write in selection screen after the select option field?
Hi
Please help me with this...
i need to write format of date after the select option field in the selection screen.
its like..
date ___________ to ___________ <b>yyyymmdd</b>
points will be awarded..
thanxUse selection-screen comment 1(31) text-005 -> this will give you format option.
See the below sysntax ,you have to use like this
Selection-screen begin of block b2 with frame title text-002.
selection-screen begin of line.
selection-screen comment 1(31) text-004.
parameter: r_1 radiobutton group rad1.
selection-screen end of line.
selection-screen begin of line.
Aging Report
selection-screen comment 1(31) text-005.
parameter: r_2 radiobutton group rad1.
selection-screen comment 40(30) text-003.
parameter: p_expir as checkbox.
selection-screen end of line.
selection-screen begin of line.
Materials with no Expiry Date
selection-screen comment 1(31) text-006.
parameter: r_3 radiobutton group rad1.
selection-screen comment 40(30) text-007.
parameter : p_bin as checkbox ."default 'X'.
selection-screen end of line.
selection-screen end of block b2.
selection-screen end of block b0. -
Disable the Select-options field in the viewcontainer
Hi,
I have two select option fields(Date,Number) in a viewcontainer .
Now i need to disable one of the select-option field(Date) in the view container based on the condition.If I give Enability for the view container then both the select options will get diasbled.Is there any way to disable only Date select-option field in the view container.
Thanks in Advance.
Regards,
bala.Hi,
I just tested this solution and it is working for me....Following on Thomas's suggestion...I did the following....
I just had one select-option on my scr...but it can be done with two too...
step1:
created three attributes at component level under the attribute tab ( as suggested by Thomas )
ENABLE_PRI_SELECTOPTION type WDY_BOOLEAN
M_HANDLER type ref to IF_WD_SELECT_OPTIONS
M_WD_SELECT_OPTIONS type ref to IWCI_WDR_SELECT_OPTIONS
Note: all are with public check box checked....so that all your views can see these attributes
I created a method at componenet controller leverl: create_select_option....in this method i have following code:
DATA:
lt_range_table TYPE REF TO data,
* rt_range_table TYPE REF TO data,
read_only TYPE abap_bool,
typename TYPE string.
DATA:
lr_componentcontroller TYPE REF TO ig_componentcontroller,
l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
* create the used component
l_ref_cmp_usage = wd_this->wd_cpuse_select_options( ).
IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
l_ref_cmp_usage->create_component( ).
ENDIF.
* get a pointer to the interface controller of the select options
*component
wd_this->m_wd_select_options = wd_this->wd_cpifc_select_options( ).
* init the select screen
wd_this->m_handler = wd_this->m_wd_select_options->init_selection_screen( ).
* create a range table that consists of this new data element
lt_range_table = wd_this->m_handler->create_range_table(
i_typename = 'PERSNO' ).
* add a new field to the selection
wd_this->m_handler->add_selection_field(
i_id = 'PERSNO'
I_VALUE_HELP_TYPE = if_wd_value_help_handler=>CO_PREFIX_SEARCHHELP
I_VALUE_HELP_ID = 'ZHELP_WDA_PERNR'
I_NO_INTERVALS = abap_true
it_result = lt_range_table
i_read_only = wd_this->ENABLE_PRI_SELECTOPTION ). <-----pls see here how i am controlling the read only property
I assume you know this much...already....but i am just putting everything down....
step2:
in my view where i want to display the select-options....i added this code under my wddoinit method
DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .
lo_componentcontroller = wd_this->get_componentcontroller_ctr( ).
lo_componentcontroller->ENABLE_PRI_SELECTOPTION = abap_false. <--pls see initially we want this field to be open
lo_componentcontroller->create_select_option(
step3:
i did not have much logic to control the select option field so i added a button which if user presses the field become disable...
under that button action method i added the following code:
DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .
lo_componentcontroller = wd_this->get_componentcontroller_ctr( ).
lo_componentcontroller->ENABLE_PRI_SELECTOPTION = abap_true.
"<---pls see here how i am changing the global *attribute which Thomas has suggested for controlling the "read only" attibute for the select-option field....you can put this under *your "if" statement....
"this step is very important if you do not remove the field you will get the dump...since it will try to add the same field again
"which produces dump from system....
lo_componentcontroller->m_handler->REMOVE_SELECTION_SCREEN_ITEM(
i_id = 'PERSNO' ).
"now call the same method which we created at component level to create the select_options...
lo_componentcontroller->create_select_option(
that is all....it works great for me.....let us know if still have any questions....
Thanks...
AS... -
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. -
How to display the selection screen fields for selected checkboxes
Hi all,
I have 7 checkboxes, for each check box we have some seletion screen fields.if i select first check box,i want to display first slection screen fields only.
and if we select more than one check box how to display the selection screen fields for selected check boxes,please help me this
Thanks
sriman.hi,
Try this code
report z_13317_sdn2.
tables : mara, marc, dd03l.
parameters : p_chk1 as checkbox user-command ABC,
p_chk2 as checkbox user-command PQR,
p_chk3 as checkbox user-command XYZ.
select-options : s_matnr for mara-matnr modif id A,
s_ersda for mara-ersda modif id A,
s_werks for marc-werks modif id B,
s_lvorm for marc-lvorm modif id B,
s_tab for dd03l-tabname modif id C.
data: v_chk1,
v_chk2,
v_chk3.
at selection-screen output.
loop at screen.
if screen-group1 = 'A' or
screen-group1 = 'B' or
screen-group1 = 'C'.
screen-input = 0.
modify screen.
endif.
endloop.
loop at screen.
if v_chk1 = 'X'.
if screen-group1 = 'A'.
screen-input = 1.
modify screen.
endif.
endif.
if v_chk2 = 'X'.
if screen-group1 = 'B'.
screen-input = 1.
modify screen.
endif.
endif.
if v_chk3 = 'X'.
if screen-group1 = 'C'.
screen-input = 1.
modify screen.
endif.
endif.
endloop.
at selection-screen.
if sy-ucomm = 'ABC'.
if v_chk1 = ' '.
v_chk1 = 'X'.
else.
v_chk1 = ' '.
endif.
endif.
if sy-ucomm = 'PQR'.
if v_chk2 = ' '.
v_chk2 = 'X'.
else.
v_chk2 = ' '.
endif.
endif.
if sy-ucomm = 'XYZ'.
if v_chk3 = ' '.
v_chk3 = 'X'.
else.
v_chk3 = ' '.
endif.
endif.
Regards,
Sailaja. -
Select Options: How to preallocate the select options values?
Hi All,
I have been trying to preallocate my select options. I want to read all values a user is authorized for and set them in the range of the select options fields (before the are actually shown to the user). However, I wasn't able to..
Does anybody know how to do that and can provide codong examples?
Thanks, JohannesHi Johannes,
Refer to the below link which has an article on the same topic with code snippets-
http://www.divulgesap.com/blog.php?p=NjY=
Regards,
Ravikiran -
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 Increase the Selection screen window length width big....
How to Increase the Selection screen window length width big.... I cant able to do some enter text... because of the window size it gives error... can anyone help me out this...
Thanks in advancehi,
Maximum size is fixed for selection-screen.
Split your text into different lines to fit it.
Create a text element for your text and write it as comments.
selection-screen begin of block b3 with frame title text-041.
selection-screen begin of line.
parameters : p_all radiobutton group g2 default 'X'.
selection-screen comment 10(75) text-049.
selection-screen end of line.
selection-screen begin of line.
parameters : p_iloc radiobutton group g2.
selection-screen comment 10(75) text-050.
selection-screen end of line.
selection-screen end of block b3.
Regards
Sailaja. -
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.Shi 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 -
How to disable the select options button, while audio is playing in the question template in captivate 8?
Apologies for late reply.
I mean "On Question screens audio keeps on playing even after we have selected an option or options depending on the question type and clicked Submit. How do we stop the audio on selecting an option?" -
How to change the selected tabPane title color in JTabbedPane
how to change the selected tabPane title color(or set bold) in JTabbedPane.
Any advice will be appreciate.Hi,
try
// Set text color for the selected tab
tab.setForegroundAt(tab.getSelectedIndex(), Color.red);Hope that helps
Maybe you are looking for
-
Hi Experts, We are developing smart forms, in the driver program while executing the user selects authorized signatory number we need to get populated the signature in the Smart Forms. How to go about it. We have converted all the signature into .ti
-
"stopped (error = -34) " when downloading tv show
I've bought every season of grey's anatomy on itunes so I can watch it on my computer. For some reason there are three specific episodes from season two that won't download. Each time I try a window comes up saying "there was a problem downloading "n
-
How to call a method in parallel mode
Hi, I have a web application (ADF/JSF/EJB3) developed under jdev 11g I need to call a method in my backing bean but in parallel mode. The idea is that when the user click on a button to compute something i do not want the user to wait untill the proc
-
Dialog process running without information
Hi Since a few days i have two dialog processes without user, client, report, table, any information and they are running in the Application Server 4. In the begining was only one but today i have two in the same case. I already check the SM21, ST22
-
How can I change the decimal in numbers Aftre the upgrade I miss these icons