‎2007 Oct 11 11:01 AM
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.
‎2007 Oct 11 11:05 AM
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
‎2007 Oct 11 11:06 AM
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
‎2007 Oct 11 11:22 AM
If field1, field2 ,field3 are parameters then simply write as below:
CONCATENATE field1 field2 field3 into val
SEPARATED BY space.
reward if useful