‎2007 May 16 3:20 AM
Hi Friends,
Can I code my select querry like this.
SELECT ponumber
inv_no
vendor_no
podate
poamount
typeofmat
buyer
porecdate
inv_amount
status
FROM zpo_input INTO CORRESPONDING FIELDS OF TABLE
lt_final WHERE porecdate GT bsis-budat and porecdate LT bsis-bldat
ponumber GT bsik-zuonr AND ponumber LT bseg-hzuon.
Regards,
Line
‎2007 May 16 4:15 AM
if bsis-budat, bsis-bldat, bsik-zuonr, bseg-hzuon are the input field then you can write the select query as you mentioned but if you are trying to match the data with table fields then you have to go for inner join with those tables.
regards
shiba dutta
‎2007 May 16 3:25 AM
‎2007 May 16 3:25 AM
Hi,
Yes you can write code like this.
There is only one AND missing in your code.
SELECT ponumber
inv_no
vendor_no
podate
poamount
typeofmat
buyer
porecdate
inv_amount
status
FROM zpo_input INTO CORRESPONDING FIELDS OF TABLE
lt_final WHERE porecdate GT bsis-budat and porecdate LT bsis-bldat
<b>AND</b>
ponumber GT bsik-zuonr AND ponumber LT bseg-hzuon.
Regards,
Atish
‎2007 May 16 3:27 AM
The following fields bsis-budat, bsis-bldat, bsik-zuonr, bseg-hzuon are only the input fields on the screen it is not referening to any table. Just what ever the values entered in the screen are captured in the following fields.
Regards,
Line
‎2007 May 16 3:34 AM
If the field name is bsis-bldat, .......so on.. are named like that in screen fields, then it fetches all records.
for testing purpose.. put a break point on select query and check the bsis-bldat and all these fields r carrying the values entered in screen or not?
Regards
SAB
‎2007 May 16 4:15 AM
if bsis-budat, bsis-bldat, bsik-zuonr, bseg-hzuon are the input field then you can write the select query as you mentioned but if you are trying to match the data with table fields then you have to go for inner join with those tables.
regards
shiba dutta