Skip to Content

Can't go to next line using Concatenate statement.

Hi Experts,

I am using Concatenate statement to join the fields and send it across mail, But I need to send it in the form of

Name: <field>

Address: <field>

Ref num: <refnum>

could any one help me how to use Concatenate statement for the above said statement.

Thanks in advance,

Sunil

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 12:32 PM

    Use like this

    Data: Var(100) type c.

    Concatenate name address ref.num into var seperated by space.

    Reward if this helps,

    Satish

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 12:36 PM

    Hi

    check this ex:

    After the first CONCATENATE statement, result contains "Wehaveallthetimeintheworld"; after the second, it contains "We have all the time in world".

    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.

    Reward pts if useful

    Regards

    Sreenivas

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 23, 2007 at 12:37 PM

    Hi,

    First declare name address and Ref num as character type then concatenate into string

    concatenate name address refnum into lv_string separated by space.

    Regards,

    Prashant

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 04:03 PM

    Hi Sunil,

    Concatenate 'Name:' lv_field into wa-line separated by space.

    append wa to Itab.

    Concatenate 'Address:' lv_field into wa-line separated by space.

    append wa to Itab.

    Concatenate 'Ref Num:' lv_field into wa-line separated by space.

    append wa to Itab.

    Pass Itab to FM SO_NEW_DOCUMENT_ATT_SEND_API1 for sending the mail.

    Hope it helps.

    Lokesh

    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.