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

downloading data to a text file using ooabap

hi,

I would like to know how to download an alv tree structured data into a text file. The data in the text file should be in tree structure and should be displayed in a table format.

regards

Jags

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Oct 19, 2005 at 05:47 AM

    hi Jagdeesh,

    I know of no other way than do this manually.

    1. Make a new button in the toolbar of your ALV-Tree:

    See the ABAP BCALV_TREE_04.

    2. Add download functionality to this button:

    With this FM your internal table will open automatically in an Excel.

    CALL FUNCTION 'RH_START_EXCEL_WITH_DATA'
     EXPORTING
       DATA_FILENAME             = 'test.xls'
       DATA_TABLE                = lt_itab.
    

    If you use CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD and set the importing parameters WRITE_FIELD_SEPERATOR to 'X' your will get a tab delimited txt file of your internal table.

    I hope this helps.

    Cheers

    Daniel

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2005 at 11:04 AM

    HI DANIEL,

    Thanx for giving your valuable suggestion. But I am unable to get the required output. Please let me know how can we get column aligned(with grids) output in notepad file when we downloading the data from output list. Really its urgent if you know it please let me know.

    regards,

    Jagadeesh

    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.