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

merging cells

Hi,

i am writing email application which sends mail to the distribution list as xls attachment.

i have got more than 255 row length so made my line chunks of 255 and then passing to so_api1 fm.

i am able to get the output with row length more than 255. but merging two cells here. i mean in my code text-015 and text-016 are coming in single cell.

How to overcome this?

FORM build_xls_data_table .

class cl_abap_char_utilities definition load.

constants:

con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB,

con_cret type c value cl_abap_char_utilities=>CR_LF.

CLEAR it_attach.

CONCATENATE text-006 text-018 text-007 text-008 text-009 text-010

text-011 text-012 text-013 text-020 text-014 text-015

into it_attach

SEPARATED BY con_tab.

CONCATENATE con_cret it_attach INTO it_attach.

APPEND it_attach.

CONCATENATE text-016 text-017 text-019 text-021 text-022 text-023

text-024 text-025 text-026

into it_attach

SEPARATED By con_tab.

APPEND it_attach.

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 Jan 11, 2007 at 04:56 AM

    Hi Nihi,

    Try these two codes:

    1) CLEAR it_attach.

    CONCATENATE text-006 text-018 text-007 text-008 text-009 text-010

    text-011 text-012 text-013 text-020 text-014 text-015

    into it_attach

    SEPARATED BY con_tab.

    CONCATENATE con_cret it_attach INTO it_attach.

    APPEND it_attach.

    CLEAR: it_attach.

    CONCATENATE text-016 text-017 text-019 text-021 text-022 text-023

    text-024 text-025 text-026

    into it_attach

    SEPARATED By con_tab.

    APPEND it_attach.

    2) If above code does not work then ti amy be coming due to following code:

    CONCATENATE con_cret it_attach INTO it_attach.

    Just comment it or try using this also in second code before appending text-016 inot table.

    Ashven

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Nihi,

      I dont know how..Cos I made an excel sheet and sent in the same manner and send the excel sheet as an attachment in one of my object..

      If nothing is working out..

      Lets try to put a Piping symbol '|' to represent as the end of row symbol. And concatenate at the end of text-015.

      Try this out and see it works or not.

      Thanks,

      Mayank

  • Posted on Jan 11, 2007 at 05:00 AM

    Hi,

    Just check the below code.

    CLEAR it_attach.

    CONCATENATE text-006 text-018 text-007 text-008 text-009 text-010

    text-011 text-012 text-013 text-020 text-014 text-015 <b>space</b>

    into it_attach

    SEPARATED BY con_tab.

    CONCATENATE con_cret it_attach INTO it_attach.

    APPEND it_attach.

    CONCATENATE text-016 text-017 text-019 text-021 text-022 text-023

    text-024 text-025 text-026

    into it_attach

    SEPARATED By con_tab.

    APPEND it_attach.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 11, 2007 at 10:26 AM

    Hi,

    If your program is not unicode checked[program attributes,unicode active is not checked],you can use the follg.

    CONSTANTS: con_cret TYPE x VALUE '0D', "OK for non Unicode

    con_tab TYPE x VALUE '09'. "OK for non Unicode

    If your program is unicode active,

    class cl_abap_char_utilities definition load.

    constants:

    con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB,

    con_cret type c value cl_abap_char_utilities=>CR_LF.

    CONCATENATE text-006 text-018 text-007 text-008 text-009 text-010

    text-011 text-012 text-013 text-020 text-014 text-015

    into it_attach

    SEPARATED BY con_tab.

    CONCATENATE con_cret it_attach INTO it_attach.

    APPEND it_attach.

    CONCATENATE text-016 text-017 text-019 text-021 text-022 text-023

    text-024 text-025 text-026

    into it_attach

    SEPARATED By con_tab.

    <b>CONCATENATE con_cret it_attach INTO it_attach.</b>

    APPEND it_attach.

    Check this link.

    http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm

    Jayanthi Jayaraman

    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.