09-11-2008 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
09-11-2008 8:02 AM
Hi
U have to search some standd function module s there...U call FM and get the file.
Regarda:
Prabu
09-11-2008 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.
09-11-2008 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
09-11-2008 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.
09-11-2008 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
09-11-2008 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.
01-06-2009 11:53 AM