‎2008 Mar 06 3:32 PM
hi ABAP experts,
We would like to get a wildcard string by using Concatenate and then in select statement. But when we activate the following simple statement, get the following error:
Statement is not accessible. at the Concatenate statement.
Below is the simple piece of code:
data: String1 TYPE C.
parameters:String2 like EKPO-EKORG.
CONCATENATE String2 '*' INTO String1.
select EBELN EBELP MATNR MENGE from EKPO into table item_itab
Where MATNR like String1.
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Mar 6, 2008 10:39 AM
‎2008 Mar 06 3:34 PM
data: String1 TYPE C.
parameters:String2 like EKPO-EKORG.
Start-of-selection.CONCATENATE String2 '*' INTO String1.
select EBELN EBELP MATNR MENGE from EKPO into table item_itab
Where MATNR like String1.
‎2008 Mar 06 3:34 PM
data: String1 TYPE C.
parameters:String2 like EKPO-EKORG.
Start-of-selection.CONCATENATE String2 '*' INTO String1.
select EBELN EBELP MATNR MENGE from EKPO into table item_itab
Where MATNR like String1.
‎2008 Mar 06 3:38 PM
Kaluvala Santhosh,
Where did you change my code? Both of our codes are the same!
Looking forward to hearing from you soon!
‎2008 Mar 06 3:40 PM
Sorry...
Constants: C_STAR Value '*'.
also I have added the start-of-selection event dint I?
use this constant in your concatenate..stmt
santhosh
Edited by: Kaluvala Santhosh on Mar 6, 2008 9:10 PM
‎2008 Mar 06 3:36 PM
constants : c_star type c value '*'.
CONCATENATE String2 c_star INTO String1.
a®
‎2008 Mar 06 3:42 PM
‎2008 Mar 06 3:46 PM
Check whether EKPO have EKORG i think it will be
parameters:String2 like EKkO-EKORG.
a®
‎2008 Mar 06 3:41 PM
Hi...
Change the declaration
data: String1(20) TYPE C.
CONCATENATE String2 '*' INTO String1.
It works!!
Lokesh
‎2008 Mar 06 3:46 PM
‎2008 Mar 06 3:47 PM
Kevin, PUT Start-of-selection. event.....as I said in my post
it will work
santhosh
‎2008 Mar 06 3:49 PM
Hi Kevin,
Use TYPE in Parameters declaration
This is the code I wrote in a test prog...
Parameter: string type ekko-ekorg.
DATA: Str1(10) type c.
concatenate string '*' into str1.
write str1.
Its working...
Lokesh
Edited by: Lokesh Aggarwal on Mar 6, 2008 3:51 PM
‎2008 Mar 06 3:46 PM
Change string1 declaration ...
data: String1(30) TYPE C.
parameters:String2 like EKPO-EKORG.
CONCATENATE String2 '*' INTO String1.
select EBELN EBELP MATNR MENGE from EKPO into table item_itab
Where MATNR like String1.