on 07-24-2007 10:41 AM
Hi,
i tried to add a default value to a parameter field with the following code.
CREATE DATA lr_data TYPE (wd_assist->c_kagru).
ASSIGN lr_data->* TO <fs_any>.
<fs_any> = wd_assist->c_kagru_planung.
wd_this->mr_selopt->add_parameter_field(
i_id = wd_assist->c_kagru
i_value = lr_data
i_read_only = abap_true
* i_dont_care_value = lr_data
).
If I use "i_dont_care_value" the application dumps.
Pls, let me know if any one knows.
Thanks
Marcus
The "don't care" value is <b>not</b> the default value. In order to specify a default value, just use i_value. The "don't care" value means "nothing selected" and is only useful if the initial value was part of the value set or if a special "nothing selected" value is supposed to be used.
Best regards,
Thomas
P.S: There is a known bug regarding specifying a default value. Depending on the support package you use, it might not work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello again,
setting the default value with memory ID also does not work?
SET PARAMETER ID 'ZPLAN_KAGRU' FIELD wd_assist->c_kagru_planung.
CREATE DATA lr_data TYPE (wd_assist->c_kagru).
ASSIGN lr_data->* TO <fs_any>.
<fs_any> = wd_assist->c_kagru_planung.
wd_this->mr_selopt->add_parameter_field(
i_id = wd_assist->c_kagru
i_value = lr_data
i_memory_id = 'ZPLAN_KAGRU'
i_read_only = abap_true
).
Greetings Marcus
Message was edited by:
Marcus
Hi Marcus,
The default value bug somehow slipped through the regression tests. Correction should be done by end of next week. I will post the note to this thread then. Feel free to create a support ticket in addition.
Memory id and lower case are both not supported yet and reserved for a future extension.
Best regards,
Thomas
Hello Marcus,
As promised this high priority issue has been fixed. Note 0001079237 contains the details. Unfortunately, the correction is dependent on an enhancement done in SP13 on the dropdown in Web Dynpro. This means no snote-applicable correction can be supplied for lower support packages. Nonetheless, if required a corrrection can possibly be supplied on an individual level for a lower SP as well. In case you require such a correction, I would like to ask you to open a support ticket.
Best regards,
Thomas
I took different approach.
I defined select-option and make it look like parameter on screen
and then i fill select option with default value . It worked same as parameter.
Nirad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
try in the following way
create data lr_dont_care_value type wdr_test_field.
assign lr_dont_care_value->* to <dont_care_value>.
<dont_care_value> = '99'.
wd_this->m_handler->add_parameter_field(
i_description = text
i_id = 'STRING5'
i_value = lr_value
i_as_dropdown = abap_true
i_dont_care_value = lr_dont_care_value ).
cheers
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.