Skip to Content
author's profile photo Former Member
Former Member

Join Two Fields

HI Frds

Im getting output like this

R|5648|Name

R|5656|Name1

R|5655|Name2

Now i wants to remove the separate( | ) in between R and 5648

For Example

R5648|Name

R5656|Name1

R5655|Name2

Kindly can anyone tell me how to do and give me sample codings on this.

Thanks

BY

Pari

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 11, 2008 at 08:02 AM

    HI

    Use REPLACE statement, this will remove the first occurance of '|' in the string

    Thanks

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 11, 2008 at 08:03 AM

    Hi pari,

    1. I suppose you are getting the output in

    an internal table.

    2. We can use the replace command.

    3. Just copy paste to get a taste of it.

    
    report abc.
    data : str(15) type c.
    
    *------------------------------------------------------
    str = 'R|5648|Name'.
    write :/ str.
    *------------------------------------------------------
    replace first occurrence of '|' in str with ''.
    write :/ str.
    
    

    regards,

    amit m.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 11, 2008 at 08:12 AM

    replace first occurrence of '|' in field with ''.

    condense field.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.