on 06-28-2009 12:23 PM
Hello,
I am using a dropdownbox as a selection criteria.
The box is filled via value_set.
So far no problem.
I would like to act on the field content the user has selected from the dropwdown box.
Question: What is the code behind to get that value here ?
My code to add the box:
select * from /BI0/PPROFIT_CTR into table it_pc
where co_area = '0001' and
objvers = 'A'
and G_CWW009 <> ' '.
refresh lt_value_set.
LOOP at it_pc into is_pc.
concatenate is_pc-G_CWW009 '__' is_pc-profit_ctr
into value_set-value.
concatenate is_pc-G_CWW009 is_pc-profit_ctr
into value_set-key.
insert value_set into table lt_value_set.
endloop.
wd_this->m_handler->add_parameter_field(
i_description = 'Profit Center'
i_id = 'ZPROC'
i_value = lr_value
i_as_dropdown = abap_true
it_value_set = lt_value_set
I_OBLIGATORY = 'X'
i_within_block = 'GROUP' ).
Many thanks
Paul
Edited by: Paul Boxberg on Jun 28, 2009 1:24 PM
lr_value must be type ref to data.
Use the method GET_SELECTION_FIELD supply the I_ID as ZPROC get the ET_RESULT into lr_value which is type ref to data.
declare a range table of type of your selection screen field.
field-symbols: <lt_range> type range of <type of your selection screen field>,
<ls_range> like line of <lt_raneg>.
assign lr_value->* to <lt_range>.
loop at <lt_range> assigning <ls_range>.
<ls_range>-low will have the value selected in dropdown
endloop.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.