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

how to insert pipe symbol between fields ?

Former Member
0 Likes
2,235

I have a workarea with many fields.

I need to concatenate '|' (pipe symbole) as a seperator and put those all the fields into work area (which is of 300 chars) ?

How to do this ?

I have a workarea with many fields.

I need to concatenate '|' (pipe symbole) as a seperator and put those all the fields into work area (which is of 300 chars) ?

How to do this ?

4 REPLIES 4
Read only

Former Member
0 Likes
1,341

hi,

You need use

concatenate field1 field2 field3... fieldn into target separated by space.

Hope this helps.

Read only

Former Member
0 Likes
1,341

There are so many fields . thats why m asking ...is there any way to achieve this

Read only

0 Likes
1,341

Clear lstr.

DO.

ASSIGN COMPONENT SY-INDEX OF STRUCTURE F TO <F>.

IF SY-SUBRC <> 0. EXIT.

ELSE.

if sy-index = 1.

lstr = <F>.

else.

concatenate lstr <F> into lstr separated by '|'.

endif.

ENDIF.

ENDDO.

Here F is your internal table and <F> is the field-symbol...while the final string is lstr

<b>It the problem has been resolved please close the thread and assign points for helpful answers.</b>

Message was edited by: Anurag Bankley

Message was edited by: Anurag Bankley

Read only

Former Member
0 Likes
1,341

hi,

Do this way ..

<b>concatenate f1 f2 f3 into f4 separated by '|'.</b>

Regards,

Santosh