Select options propertis change
Hi all,
I have a select options initialized into the method WDDOINIT of a view as follows:
wd_this->m_handler->add_selection_field( i_id = 'KUNNR'
it_result = lt_range_table
i_read_only = read_only
i_no_extension = abap_false
i_no_intervals = abap_false ).
in this view I arrive from another one by cliccking one of 4 links, I would like that only in 1 of this case the select options above is without intervals and extension, so I call into each method HANDLEFROM_LINK the method upd_selection_field.
in that one the select options should have no interval and extension I write following code:
CALL METHOD wd_this->m_handler->upd_selection_field
EXPORTING
i_id = 'KUNNR'
i_no_extension = abap_true
i_no_intervals = abap_true.
in all the other ones instead I write:
CALL METHOD wd_this->m_handler->upd_selection_field
EXPORTING
i_id = 'KUNNR'
i_no_extension = abap_false
i_no_intervals = abap_false.
this unfortunately doesn't work very well during the navigation, what happends is, when I click the first time a link it take the correct properties for the select options, but if I come back to the previous view and click another link It take again the properties of the first link clicked...
Any suggest for me?
thanks in advance
GN
What I saw in debug is that during upd_selection_field execution the attribute MT_FIELDS is filled only when I call the first link and the method works, then I push back, and click on another link this time that attribute is empty, following read fails:
read table mt_added_fields
with key m_id = <field>-m_id
assigning <added_field>.
if sy-subrc = 0.
<added_field> = <field>.
if field is a new added field, any property can be changed
<original_field> = <field>.
else.
if is_changeable_property = abap_true.
delete mt_changed_fields where table_line = <field>-m_id.
insert <field>-m_id into table mt_changed_fields.
if field is not new only a subset of properties can be changed
<original_field>-mt_range_table = <field>-mt_range_table.
<original_field>-mt_value_set = <field>-mt_value_set.
<original_field>-m_is_nullable = <field>-m_is_nullable.
<original_field>-m_format_properties = <field>-m_format_properties.
endif.
endif.
So <added_field> is not updated... could this help you to understand my error?
Similar Messages
-
Hide Select option properties in Webdynpro ABAP
Hi,
I have a select option defined in my Webdynpro application.
I want to control/hide few properties of this SELECT-OPTION. How do I do that.
I am using Select-option of type IF_WD_SELECT_OPTIONS.
ags.Done:
wd_this->mr_select_options->add_selection_field(
i_id = attribute_info-name
i_description = label_text
i_value_help_structure = value_help_structure
i_value_help_structure_field = value_help_structure_field
i_no_extension = no_extension
* Begin of changes by ASINHA
* This is used to avoid pattern from select options
I_USE_COMPLEX_RESTRICTION = abap_true
* End of changes by ASINHA
it_result = select_options_range
i_no_intervals = wd_assist->true ). -
How To... Change the Data Type for a SELECT-OPTIONS at run time.
Hello,
I am trying to restrict the values available for entry into a SELECT-OPTIONS at run time depending on user input.
The logic is as follows. The user has two input fields. A PARAMETER field which has the type RSDIOBJNM and allows them to choose an InfoObject. And the user has a SELECT-OPTIONS field to allow them to select the Characteristic values for that InfoObject.
I would like the following example to be possible:
The user enters 0MATERIAL into the PARAMETER. When the user clicks on the SELECT-OPTIONS control code will derive a list of possible options the user can enter in the SELECT-OPTIONS. In this case only values found in the master data or at least no values greater than 18 characters.
I have looked at the following function module SELECT_OPTIONS_RESTRICT and this do not appear to be helpful as they only restrict on the signs allowed for the values (unless I misunderstand, it is a complex function module!).
The code I have so far is (thus the user enters a InfoObject into p_char1 and the select options so_char1 should only accept active values of that InfoObject):
declaration of variables for user interface
DATA c_char(32) TYPE c.
declaration of count variable
DATA i_count TYPE i.
declaration of user interface
SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-001.
PARAMETERS: p_ipack TYPE RSLOGDPID.
SELECTION-SCREEN END OF BLOCK a1.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
PARAMETERS: p_char1 TYPE RSDIOBJNM.
SELECT-OPTIONS: so_char1 for c_char NO INTERVALS.
PARAMETERS: p_char2 TYPE RSDIOBJNM.
SELECT-OPTIONS: so_char2 for c_char NO INTERVALS.
PARAMETERS: p_char3 TYPE RSDIOBJNM.
SELECT-OPTIONS: so_char3 for c_char NO INTERVALS.
SELECTION-SCREEN END OF BLOCK b1.
Is what I am trying to do possible???
Thanks for any help. Ross.You really want to restrict possible values of a select-option based on another field, not change the length of type of the select-option field, right?
Here is what you do: Code a custom F4 value help for the select-option at event AT SELECTION-SCREEN ON VALUE REQUEST FOR.. The first thing you do here is read the value of the parameter field (p_ipack in your example). You can use function module DYNP_VALUES_READ. Based on this value, you can propose values for the select-option fields. Note that the use can still enter whatever s(he) wishes in to the select-option field without pressing F4. In this case, you will have to code some input validations taking into account the value in the p_ipack field. -
Itunes 10.6.1.7 problem: when I change the file "media type" from 'Music' to 'Podcast' the file disapears from ITUNES. I do this via (1) right click, (2) select 'Get Info', (3) select 'options' tab, and (4) change media type. What is the problem?
Hi Memalyn
Essentially, the bare issue is that you have a 500GB hard drive with only 10GB free. That is not sufficient to run the system properly. The two options you have are to move/remove files to another location, or to install a larger hard drive (eg 2TB). Drive space has nothing to do with SMC firmware, and usually large media files are to blame.
My first recommendation is this: download and run the free OmniDiskSweeper. This will identify the exact size of all your folders - you can drill down into the subfolders and figure out where your largest culprits are. For example, you might find that your Pictures folder contains both an iPhoto Library and copies that you've brought in from a camera but are outside the iPhoto Library structure. Or perhaps you have a lot of purchased video content in iTunes.
If you find files that you KNOW you do not need, you can delete them. Don't delete them just because you have a backup, since if the backup fails, you will lose all your copies.
Don't worry about "cleaners" for now - they don't save much space and can actually cause problems. Deal with the large file situation first and see how you get on.
Let us know what you find out, and if you manage to get your space back.
Matt -
Changing property of select options
Hi I have created a select options with the property read only = true by default, If a condition at the beginning is fulfilled I want to change the property read only of the previous field to false. I am doing it in the following way:
DATA lt_range_table TYPE REF TO data.
Data from select options
rt_objid = wd_this->m_handler->get_range_table_of_sel_field( i_id = zdcl_wdr_matriz_decision_asf=>e_atrib_m_dec_asf-grupo_form ).
ASSIGN rt_objid->* TO <fs_objid>.
Create range tabl
lt_range_table = wd_this->m_handler->create_range_table( i_typename = zdcl_wdr_matriz_decision_asf=>e_atrib_m_dec_asf-tipo_d ).
DATA: id TYPE string.
id = zdcl_wdr_matriz_decision_asf=>e_atrib_m_dec_asf-tipo_d.
REPLACE ALL OCCURRENCES OF REGEX '\W' IN id WITH '_'.
IF NOT <fs_objid> IS INITIAL.
update property
wd_this->m_handler->upd_selection_field(
i_id = id
it_result = lt_range_table
i_read_only = abap_false ).
ENDIF.
What is wrong here please?
Help really appreciatedHi Jorge.
Why do you perform the replacement? Are you sure, that the ID you used while adding the field is the same as the one you use for updating? What is the rror or does just nothing happen?
Cheers,
Sascha
Message was edited by:
Sascha Dingeldey -
Can I change the select option text for pnp ldb ?
hi Akll,
I am using a pnp logical database in my report and I have created my own hr category because i wanted to use field ename from the ldb in the selection screen. Now the problem with ename is I cant do a case sensitive search.
So I have replaced it with sname, so now my screen has sname instead of ename, however I want to change the selection text for select option ( at present it is 'EE name can be sorted' )
Kindly advise,
thanks,
GVI guess the text cannot be changed.. anyways you can add the field as an additional field by normal coding in your report
-
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 -
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 -
Change values of select option in fuction of the variant
Hi abappers,
I want change the data that contain several select-options.
I have a table internal (c_varint) that I obtain with the next code:
CALL FUNCTION 'RS_VARIANT_CONTENTS'
EXPORTING
report = '/1BCDWB/DBBKPF'
variant = p_varint
* MOVE_OR_WRITE = 'W'
* NO_IMPORT = ' '
* EXECUTE_DIRECT = ' '
* IMPORTING
* SP =
tables
* L_PARAMS =
* L_PARAMS_NONV =
* L_SELOP =
* L_SELOP_NONV =
valutab = c_varint
* OBJECTS =
* FREE_SELECTIONS_DESC =
* FREE_SELECTIONS_VALUE =
* EXCEPTIONS
* VARIANT_NON_EXISTENT = 1
* VARIANT_OBSOLETE = 2
* OTHERS = 3
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
and my select-options:
SELECT-OPTIONS I1 FOR BKPF-BUKRS.
SELECT-OPTIONS I2 FOR BKPF-BELNR.
SELECT-OPTIONS I3 FOR BKPF-GJAHR.
SELECT-OPTIONS I4 FOR BKPF-BLART.
SELECT-OPTIONS In ...
Now I want change the values but I got not him to changed it to me :
loop at c_varint where selname eq i1.
MOVE-CORRESPONDING c_varint to i1.
endloop.
loop at c_varint where selname eq i2.
MOVE-CORRESPONDING c_varint to i2.
endloop.
loop at c_varint where selname eq i3.
MOVE-CORRESPONDING c_varint to i3.
endloop.
loop at c_varint where selname eq i4.
MOVE-CORRESPONDING c_varint to i4.
endloop.
but I dont obtain the data
Can you help me, please?
Cordial greetings.Hi,
the documentation of the fm you´re using says:
RS_VARIANT_CONTENTS
This function module checks whether any parameters or select options of the variant have changed. If they have, it outputs an error message (variant obsolete).
have you checked fm RS_CHANGE_CREATED_VARIANT instead?
the documentation of this fm says:
RS_CHANGE_CREATED_VARIANT
Functionality
This function module enables modification of a variant without processing the selection screen. In the table VARI_CONTENTS, you must supply all select-options and parameters of the variant with values. Any selection criteria missing from this table are set to their initial values in the variant. If no value is specified for the structure description (parameter VARI_DESC), all fields - except the name of the last user to make the change, the time of the change, the version and the language - are set to their initial values. The table VARI_TEXT is optional
Best regards -
Change from Parameter to Select-options.
Hi All,
Requirement is to change the existing program.
One of my requirement is to change parameter(P_VKORG) to Select-options(S_VKORG).
I mean earlier we have only one Slaes Organization, now we have got to use multiple Sales organizations. For this requirement I have used select-options insted of Parmeters.
But the code has:
a)PERFORMS using Parameters( P_VKORG). This inturn is used in the select statement of the FORM-ENDFORM.
b)READ statement also has P_VKORG in where condition.
How should these be replaced with Select-options(S_VKORG)?
What would be the effect if I directly replace them with S_VKORG.
Kalyani Tyou cannot just directly replace with S_VKORG.
select option is a structure with 4 fields, sign, option, low and high, hence it has to be dealt accordingly.
a. performs has to be changed to 'tables S_VKORG'
eg. perform get_data tables s_vkorg.
b. read statement has to be modified to deal with multiple values. best option will be to select for data in s_vkorg, and save in an internal table.
for eg, if select option was for vkorg,
select vkorg from tvko into t_tvko where vkorg in s_vkorg.
now t_tvko has list of possible vkorgs - regardless of we had a range or ne or gt or CP or whatever we had in select option.
now modify the read table to do for entries in T_TVKO.
c. in the select statement which is used in forms, wherever you see ' = P_vkorg' , replace with IN S_VKORG. -
How to access the Document Options dialog box to select display properties?
How to access the Document Options dialog box to select display properties (e.g. smartcut ) for a selected document to
be viewed in the Workspace.
regardsPreferences --> General --> Reset all warnings.
Mylenium -
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. -
How to change date format in select-option (mm.yyyy).
Hi,
Plz, How to change date format in select-option (mm.yyyy).
in my selection screen date type selection-option is there ,when i am enter date it's taken dd.mm.yyyy format,but i want mm.yyyy format.
how to set that .
Regards,
Kk.sorry
parameters : pmonyr type spmon or
select-options : sspmon for PGPL-spmon .
or what table ccontains spmon.
regards
shiba dutta -
Changing field label for standard select option
Hi All,
I need to change the label for one of the standard select option for the custom report category.
the field is PNPSTAT1 - original label is - Customer-Specific Status - which i need to change as per customer requirement.
Can anyone tell me the way i can do it so that it can be viewed with correct label not only on the selection screen but in further selections mode as well.
Regards,
RaunakDear Raunak,
If you have standard select option for standard selection screen:
create a implicit enhancement for any standard program and wrote the below code at the end of the program and it is working..
INITIALIZATION.
%_s_PNPSTAT1%_app_%-text = 'ANY LABEL'.
If you have custom report select option, go to above Ravikiran's procedure.
Best of luck.
Regards,
Abbas. -
Change the Parameter as Select option
Hi Guy's,
Please help me friends, present requirement is like this : change the Parameter into Select-Option.
Here they are using one function module, this function module import parameter taking single value, how loop this function module with in this select-option.
PARAMETERS p_fictr LIKE fmfctr-fictr.
START-OF-SELECTION.
Move the select options to internal tables (import parameter for fn)
move_sel_option : sel_buk s_bukrs ,
sel_pern s_pernr ,
sreinr s_reinr ,
spdatv s_pdatv ,
sberei s_berei .
Call the function to get all trips corresponding to sel criteria
CALL FUNCTION 'ZHR_GET_FUND_TRIPS'
EXPORTING
p_fictr = p_fictr
p_sub = p_sub
TABLES
s_bukrs = s_bukrs
s_pernr = s_pernr
s_reinr = s_reinr
s_pdatv = s_pdatv
s_berei = s_berei
i_trip = i_trip
EXCEPTIONS
OTHERS = 1.
Thanks and Regards,
Saihi,
You can first the field values using the select statement and then loop that internal table and pass the values to the function module.
try this
*PARAMETERS p_fictr LIKE fmfctr-fictr.
select-options: s_fictr for fmfctr-fictr.
START-OF-SELECTION.
Move the select options to internal tables (import parameter for fn)
move_sel_option : sel_buk s_bukrs ,
sel_pern s_pernr ,
sreinr s_reinr ,
spdatv s_pdatv ,
sberei s_berei .
select fictr
from fmfctr
into tabel itab
where fictr in s_fictr.
loop at itab.
Call the function to get all trips corresponding to sel criteria
CALL FUNCTION 'ZHR_GET_FUND_TRIPS'
EXPORTING
*p_fictr = p_fictr
p_fictr = itab-fictr
p_sub = p_sub
TABLES
s_bukrs = s_bukrs
s_pernr = s_pernr
s_reinr = s_reinr
s_pdatv = s_pdatv
s_berei = s_berei
i_trip = i_trip
EXCEPTIONS
OTHERS = 1.
endloop.
regards,
Veeresh
Maybe you are looking for
-
I know that there are some clevers guys over this forum..I have a little
question that doesn't refer to Java, But I was quite satisfied with your help that I will try my luck again. I am writing an application refering to AI field. I need to find a list of last names, computer products and companies as long as I can find
-
i have deleted the settings icon from my iphone 5. It is still there when I double click the home button. How can I get the icon back?
-
Whenever I play GTA V on optimal graphics (via GeForce Experience) it powers off after 5-10 minutes and then reboots automatically after another 2-3 mins. It s definitely not an overheating issue, since I know the laptop has been hotter before and I
-
Oracle BPEL interactive installation in command prompt
Hi All, I'm trying to install Oracle BPEL Process Manager for OC4J in linux environment at remote.I login to the remote machine through SSH. I would like to know if there is any guide to install through command line. I mean interactive installer in c
-
Ship to record not populated in the CDHDR table at the time of creation
HI I have created the Ship to party in R/3 and automatically i couldnt found the customer number entry with Change object as " I " in the table CDHDR. but ideally all the master data creation entries will be written in the CDHDR table with " I ". Ple