Application Development 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: 

In CDS select all fields (select *)

hagit
Active Participant
0 Kudos

Hello Experts,

In a CDS I need to select all fields (select *) from a CDS .

The scenario is

CDS1

define view ZCDS1 as

select from ekko

inner join ekpo

on ekpo.mandt = ekpo.mandt

and ekpo.ebeln = ekko.ebeln

left outer join ml_esll

on ml_esll.mandt = ekko.mandt

and ml_esll.ebeln = ekko.ebeln

and ml_esll.ebelp = ekpo.ebelp

left outer join eskl

on eskl .mandt = ml_esll.mandt

and eskl .introw = ml_esll.introw

and eskl .packno = ml_esll.packno

left outer join ekkn

on ekkn.mandt = eskl .mandt

and ekkn.zekkn = eskl .zekkn

and ekkn.ebeln = ml_esll.ebeln

and ekkn.ebelp = ml_esll.ebelp

{

key ekko.mandt

,key ekko.ebeln

,<more fields>

}

Where …..

union all

select …..

where ….

CDS2

select from ZCDS1

left outer join lfa1

on lfa1.mandt = ZCDS1

and lfa1.lifnr = ZCDS1

{

lfa1.adrnr

,ZCDS1.* --line 11

}

Line 11 seems to be impossible according to

https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abencds_f1_select_list.htm

It is written there:

  • * can be used to define all fields of the data source of the CDS view as elements and expose associations of the current view. If another CDS view is used as a data source, the associations exposed in its SELECT list are, however, not exposed by the current CDS view. The asterisk * cannot be specified if the current CDS view contains joins or union sets when the data source is specified.

My question is: Is There any workaround?

Thankyou in advance

Hagit

0 REPLIES 0