Application Development 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: 

How to select from EINE and concatenate results into single variable?

walkerist
Participant
0 Kudos
349

Hi, I'm trying to select infnr, ekorg, esokz from EINE table and concatenate it into a single variable. Is it possible?

  SELECT infnr,
ekorg,
esokz
FROM eine
WHERE ebeln = @l_ebeln
INTO @l_name.
2 REPLIES 2

BaerbelWinkler
Active Contributor
271

Hi Wane,

if you are at least on a NW 7.50 system you should be able to use CONCAT in the SELECT statement:

https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/index.htm?file=ABAPSQL_EXPR.htm

Hope this helps!

Cheers

Bärbel

yashoratna
Active Participant
0 Kudos
271

Hi Wane,

You can do as per below. Concat syntax can concatenate only two expression. So you have to use two CONCAT here.

SELECT concat( concat( infnr , ekorg ) , esokz )
FROM eine
WHERE ebeln = @l_ebeln
INTO @(l_name).