on 10-15-2021 9:47 AM
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
Check out this blog post
https://blogs.sap.com/2018/07/16/sap-list-viewer-with-integrated-data-access-alv-with-ida/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Mahesh,
Thanks for your reply. Do you know how to add selection options in the following code?
REPORT zconsume_02_alv.
start-of-selection.
DATA(o_data) = cl_salv_gui_table_ida=>create_for_cds_view( iv_cds_view_name = `ZI_SAC_VERKAUFSDETAILS` ) .
o_data->fullscreen( )->display( ).
Thanks Kazi
Hi,
try this:
data: lt_range = IF_SALV_SERVICE_TYPES=>YT_NAMED_RANGES.
lt_range = value #( ( name = 'FIELD1' sign = 'I' option='EQ' low='ABC' ) ).
data(lr_alv) = cl_salv_gui_table_ida=>create_for_cds_view( iv_cds_view_name = `ZI_SAC_VERKAUFSDETAILS` ).
lr_alv->SET_SELECT_OPTIONS( it_range = lt_range ).
lr_alv->fullcreen( )->display( ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.