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

Concat syntax

Former Member
0 Likes
546

Hi all

i got a problem in the concat syntax

CONCATENATE it_vbak-admino it_vbak-fname it_vbak-lname into val

SEPARATED BY space.

This is working fine

I receive a error for this syntax

CONCATENATE it_vbak<b>-field1</b> it_vbak<b>-field2</b> it_vbak-<b>field3</b> into val

SEPARATED BY space.

field1, field2, field3 are the paramater value.

it_vbak is the table

How to make the it_vbak<b>-field1</b> it_vbak<b>-field2</b> it_vbak-<b>field3</b> be recognize in the table?

code----


SELECT (it_fldtab)

INTO CORRESPONDING FIELDS OF TABLE it_vbak

FROM ZSTUDGARY.

IF SY-SUBRC = 0.

LOOP AT it_vbak.

*Concat the data as 1 field----


CONCATENATE it_vbak-admino it_vbak-fname it_vbak-lname into val

SEPARATED BY space.

*write:/ it_vbak.

*CONCATENATE it_vbak-field1 it_vbak-field2 it_vbak-field3 into val

*SEPARATED BY space.

write:/ test1.

write:/ val.

ENDLOOP.

3 REPLIES 3
Read only

Former Member
0 Likes
501

SELECT (it_fldtab)

INTO CORRESPONDING FIELDS OF TABLE it_vbak

FROM ZSTUDGARY.

IF SY-SUBRC = 0.

LOOP AT it_vbak.

*Concat the data as 1 field----


<b>CONCATENATE admino fname name into val.</b>

SEPARATED BY space.

*write:/ it_vbak.

write:/ val.

<b>clear val.</b>

ENDLOOP.

reward if useful

Amit Singla

Message was edited by:

Amit Singla

Read only

former_member404244
Active Contributor
0 Likes
501

Hi,

There is no problem with the syntax ..

Is field1,field2 and field3 are thre in the internal table it_vbak.??tell me why are u overwriting value of val.

Regards,

nagaraj

Read only

Former Member
0 Likes
501

If field1, field2 ,field3 are parameters then simply write as below:

CONCATENATE field1 field2 field3 into val

SEPARATED BY space.

reward if useful