Skip to Content

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)

/wp-content/uploads/2015/01/2015_01_05_110428_618571.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.

/wp-content/uploads/2015/01/2015_01_05_111256_618575.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’.

/wp-content/uploads/2015/01/2015_01_05_113753_618576.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.

/wp-content/uploads/2015/01/2015_01_05_114302_618577.jpg

Documentation on REUSE_ALV_GRID_DISPLAY didn’t mention about not using “Deep structures”, though.

Hope this will be helpful for others!

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Ravisankar Gopalakrishnan

    I tried this solution but now working

    Final table type mentioned below.

    Please let me know which field to be changed


    SPAN {
    font-family: “Courier New”;
    font-size: 10pt;
    color: #000000;
    background: #FFFFFF;
    }
    .L0S52 {
    color: #0000FF;
    }
    .L0S55 {
    color: #800080;
    }
     BEGIN OF gty_final,
    bukrs  TYPE bukrs,
    belnr  TYPE BELNR_D,
    gjahr  TYPE gjahr,
    buzei  TYPE buzei,
    blart  TYPE blart,
    bldat  TYPE bldat,
    budat  TYPE budat,
    monat  TYPE monat,
    usnam  TYPE usnam,
    xblnr  TYPE xblnr,
    waers  TYPE waers,
    kursf  TYPE kursf,
    augdt  TYPE augdt,
    bschl  TYPE bschl,
    koart  TYPE koart,
    umskz  TYPE umskz,
    umsks  TYPE umsks,
    zumsk  TYPE dzumsk,
    shkzg  TYPE shkzg,
    dmbtr  TYPE dmbtr,
    debit  TYPE wrbtr,
    credit TYPE wrbtr,
    pswbt  TYPE pswbt,
    zuonr  TYPE dzuonr,
    sgtxt  TYPE sgtxt,
    hkont  TYPE hkont,
    kunnr  TYPE kunnr,
    txt50  TYPE txt50_skat,
    name1  TYPE name1,
    werks  TYPE werks,
    fkdat  TYPE fkdat,
    prctr  TYPE prctr,
    END OF gty_final  ,

     

     

    (0) 

Leave a Reply