on 05-28-2009 4:58 AM
Hi all,
I'm working on webdynpro.....
i've four input fields... if user enters any values any one of the field or multiple field it should fetch the values... but i'm not getting the proper o/p... please suggest the query for this...
I've written the query like this...
iv_fr_date IS NOT INITIAL or iv_to_date IS NOT INITIAL or iv_req_type IS NOT INITIAL or iv_req_status IS not INITIAL
or iv_req_no is not INITIAL.
SELECT mandtt
reqno
zitem
ersda
ernam
zreqtype
maktx
zmenge
meins
matkl
name1
bill
zbrand
zstatus
zvers
zersda_mat
zernam_mat
zersda_price
zernam_price
matnr
verpr
loekz
lead_time
waers FROM zmatreq
INTO TABLE et_matreq
WHERE ersda BETWEEN iv_fr_date and
iv_to_date or
zreqtype = iv_req_type or
reqno = iv_req_no or
zstatus = iv_req_status.
regards
Suprith
Hi Suprith,
nothign to worry, it is as simple as how we write in normal abap.
please check whether you are able to get the input values into the local variable like
iv_fr_date
iv_to_date
iv_req_type
iv_req_no
iv_req_status.
and the conditions are getting match with the data exist in your z* table.
try to debug where exactly the problem.
all the best.
Regards,
Mahesh.Gattu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suprith,
if it is not satisfying the condition obviuosly you will not get the data right ?
what are you expecting to do ??
to get some data for testing pruspose either you need to matian the data in your Z* table as per the conditions or change the condition as per the data and try.
Thanks,
Mahesh.Gattu
Hi,
You can try it by using corresponding fields of table as below:-
SELECT mandtt
reqno
zitem
ersda
ernam
zreqtype
maktx
zmenge
meins
matkl
name1
bill
zbrand
zstatus
zvers
zersda_mat
zernam_mat
zersda_price
zernam_price
matnr
verpr
loekz
lead_time
waers FROM zmatreq
INTO corresponding fields of table et_matreq
WHERE ersda BETWEEN iv_fr_date and
iv_to_date or
zreqtype = iv_req_type or
reqno = iv_req_no or
zstatus = iv_req_status.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
1. I assume that you have read the context_element to get the attribute filled with user input.
2. You can use the range table to fire such kind of query.
data ltr_carrid type range of sflight-carrid.
data ltr_connid type range of sflight-connid.
select * from sflight into lt_flight
where
carrid in ltr_carrid
AND
connid in ltr_connid
like wise you can put other fields also.
Does this help.
Thanks,
Rahul
Edited by: Rahul Yadav on May 28, 2009 6:02 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.