Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Why CONCATENATE String2 '*' INTO String1 doesn't work?

Former Member
0 Likes
1,441

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,343

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.

11 REPLIES 11
Read only

Former Member
0 Likes
1,344

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.

Read only

0 Likes
1,343

Kaluvala Santhosh,

Where did you change my code? Both of our codes are the same!

Looking forward to hearing from you soon!

Read only

0 Likes
1,343

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

Read only

former_member194669
Active Contributor
0 Likes
1,343


constants : c_star type c value '*'.

CONCATENATE String2 c_star INTO String1.

a®

Read only

0 Likes
1,343

hi a®s,

Using your code, still get the same error!

Thanks!

Read only

0 Likes
1,343

Check whether EKPO have EKORG i think it will be

parameters:String2 like EKkO-EKORG.

a®

Read only

Former Member
0 Likes
1,343

Hi...

Change the declaration

data: String1(20) TYPE C.

CONCATENATE String2 '*' INTO String1.

It works!!

Lokesh

Read only

0 Likes
1,343

hi Lokesh,

Still not working!

Read only

0 Likes
1,343

Kevin, PUT Start-of-selection. event.....as I said in my post

it will work

santhosh

Read only

0 Likes
1,343

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

Read only

Former Member
0 Likes
1,343

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.