Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
13,910

Today I came across a situation where the "Spreadsheet" option was missing while right-clicking on an ALV generated using REUSE_ALV_GRID_DISPLAY.

(See below)

I went through couple of discussions on this topic but most answered the missing "Export" option in Application bar (List> Export> Spreadsheet)

Observed that in my case, I could view the "Spreadsheet" option via from Application bar.


The Internal table declaration is as below-


* TYPES-----------------------------------------------------------------


  types :   begin of ty_output,


              kbeln      type kbeln,


              begru      type begru,


              bstat      type bstat,


              end of ty_output.


**--Internal Table----------------------------------------------------


Data: it_outtab type standard table of ty_output.



..


..


Logic for fetching data


..


* Display the data in grid


    call function 'REUSE_ALV_GRID_DISPLAY'


      exporting


        i_callback_program = sy-repid


        is_layout          = rec_layout


        it_fieldcat        = li_fldcatlog[]


        i_default          = 'X'          


        i_save             = 'A'          


        is_variant         = g_v_variant  


      tables


        t_outtab           = li_output.


While debugging, found that the internal table 'li_output' had a deep structure 'BSTAT'.

The types declaration was updated as below-


The Internal table declaration is as below-


* TYPES-----------------------------------------------------------------


  types :   begin of ty_output,


              kbeln      type kbeln,


              begru      type begru,


              bstat      type wrfbstat, "<<<<<-


              end of ty_output.


**--Internal Table----------------------------------------------------


Data: it_outtab type standard table of ty_output.


Post the code change, the 'Spreadsheet" Option appeared.

Documentation on REUSE_ALV_GRID_DISPLAY didn't mention about not using "Deep structures", though.

Hope this will be helpful for others!

2 Comments
Labels in this area