data: begin of it_header occurs 0,
header(30) ,
end of it_header.
move 'FIELD NAME1' to it_header-header.
append it_header.
move ' FIELD NAME2' to it_header-header.
append it_header.
move ' FIELD NAME3' to it_header-header.
append it_header.
move ' FIELD NAME4' to it_header-header.
append it_header.
move ' FIELD NAME5' to it_header-header.
append it_header.
*Method to POP Up the file path to save
call method cl_gui_frontend_services=>file_save_dialog
exporting
* window_title = ' '
default_extension = 'XLS'
default_file_name = lf_save_filename
initial_directory = 'c:\temp\'
changing
filename = lf_save_filename
path = lf_save_filepath
fullpath = lf_save_filefullpath
user_action = lf_result.
* Check user did not cancel request
check lf_result eq '0'.
*Function module to download the internal table data into excel
call function 'GUI_DOWNLOAD'
exporting
filename = lf_save_filename
filetype = 'ASC'
* HEADER = it_header
* APPEND = 'X'
write_field_separator = 'X'
* CONFIRM_OVERWRITE = 'X'
tables
data_tab = lt_result[] "need to declare and populate
fieldnames = it_header[]
exceptions
file_open_error = 1
file_write_error = 2
others = 3.
ABAP methods to download internal table contents into Excel
Creating Step by Step Tutorial Using Windows 7 Problem Step Recorder
If you want to create a document with step by step procedure then this post will help you.
1. Go Run (Windows Key + R)
2. Type PSR.EXE in Run prompt --> Problem Step Recorder will open
3. Click Start record then do your steps
4. Once the steps completed Click Stop Record
5. Then It will ask to save the recorded file in ZIP format.
6. Open the zip file and the recorded contents will be opened in your browser.
Reference : http://windows.microsoft.com/en-in/windows7/how-do-i-use-problem-steps-recorder
1. Go Run (Windows Key + R)
2. Type PSR.EXE in Run prompt --> Problem Step Recorder will open
3. Click Start record then do your steps
4. Once the steps completed Click Stop Record
5. Then It will ask to save the recorded file in ZIP format.
6. Open the zip file and the recorded contents will be opened in your browser.
Reference : http://windows.microsoft.com/en-in/windows7/how-do-i-use-problem-steps-recorder
Subscribe to:
Posts (Atom)