Skip to Content
0

I get different results with LEFT OUTER JOIN and ASSOCIATION

Nov 23, 2017 at 04:35 PM

129

avatar image
Former Member

My association

define view ZCDSV_QTITMASC
  as select from ZCDSV_QTITMLNK as a
  /*  left outer join vbap           as b on  a.vbeln     = b.vbeln
                                        and a.ref_posnr = b.posnr*/
  association to vbap as _to_vbap_ref on  a.vbeln     = _to_vbap_ref.vbeln
                                      and a.ref_posnr = _to_vbap_ref.posnr
{
  key a.vbeln,
  key ref_posnr,
  key fg_posnr,
      //b.matnr                          as tp,
      _to_vbap_ref.matnr               as tp1
} 

gives

If I uncomment the LEFT OUTER JOIN, I get the expected result:

How can I make the association give the results like the LEFT OUTER JOIN?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Horst Keller
Nov 23, 2017 at 05:12 PM
2

Are you on HANA?

Maybe you have to specify the correct cardinality.

https://help.sap.com/http.svc/rc/abapdocu_752_index_htm/7.52/en-US/index.htm?file=abencds_f1_association.htm

HANA optimizes and thereby can change the result.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thanks for the response. Tried every possible combination but unfortunately no change in results. Closing this thread as I did the query the old way and resolved the issue with a left outer join instead of association.

0