05-09-2006 2:00 PM
Hi Experts,
I am reading internal table , with in a loop I need to put the Pipe Symbol '|' after the each field of the intenal table.
I am using concatenate '|' itab-field1
'|' itab-field2
'|' itab-field3
.
.
.
into infodata.
this infodata is variable with character C of 5000 length.
then this info data i need to transafer to a dataset.
This is giving me a error in the concatenation part.
Can any one suggest me the better way.
Thanks in Advance,
05-09-2006 2:13 PM
hi Irfan,
Please use the following
CONCATENATE <c1> ... <cn> INTO <c> [SEPARATED BY <s>].
Regards,
Ranjit Thakur.
05-09-2006 2:04 PM
concatenate itab-field1 itab-field2 ... into infodata separated by '|'.
Reward points if helpful
Message was edited by: Sekhar
05-09-2006 2:13 PM
try out this code
data : begin of itab occurs 0,
f1(10),
f2(10),
f3(10),
end of itab.
data :v_f1(1000) type c,
v_f2(1000) type c,
v_f3(1000) type c.
itab-f1 = 1.
itab-f2 = 2.
itab-f3 = 3.
append itab.
itab-f1 = 2.
itab-f2 = 3.
itab-f3 = 4.
append itab.
itab-f1 = 5.
itab-f2 = 6.
itab-f3 = 7.
append itab.
break-point.
loop at itab.
condense : itab-f1, itab-f2, itab-f3.
*--this condense is to remove unnecessary blank spaces.
concatenate v_f1
itab-f1
into v_f1."(use SEPARATED BY ,)
concatenate v_f2
itab-f2
into v_f2."(use SEPARATED BY ,)
concatenate v_f3
itab-f3
into v_f3."(use SEPARATED BY ,)
endloop.
Thanks & Regards
Naresh
05-09-2006 2:13 PM
hi Irfan,
Please use the following
CONCATENATE <c1> ... <cn> INTO <c> [SEPARATED BY <s>].
Regards,
Ranjit Thakur.
05-09-2006 2:15 PM
Hai Irfan
concatenate itab-field1 itab-field2 itab-field1 into infodata separated by '|'.
Thanks & regards
Sreenivasulu P