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

ABAP

hi all,

now currently i am working with reports.

In this i was given checkbox for a field.

i came with this problem. if we select checkbox.

A particular field should be activate and respected output should be shown in xl sheet otherwise it should be in deactivate. give that modules names which should been use to provide the output in xl sheet.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Dec 15, 2004 at 04:55 PM

    Try this.

    call function 'WS_EXCEL'

    exporting

    filename = 'TEST.XLS'

    tables

    data = itab.

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hello Harsha,

      It certainly helps if you are a little clearer about your problem statement.

      1.Do you want to make the selection from the database based on the user's input and then display the data in an excel sheet?

      or

      2. Is there already some data in the excel sheet which you want to display based on which fields the user has checked on the selection-screen?

      Also, how many checkbox-field pairs do you have on the selection-screen?

      Regards,

      Anand Mandalika.

  • author's profile photo Former Member
    Former Member
    Posted on Dec 17, 2004 at 11:03 AM

    Hi Sri,

    I guess you will either select data from different fields based on your selection parameter entries into the corresponding field of your internal table or you will use field symbol to transfer data to your itab dynamically.

    After that you can use WS_DOWNLOAD function with colselect mask to download specific columns if required.

    CALL FUNCTION 'WS_DOWNLOAD'

    EXPORTING

    FILENAME = p_file

    FILETYPE = 'DAT'

    COL_SELECT = 'X'

    COL_SELECTMASK = 'X XXX XXX X'.

    TABLES

    DATA_TAB = IT_DATATAB.

    later u can use function module WS_EXECUTE to open it with EXCEL

    CALL FUNCTION 'WS_EXECUTE'

    EXPORTING

    COMMANDLINE = "C:\TEST FILE.XLS"

    PROGRAM = EXCEL.

    Hope this will solve your purpose.

    regards,

    Satya

    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.