on 03-25-2010 12:56 PM
Hi,
I have select-option in my WD application. To collect data based on user input im using service call. How to pass this select option values to my RFC.
rgds
sudhanshu
Hi,
Refer to this below article on how to use & set default values in a WDA Select option.
http://divulgesap.com/blog.php?p=NjY=
Hope it helps.
Cheers,
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If I have understood your prob correctly, you need to proceed as follows:
Collect the data from select options into range table using following code:
DATA: rt_matnr TYPE REF TO data.
FIELD-SYMBOLS: <fs_matnr> TYPE table.
" Retrieve data from select option
rt_matnr = wd_this->z_handler->get_range_table_of_sel_field( i_id = 'MATNR'). " Replace z_handler and 'MATNR' with your attribute name and field id
" Assign it to a field symbol
ASSIGN rt_matnr->* TO <fs_matnr>.
Then arrange the data from table <fs_matnr> in importing or table parameter of RFC. Call the RFC by passing data.
I hope this will help.
Regards,
Saket.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thank s for your reply. In fact im doing similar with following variation:
i) collected range values using get_range* method.
ii) separate low and high values as:
read table <field2> index 1 into wa_range.
vert2_low = wa_range-low.
vert2_high = wa_range-high.
(Please note that in RFC I have taken two importing parameter as s_vert_lo and s_vert_hi)
iii) Now setting these RFC attribute as:
lo_el_importing->set_attribute(
EXPORTING
name = `S_VERT_LO`
value = vert2_low ).
and
lo_el_importing->set_attribute(
EXPORTING
name = `S_VERT_HI`
value = vert2_high ).
iv) In RFC im having my query as :
select <fld list> from BUT000 into table itab where vertical in r_vert.
Here, r_vert is a range defined as:
ranges r_vert for <fld refrence>
r_vert-sign = 'I'.
r_vert-option = 'BT'.
r_vert-low = S_VERT_LO.
r_vert-high = S_VERT_HI.
append r_vert.
Issue here is with ranges. if im passing both low and high values it is fine but if only low value being passed it is not giving me any record.
Please suggest.
Rgds
Sudhanshu
Hi,
Try to proceed as follows:
You are filling the internal table r_vert as:
ranges r_vert for <fld refrence>
r_vert-sign = 'I'.
r_vert-option = 'BT'.
r_vert-low = S_VERT_LO.
r_vert-high = S_VERT_HI.
append r_vert.
Just make a check over high value before filling range table as:
if S_VERT_HI is initial.
r_vert-sign = 'I'.
r_vert-option = 'EQ'. " Option will be 'EQ' instead of 'BT'
r_vert-low = S_VERT_LO.
else.
r_vert-sign = 'I'.
r_vert-option = 'BT'.
r_vert-low = S_VERT_LO.
r_vert-high = S_VERT_HI.
endif.
append r_vert.
Then proceed with the select query. In short use option value 'EQ' when only low value is passed. Hope this will help.
Regards,
Saket.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
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.