2008 Sep 11 7:50 AM
Hi Experts,
I want to show excel file from abap report program, but excel file exists in the following location.
'https://www.sdn.sap.com/test.xls'.
what are the steps to follow to display excel file from abap report program.
please help me out.
Thanks
Sridhar
Hi,
use the below function module to upload the excel file.
WS_DOWNLOAD
to get the file name use the below function module in at selection screen.
call function 'KD_GET_FILENAME_ON_F4'
exporting
mask = ',Text files, *.txt'
static = 'X'
changing
file_name = p_pfile.
Regards,
sunil
2008 Sep 11 8:02 AM
Hi
U have to search some standd function module s there...U call FM and get the file.
Regarda:
Prabu
2008 Sep 11 8:04 AM
Generally we will use WS_EXECUTE function module using paramter PROGRAM = 'path of the file'.
But as this FM is OBSOLETE now we have to go for classes.
call method cl_gui_frontend_services=>execute
exporting
application = ls_file_path
parameter = lv_file
synchronous = 'X' "lv_modal
exceptions
cntl_error = 1
error_no_gui = 2
bad_parameter = 3
file_not_found = 4
path_not_found = 5
file_extension_unknown = 6
error_execute_failed = 7
others = 8.
if sy-subrc <> 0.
2008 Sep 11 8:08 AM
Hi,
try this:
CL_GUI_FRONTEND_SERVICES=>EXECUTE(
EXPORTING
DOCUMENT = 'https://www.sdn.sap.com/test.xls'
EXCEPTIONS
CNTL_ERROR = 1 ).
Regards, Dieter
2008 Sep 11 8:10 AM
DATA: d_string TYPE string.
CONCATENATE '\\Hrdoc\PRINTFILES\PRINT'w_printfileno'.doc' INTO text.
d_string = text.
CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
document = d_string
EXCEPTIONS
OTHERS = 1.
2008 Sep 11 8:48 AM
Hi,
use the below function module to upload the excel file.
WS_DOWNLOAD
to get the file name use the below function module in at selection screen.
call function 'KD_GET_FILENAME_ON_F4'
exporting
mask = ',Text files, *.txt'
static = 'X'
changing
file_name = p_pfile.
Regards,
sunil
2008 Sep 11 8:57 AM
Hi,
Check FM ALV_XXL_CALL. U can pass fieldcat and output table to this FM to display data in excel.
U can also check WS_EXECUTE. But All WS_ FMs are obsolete.
Thanks,
Vinod.
2009 Jan 06 11:53 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |