Skip to Content
author's profile photo Former Member
Former Member

Right Outer Join not working in CDS view

Hi Expert,

I am creating one CDS view by using right outer join, but I am not getting expected result, instead I am getting output for inner join. I tried the same select query in SQL Console as well as normal ABAP report and it is working but not for CDS view.

If any one of you have worked on same issue please tell me the solution for the same.

Below is the source code for DDL source(CDS view definition):

@AbapCatalog.sqlViewName: 'ZCDS_RIGHT_JOIN'
@AbapCatalog.compiler.CompareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Demo CDS view with right outer Join'
define view ZDDl_RIGHT_OUTERJOIN as
select
c.cust_id,
c.cust_name,
s.zcust_id,
s.zproduct,
s.ztot_unit from
zct_customer as c right outer join zct_sales_order as s
on c.cust_name = s.zcust_name

Also ,please find the attachment for output screenshot for Console and CDS View.

cds-view-output.pngsql-console-output.png

Thanks& Regards,

Bhupesh

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on May 26, 2017 at 05:15 AM

    this should be incorrect behavoir.

    Please try to double check the SQL definition statement in ABAP in Eclipse by right click the CDS-> Show SQL create Statement.

    if the Right join is used there, then it's a DB issue.

    if there is no right join, then it's CDS ddic issue. please double check the NW version and create incident accordingly.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 29, 2017 at 10:47 AM

    I found the same issue. Any solutions there?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 05, 2020 at 06:30 AM

    Yes, i also meet this problem.

    Below DDL statement have different records in se11 view.

    (scarr exist key not in sflight)

    view z_v1 as select from sflight right outer join scarr on sflight.carrid = scarr.carrid{ scarr.carrid }

    view z_v2 as select from scarr left outer join sflight on scarr.carrid = sflight.carrid{ sflight.carrid }

    In R3, the right outer join work same as inner join, but in S4 1909, it work correct

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.