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

Why concatenate statement suppressing spaces !!

<i>Hello Friends,

I like give some spaces in a concatenate statement, but it is suppresing the spaces.

for ex: <b>concatenate 'sundar' ' ' 'g' into name</b>.

but the name contains <b>'sundarg'</b> only.

Thank you for your valuable time.

Senthil</i>

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    Posted on Dec 13, 2005 at 01:53 AM

    Hi Snethil,

    change it as follows..

    concatenate 'sundar' 'g' into name

    separated by space.

    Regards

    Suresh Datti

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 13, 2005 at 01:56 AM

    concatenate 'sundar' 'g' into name separated by space.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 13, 2005 at 02:09 AM

    hi, please pay attention to some content from sap Help on CONCATENATE.

    <b>

    Note that trailing spaces in source fields with type C are ignored (since they cannot be distinguished from "padding" characters). In C strings, on the other hand, they are considered. All fields fi (1 <= i <= n) are used in the length STRLEN( fi ).

    </b>

    thanks

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 13, 2005 at 03:48 AM

    hi senthil

    <b>

    Syntax:</b>

    CONCATENATE dobj1 dobj2 ... INTO result

    <b> [SEPARATED BY sep].

    Example:</b>

    DATA: t1(10) TYPE c VALUE 'We',

    t2(10) TYPE c VALUE 'have',

    t3(10) TYPE c VALUE 'all',

    t4(10) TYPE c VALUE 'the',

    t5(10) TYPE c VALUE 'time',

    t6(10) TYPE c VALUE 'in',

    t7(10) TYPE c VALUE 'the',

    t8(10) TYPE c VALUE 'world',

    result TYPE string.

    CONCATENATE t1 t2 t3 t4 t5 t6 t7 t8

    INTO result.

    ...

    CONCATENATE t1 t2 t3 t4 t5 t6 t7 t8

    INTO result SEPARATED BY space.

    <b>output:</b>

    We have all the time in the world

    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.