cancel
Showing results for 
Search instead for 
Did you mean: 

select statement in webdynpro

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member188831
Contributor
0 Kudos

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

Former Member
0 Kudos

hi

i'm able to get the input values to parameters.....

but i'm user is entering more then one input its not satsifying the condtion.

former_member188831
Contributor
0 Kudos

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

Answers (2)

Answers (2)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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