cancel
Showing results for 
Search instead for 
Did you mean: 

How to add Selection Option in Program for CDS View

0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

horst_keller
Product and Topic Expert
Product and Topic Expert

You use the WHERE IN condition of ABAP SQL for CDS entities exactly as for DDIC database tables.

https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenwhere_logexp_selt...

BR

Horst

Answers (0)