Quantcast
Channel: ABAP Development
Viewing all articles
Browse latest Browse all 948

Fix missing "Spreadsheet" option while right-clicking on ALV generated with REUSE_ALV_GRID_DISPLAY

$
0
0

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)

 

2015-01-05_110428.jpg

 

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.

2015-01-05_111256.jpg

 

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'.

2015-01-05_113753.jpg

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.

2015-01-05_114302.jpg

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

 

 

Hope this will be helpful for others!


Viewing all articles
Browse latest Browse all 948

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>