Skip to Content
0
Oct 14 at 07:57 AM

How to add Selection Option in Program for CDS View

70 Views Last edit Oct 14 at 10:08 AM 2 rev

Hello Everybody,

i want to display CDS View in Program with Selection options. Following Standard Program display CDS View. How can i add selection options?

REPORT z_invoice_items_usd_copy.
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.
    r_result = new #( ).
  endmethod.
  method run.
**  write: 'Hello Kazi'.
cl_salv_gui_table_ida=>create_for_cds_view( 'Z_INVOICE_ITEMS_USD' )->fullscreen( )->display( ).
  endmethod.
endclass.
START-OF-SELECTION.
    lcl_main=>create( )->run( ).

in following program i can also display CDS view with parameters but not able to include Selection options.

REPORT zconsume_02_cds_pa.
Select * from ZI_SAC_VERKAUFSDETAILS into table @data(lt_itab).
cl_demo_output=>display_data( lt_itab ).

any suggestion is highly appreciated.

Thanking You,

Kazi