on 01-31-2006 9:23 AM
Hi,
I have created a dynamic internal table in an ABAP/4 report . I want to know if there is any way of downloading the contents of the dynamic internal table into an excel sheet.If any of you have done any programming of this sort kindly help me out.
Thanks & Regards,
Malathi V.
Hi Malathi,
PL check the example in this <a href="http://www.thespot4sap.com/Articles/Download_to_excel.asp">Link</a>
Regards,
Suresh Datti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
use this function module..
''MS_EXCEL_OLE_STANDARD_DAT'''
thanks
jaideep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
U can download the data Dynamically as below.
U need to concatenate each and every line of the
FM into an Internal table and call the Subroutine pool
where P_OUTFLE will be the file name ,
I_EXPORT_FILE is the dynamically generated table
and I_HEADER will be the dynamically generated header.
*-- Function module to write data to the Excel Sheet
concatenate 'CALL FUNCTION' '''MS_EXCEL_OLE_STANDARD_DAT'''
into v_file separated by space.
append v_file to it_tab.
append 'EXPORTING' to it_tab.
append 'FILE_NAME = P_OUTFLE' to it_tab.
append 'TABLES' to it_tab.
append 'DATA_TAB = I_EXPORT_FILE' to it_tab.
append 'FIELDNAMES = I_HEADER' to it_tab.
append 'EXCEPTIONS' to it_tab.
append 'FILE_NOT_EXIST = 1' to it_tab.
append 'FILENAME_EXPECTED = 2' to it_tab.
append 'COMMUNICATION_ERROR = 3' to it_tab.
append 'OLE_OBJECT_METHOD_ERROR = 4' to it_tab.
append 'OLE_OBJECT_PROPERTY_ERROR = 5' to it_tab.
append 'INVALID_FILENAME = 6' to it_tab.
append 'INVALID_PIVOT_FIELDS = 7' to it_tab.
append 'DOWNLOAD_PROBLEM = 8' to it_tab.
append 'OTHERS = 9' to it_tab.
append '.' to it_tab.
append 'ENDFORM.' to it_tab.
syntax-check for it_tab message v_f line v_g word v_h.
if sy-subrc <> 0.
message s000 with v_f.
exit.
endif.
generate subroutine pool it_tab name v_name.
Regards,
GSR.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In my program i have created the dynamic table by pointer concept.
NEW_TABLE is a reference variable ( declared as DATA: new_table TYPE REF TO data.)
which is pointing to the dynamic internal table.
I want to download the contents of this pointer variable into excel sheet.
i cannot directly pass the pointer variable as value to the function 'MS_EXCEL_OLE_STANDARD_DAT'.
How should i proceed with it?
Thanks & Regards,
Malathi
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.