Skip to Content
0
Oct 15, 2021 at 08:47 AM

How to display CDS View data through Program in Gui view (design, layout) or ALV

1598 Views Last edit Oct 15, 2021 at 08:55 AM 3 rev

Hallo Everybody,

I want to display CDS view through Program with Selection options. Following program is working

REPORT zconsume_02_cds_test.
DATA  spart TYPE spart.
SELECT-OPTIONS Division for  spart.
Select *
from ZI_SAC_VERKAUFSDETAILS
where spart IN @Division
into table @data(Salesdata) .
cl_demo_output=>display_data( Salesdata ).
* cl_salv_gui_table_ida=>create_for_cds_view(`Salesdata`)->fullscreen( )->display( ).

but output design is like that (pleases see attached file, program output design

)

I want to have following output design (Please see attached file, Expected output design)

what should i do?

From the following program i am getting expected output design but can not include Selection options. Can i add select options here?

REPORT zconsume_02_cds.
class lcl_main definition create private.
  public section.
    CLASS-METHODS create
      RETURNING
        value(r_result) TYPE REF TO lcl_main.
    methods run.
  protected section.
  private section.
endclass.
class lcl_main implementation.
  method create.
    create object r_result.
  endmethod.
  method run.
cl_salv_gui_table_ida=>create_for_cds_view(`ZI_SAC_VERKAUFSDETAILS`)->fullscreen( )->display( ).
  endmethod.
endclass.
start-of-selection. lcl_main=>create( )->run( ).

Any suggestion is highly appreciated.

Thanking You

Kazi

Attachments