Application Development 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: 

Export Option is Grayed out in ALV Grid Display

Former Member
0 Kudos

Dear All ,

I want to download ALV output in Excel by using List----->Export----->Spreadsheet option in ALV Grid. But Currently that Spreadsheet menu is Grayed out and i cannot download my ALV output to Excel. I am using "REUSE_ALV_GRID_DISPLAY" function module for displayina internal table IT_PRINT in ALV as follows : -

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = sy-cprog

it_fieldcat = it_fieldcatalog[]

it_events = gt_events[]

i_save = 'A'

is_variant = g_variant

i_callback_user_command = g_user_command

TABLES

t_outtab = it_print

EXCEPTIONS

PROGRAM_ERROR = 1

OTHERS = 2

Please suggest as how to get that menu accessible.

Thanx in Advance.

Regards,

Nikhil

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Try this..

Please make sure the internal table IT_PRINT is not deep structured...

I had this issue once..when I debugged..It is disabling the export function code...if the internal table is deep structured..

Thanks

Naren

10 REPLIES 10

MaryM
Participant
0 Kudos

Hi Nikhil,

export option should be active by default.

which events are you using?

You can try to use the copy the default ALV status and modify its buttons exactly how you need.

Regards,

MaryM

former_member230674
Contributor
0 Kudos

Hi ,

You should check whether EXCEL is installed in your PC or not.

by

Prasad GVK.

0 Kudos

Yes My dear....Excel is obviously Installed. Other Reports are Woring perfectly.

0 Kudos

in the FM

i_default                         = 'X'

0 Kudos

Tried as per following code.... But still facing the same problem...

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = sy-cprog

it_fieldcat = it_fieldcatalog[]

it_events = gt_events[]

i_save = 'A'

is_variant = g_variant

i_callback_user_command = g_user_command

i_default = 'X'

TABLES

t_outtab = it_print

EXCEPTIONS

PROGRAM_ERROR = 1

OTHERS = 2

Former Member
0 Kudos

Please take up with basis,

We had the similer issue with layout, it was resolved by basis by updating user profile.

Thank you,

Ganesh

0 Kudos

But From the same User Id; in the Same Client I am Running Other report and it does not have any problem with Export.

Former Member
0 Kudos

Hi,

Try this..

Please make sure the internal table IT_PRINT is not deep structured...

I had this issue once..when I debugged..It is disabling the export function code...if the internal table is deep structured..

Thanks

Naren

Thank you so Much Naren. Problem got solved with the Help of your suggestion.

Actually IT_PRINT was having one field called LOCATION whose data type itself is a structure having 16 fields inside it. It resulted in the IT_PRINT becoming Deep Structure.

Thanx a Ton.

Regards,

Nikhil

MarcinPciak
Active Contributor
0 Kudos

Don't use the standard option from menu bar. Instead do the following:

1) in program create your custom GUI status. From menu choose Extras->Adjust template-> Select List Viewer . All standard options will be added to your GUI status, including this download spreadsheeet function.

2) in your FM call pass your custom subroutine which will set GUI status:


 CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
   EXPORTING
     i_callback_program                = l_repid
     i_callback_pf_status_set          = 'SUB_SET_PF_STATUS'
     ....

FORM sub_set_pf_status USING ft_extab TYPE slis_t_extab.  "don't change the signature, just copy it
  SET PF-STATUS 'YOUR_CUSTOM_ALV_STATUS'.  "use your GUI status here
ENDFORM.                   

3) Now you can downolad your alv data using option on alv toolbar.

Regards

Marcin