Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Use the associated entity "ZS4DEMO_CDS".

former_member203215
Participant
0 Likes
11,995

I created a cds view like below

SPAN { font-family: "Consolas"; font-size: 10pt; color: #000000; background: #FFFFFF; }

@AbapCatalog.sqlViewName: 'ZS4DEMOCDS'

@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Inner Join'
define view ZS4DEMO_CDS

as select from sbook as b
inner join spfli as p on b.carrid = p.carrid
and b.connid = p.connid
inner join scustom as c on c.id = b.customid
{
b.customid,
b.bookid,
c.name,
b.fldate,
p.cityfrom,
p.cityto
}

and used in report program(se38) like below

SELECT * FROM zs4hcds_selv25 INTO TABLE @DATA(lt_demo)

i'm getting a warning like this

Use the associated entity "ZS4DEMO_CDS".

please tell me why i'm getting this.

and the performance is slower to below statement which is written directly in se38 report program.

SELECT b~customid,b~bookid,c~name,b~fldate,p~cityfrom,p~cityto INTO TABLE @DATA(lt_data)
FROM ( sbook AS b INNER JOIN spfli AS p ON b~carrid = p~carrid
AND b~connid = p~connid
INNER JOIN scustom AS c ON c~id = b~customid ).

1 ACCEPTED SOLUTION
Read only

Former Member
4,866

Hi Ravichand S,

I would like to answer your ask about your message "Use the associated entity "ZS4DEMO_CDS"."

It's because you don't use right table.

You must use ZS4DEMO_CDS as table and not zs4hcds_selv25.

Example:

SELECT * FROM ZS4DEMO_CDS INTO TABLE @DATA(lt_demo) Correct

SELECT * FROM zs4hcds_selv25 INTO TABLE @DATA(lt_demo) Wrong

Regards,

Maurizio.


5 REPLIES 5
Read only

Former Member
4,867

Hi Ravichand S,

I would like to answer your ask about your message "Use the associated entity "ZS4DEMO_CDS"."

It's because you don't use right table.

You must use ZS4DEMO_CDS as table and not zs4hcds_selv25.

Example:

SELECT * FROM ZS4DEMO_CDS INTO TABLE @DATA(lt_demo) Correct

SELECT * FROM zs4hcds_selv25 INTO TABLE @DATA(lt_demo) Wrong

Regards,

Maurizio.


Read only

0 Likes
4,866

Thank You

Read only

retired_member
Product and Topic Expert
Product and Topic Expert
0 Likes
4,866

Where does that zs4hcds_selv25 come from?

Read only

0 Likes
4,866

Thank You.!