‎2007 Jan 29 9:25 AM
Hi Friends,
how to make field selection based on * search for fields on "intf_name" and "sap_order" . If user enters first 3 characters with * , then it should only fetch the "intf_name" field with value starting with these 3 characters only.
SELECT sap_invoice
intf_name
legacy_order
inv_create_date
source_psid
CURRENCY
inv_total_amount
FROM zcfinvoices
INTO TABLE t_zcfinvoices1
WHERE sap_invoice IN s_in_rng
AND intf_name IN intf_name " field1
AND sap_order IN sap_order " field2
AND inv_create_date IN s_incrdt
AND intf_date IN s_invdat
AND dest_psid IN s_dtpsid.
thanks in advance..
‎2007 Jan 29 9:32 AM
use select query like this -
select * from dbtab into corresponding fields of table itab
where field1 like 'ABC%'.
it wil fetch all data having field field1 value starting with ABC
or refer demo code -
tables zgill_main.
parameters p_var(3).
data begin of itab occurs 0.
include structure zgill_main.
data end of itab.
concatenate p_var '%' into p_var.
select * from zgill_main into table itab where name like p_var.
loop at itab.
write:/ itab-name.
endloop.
‎2007 Jan 29 9:33 AM
Hi,
you can select it using CP operator,
SELECT *
WHERE intf_name CP '*abc'.
create a variable which can hold *XXX chars.
regards,
Raghavendra
‎2007 Jan 29 9:37 AM
hi Prakash,
try the following query...
SELECT sap_invoice
intf_name
legacy_order
inv_create_date
source_psid
CURRENCY
inv_total_amount
FROM zcfinvoices
INTO TABLE t_zcfinvoices1
WHERE sap_invoice IN s_in_rng
AND intf_name LIKE intf_name% " field1
AND sap_order LIKE sap_order% " field2
AND inv_create_date IN s_incrdt
AND intf_date IN s_invdat
AND dest_psid IN s_dtpsid.Hope this helps,
Sajan Joseph.