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

Dowloading file into excel format from the application server

Hi Friends,

I am Dowloading file into excel format from the application server.

In my concatenate statement I am using "SEPARATED BY CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB", here the output in the excel file is coming by separate tab but Directory name, header and values all are coming in a single line.

Could u plz temm me why it was coming like that? what can i do to get into separate row ? (Now all r in single row).

It is there the problem with transfer the file from T-code AL11 (or) i need to do any code change for this???

Thanks in Advance,

Magesh.s

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 03:01 PM
    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      I want to move the file from AL11 into speerd sheet.

      By, List -> send -> File -> select 'spreadsheet'

      then in that excel sheet I am getting all the values in single row (ie. Directory name, Header and the field values)

      plz guid me in this...

      thanks and regards,

      Magesh.S

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 03:13 PM

    hi friend

    this code will be help for you

    Parameters: P_file like RLGRAP-FILENAME.

    data : begin of int_head occurs 0,

    Filed1(20) type c, " Header Data

    end of int_head.

    data : begin of int_data occurs 0,

    Field1(20) type c, " Data

    Field2(20) type c,

    Field3(20) type c,

    Field4(20) type c,

    end of int_data.

    int_head-Filed1 = 'Sales Ord'.

    APPEND int_head.

    CLEAR int_head.

    int_head-Filed1 = 'Sold-to-Party'.

    APPEND int_head.

    CLEAR int_head.

    int_head-Filed1 = 'Purchase Ord'.

    APPEND int_head.

    CLEAR int_head.

    int_head-Filed1 = 'Ship-to-Party'.

    APPEND int_head.

    CLEAR int_head.

    int_data-field1 = '1JOHN'.

    int_data-field2 = '2TOM'.

    int_data-field3 = '3BRAD'.

    int_data-field4 = '4PETER'.

    Append int_data.

    Clear int_data.

    CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'

    EXPORTING

    file_name = p_file " path offile where u need to download

    • CREATE_PIVOT = 0

    • DATA_SHEET_NAME = ' '

    • PIVOT_SHEET_NAME = ' '

    • PASSWORD = ' '

    • PASSWORD_OPTION = 0

    TABLES

    • PIVOT_FIELD_TAB =

    data_tab = int_data "internal table with data

    fieldnames = int_head "internal table with header

    EXCEPTIONS

    file_not_exist = 1

    filename_expected = 2

    communication_error = 3

    ole_object_method_error = 4

    ole_object_property_error = 5

    invalid_filename = 6

    invalid_pivot_fields = 7

    download_problem = 8

    OTHERS = 9

    .

    IF sy-subrc <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    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.