2013 Sep 03 10:01 AM
Hello all,
I'm building a web dynpro where a user puts in a range of values, and when he clicks a button I present him a table with the table records which a certain field is in the given range.
Here's the button event code so far:
method ONACTIONSEARCH_PATS.
DATA: lt_pat TYPE TABLE OF npat,
lv_min_pat TYPE I,
lv_max_pat TYPE I.
*** In this section something should be added, I need you help for it, and then: ***
SELECT * FROM npat INTO TABLE lt_pat
WHERE patnr BETWEEN lv_min_pat AND lv_max_pat.
node_pat = wd_context->get_child_node( name = 'PATIENTS' ). "that's the table node
node_pat->bind_table( lt_pat ).
endmethod.
My question is: How do I get the values of the range? (I have two inputfields in the layout, one for minimun and one for maximum)
Thanks in advance.
2013 Sep 03 10:07 AM
Hi Daniel,
Why don't you choose Select-option in web dynpro. I hope its good option in that particular situation.
if that is not the case you must create two attributes for minimum and maximum and then read from input fields.
Regards,
Venkat.
2013 Sep 03 10:39 AM
hi danie..
your using two input fields its like select options . you want retrive data with that the range of select option . so this can acheived select- options in web dynpro
1. used the select option standard component i.e WDR_SELECT_OPTIONS. go through the link it might help full to you :http://saptechnical.com/Tutorials/WebDynproABAP/SelectOptions/demo.htm
it has complete detail use select-options in web-dynpro
Regards
Divakar