Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ALV Excel View Problem

Former Member
0 Likes
2,459

Hi All,

I have a problem with the ALV display problem.

When I click on the 'Microsoft Excel View' button at the top of the ALV display, I can view the data in Excel View.

However, when my user click it on his computer, he saw the excel view is blank without data (even there are data at the initial ALV display screen).

May I know what is the root cause of this problem? I've no idea of how to investigate it or solve it.

Many Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,355

Hi Irene,

I think it is Excel security problem. Try this one. open excel sheet and GOTO Tools FROM menu and MACRO.....SECURITY here click on Trusted publishers and tick the checkboxes both....

May be it solve ur problem b/c previous i encountred same problem with users..

SKSK.

Edited by: SK SK on Feb 4, 2009 4:20 AM

5 REPLIES 5
Read only

Former Member
0 Likes
1,356

Hi Irene,

I think it is Excel security problem. Try this one. open excel sheet and GOTO Tools FROM menu and MACRO.....SECURITY here click on Trusted publishers and tick the checkboxes both....

May be it solve ur problem b/c previous i encountred same problem with users..

SKSK.

Edited by: SK SK on Feb 4, 2009 4:20 AM

Read only

0 Likes
1,355

thanks for your suggestion.

I'll ask the user to try first.

Read only

Former Member
0 Likes
1,355

HI try with this code------

&----


*& Report ZTEST_DOWNLOAD1

*&

&----


*&

*&

&----


report ztest_download1.

tables : trdir.

type-pools: slis.

types: begin of gt_output,

progname type progname,

strct_type(14) type c,

strct_name(50) type c,

serial(8) type c,

mainfieldname(50) type c,

offset(17) type c,

leng(8) type c,

decimals(8) type c,

inttype(15) type c,

datatype(9) type c,

scrtext_m type scrtext_m,

tabname type tabname,

fieldname type fieldname,

rollname type rollname,

domname type domname,

default(100) type c,

end of gt_output.

types: begin of gt_header,

name(300) type c,

end of gt_header.

data : gi_output type standard table of gt_output,

wa_output type gt_output,

gi_header type standard table of gt_header.

data: d_filename like ibipparms-path,

gi_fieldcat type slis_t_fieldcat_alv,

wa_fieldcat type slis_fieldcat_alv,

wa_header type gt_header.

selection-screen:

begin of block b1 with frame title text-001.

parameter: program(150) type c default 'ZTOOL_TEST'.

select-options so_incl for trdir-name default 'ztool_test' no intervals .

selection-screen begin of line.

parameters :pa_check as checkbox default 'X'.

selection-screen comment (29) text-t01.

parameters :pa_path type rlgrap-filename default 'D:\TRIAL.XLS'.

selection-screen end of line.

selection-screen end of block b1.

at selection-screen.

perform download_excel_template.

at selection-screen on value-request for pa_path.

perform f4_file_help.

&----


*& Form F4_file_help

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form f4_file_help .

call function 'KD_GET_FILENAME_ON_F4'

exporting

program_name = sy-repid

dynpro_number = syst-dynnr

field_name = pa_path

changing

file_name = d_filename

exceptions

mask_too_long = 1

others = 2.

if sy-subrc <> 0.

  • MESSAGE ID gv_msgid TYPE 'I' NUMBER 000.

endif.

endform. "f4_file_help

*

form download_excel_template .

refresh gi_header.

wa_header-name = text-t01.

append wa_header to gi_header.

wa_header-name = text-t02.

append wa_header to gi_header.

wa_header-name = text-t03.

append wa_header to gi_header.

wa_header-name = text-t04.

append wa_header to gi_header.

wa_header-name = text-t05.

append wa_header to gi_header.

wa_header-name = text-t06.

append wa_header to gi_header.

wa_header-name = text-t07.

append wa_header to gi_header.

wa_header-name = text-t08.

append wa_header to gi_header.

wa_header-name = text-t09.

append wa_header to gi_header.

wa_header-name = text-t10.

append wa_header to gi_header.

wa_header-name = text-t11.

append wa_header to gi_header.

wa_header-name = text-t12.

append wa_header to gi_header.

wa_header-name = text-t13.

append wa_header to gi_header.

wa_header-name = text-t14.

append wa_header to gi_header.

wa_header-name = text-t15.

append wa_header to gi_header.

wa_header-name = text-t16.

append wa_header to gi_header.

wa_output-strct_name = 'abc'.

append wa_output to gi_output.

call function 'MS_EXCEL_OLE_STANDARD_DAT'

exporting

file_name = pa_path

data_sheet_name = 'Structure details'

tables

data_tab = gi_output

fieldnames = gi_header

exceptions

file_not_exist = 1

filename_expected = 2

communication_error = 3

ole_object_method_error = 4

ole_object_property_error = 5

invalid_pivot_fields = 6

download_problem = 7

others = 8.

if sy-subrc <> 0.

  • MESSAGE ID gv_msgid TYPE 'E' NUMBER 002.

endif.

endform. " DOWNLOAD_EXCEL_TEMPLATE

regards

prashant

Read only

Former Member
0 Likes
1,355

Hi,

If the problem still continues to appear, you can check SAP GUI version and upgrade it.

Also check the EXCEL version(2003,2007) at the user's machine.

Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
1,355

I agree that it's most likely a problem with Excel or GUI. Updating or re-installing GUI sometimes help. You might want to contact your Basis admin about this. Also check for OSS notes - this functionality is called "Excel in-place".

It's not working on my PC either, but I never use it anyway.